askui 0.12.0 → 0.12.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/core/reporting/default-step.js +4 -3
- package/dist/cjs/core/reporting/index.d.ts +0 -1
- package/dist/cjs/core/reporting/index.js +0 -1
- package/dist/cjs/core/reporting/snapshot-detail-level.d.ts +1 -0
- package/dist/cjs/core/reporting/snapshot-detail-level.js +8 -0
- package/dist/cjs/core/reporting/step-reporter.d.ts +7 -6
- package/dist/cjs/core/reporting/step-reporter.js +49 -34
- package/dist/cjs/execution/ui-control-client-dependency-builder.d.ts +0 -1
- package/dist/cjs/execution/ui-control-client-dependency-builder.js +1 -13
- package/dist/cjs/execution/ui-controller-client-interface.d.ts +4 -6
- package/dist/cjs/utils/base_64_image/base-64-image.d.ts +6 -9
- package/dist/cjs/utils/base_64_image/base-64-image.js +32 -33
- package/dist/cjs/utils/base_64_image/sharp.d.ts +2 -0
- package/dist/cjs/utils/base_64_image/sharp.js +56 -0
- package/dist/cjs/utils/proxy/proxy-builder.js +3 -1
- package/dist/cjs/utils/transformations.js +4 -2
- package/dist/esm/core/reporting/default-step.js +4 -3
- package/dist/esm/core/reporting/index.d.ts +0 -1
- package/dist/esm/core/reporting/index.js +0 -1
- package/dist/esm/core/reporting/snapshot-detail-level.d.ts +1 -0
- package/dist/esm/core/reporting/snapshot-detail-level.js +6 -1
- package/dist/esm/core/reporting/step-reporter.d.ts +7 -6
- package/dist/esm/core/reporting/step-reporter.js +49 -34
- package/dist/esm/execution/ui-control-client-dependency-builder.d.ts +0 -1
- package/dist/esm/execution/ui-control-client-dependency-builder.js +2 -14
- package/dist/esm/execution/ui-controller-client-interface.d.ts +4 -6
- package/dist/esm/utils/base_64_image/base-64-image.d.ts +6 -9
- package/dist/esm/utils/base_64_image/base-64-image.js +32 -33
- package/dist/esm/utils/base_64_image/sharp.d.ts +2 -0
- package/dist/esm/utils/base_64_image/sharp.js +33 -0
- package/dist/esm/utils/proxy/proxy-builder.js +3 -1
- package/dist/esm/utils/transformations.js +4 -2
- package/package.json +6 -3
- package/dist/cjs/core/reporting/default-reporter.d.ts +0 -10
- package/dist/cjs/core/reporting/default-reporter.js +0 -12
- package/dist/cjs/core/ui-control-commands/action-class-tdk-v1.d.ts +0 -19
- package/dist/cjs/core/ui-control-commands/action-class-tdk-v1.js +0 -23
- package/dist/cjs/core/ui-control-commands/action-tdk-v1.d.ts +0 -10
- package/dist/cjs/core/ui-control-commands/action-tdk-v1.js +0 -100
- package/dist/cjs/execution/annotation-level.d.ts +0 -5
- package/dist/cjs/execution/annotation-level.js +0 -9
- package/dist/cjs/execution/ui-control-client-error.d.ts +0 -2
- package/dist/cjs/execution/ui-control-client-error.js +0 -6
- package/dist/cjs/execution/ui-controller-client-facade.d.ts +0 -15
- package/dist/cjs/execution/ui-controller-client-facade.js +0 -2
- package/dist/cjs/execution/ui-controller-client-grpc.d.ts +0 -24
- package/dist/cjs/execution/ui-controller-client-grpc.js +0 -159
- package/dist/cjs/execution/ui-controller-client-tdk-v1.d.ts +0 -26
- package/dist/cjs/execution/ui-controller-client-tdk-v1.js +0 -221
- package/dist/cjs/proto/Askui/API/TDKv1/ActionClassID.d.ts +0 -21
- package/dist/cjs/proto/Askui/API/TDKv1/ActionClassID.js +0 -23
- package/dist/cjs/proto/Askui/API/TDKv1/ActionParameters.d.ts +0 -57
- package/dist/cjs/proto/Askui/API/TDKv1/ActionParameters.js +0 -3
- package/dist/cjs/proto/Askui/API/TDKv1/ActionParameters_KeyboardKey_Press.d.ts +0 -8
- package/dist/cjs/proto/Askui/API/TDKv1/ActionParameters_KeyboardKey_Press.js +0 -3
- package/dist/cjs/proto/Askui/API/TDKv1/ActionParameters_KeyboardKey_PressAndRelease.d.ts +0 -8
- package/dist/cjs/proto/Askui/API/TDKv1/ActionParameters_KeyboardKey_PressAndRelease.js +0 -3
- package/dist/cjs/proto/Askui/API/TDKv1/ActionParameters_KeyboardKey_Release.d.ts +0 -8
- package/dist/cjs/proto/Askui/API/TDKv1/ActionParameters_KeyboardKey_Release.js +0 -3
- package/dist/cjs/proto/Askui/API/TDKv1/ActionParameters_KeyboardKeys_Press.d.ts +0 -8
- package/dist/cjs/proto/Askui/API/TDKv1/ActionParameters_KeyboardKeys_Press.js +0 -3
- package/dist/cjs/proto/Askui/API/TDKv1/ActionParameters_KeyboardKeys_PressAndRelease.d.ts +0 -8
- package/dist/cjs/proto/Askui/API/TDKv1/ActionParameters_KeyboardKeys_PressAndRelease.js +0 -3
- package/dist/cjs/proto/Askui/API/TDKv1/ActionParameters_KeyboardKeys_Release.d.ts +0 -8
- package/dist/cjs/proto/Askui/API/TDKv1/ActionParameters_KeyboardKeys_Release.js +0 -3
- package/dist/cjs/proto/Askui/API/TDKv1/ActionParameters_KeyboardType_Text.d.ts +0 -13
- package/dist/cjs/proto/Askui/API/TDKv1/ActionParameters_KeyboardType_Text.js +0 -3
- package/dist/cjs/proto/Askui/API/TDKv1/ActionParameters_KeyboardType_UnicodeText.d.ts +0 -14
- package/dist/cjs/proto/Askui/API/TDKv1/ActionParameters_KeyboardType_UnicodeText.js +0 -3
- package/dist/cjs/proto/Askui/API/TDKv1/ActionParameters_MouseButton_Press.d.ts +0 -7
- package/dist/cjs/proto/Askui/API/TDKv1/ActionParameters_MouseButton_Press.js +0 -3
- package/dist/cjs/proto/Askui/API/TDKv1/ActionParameters_MouseButton_PressAndRelease.d.ts +0 -9
- package/dist/cjs/proto/Askui/API/TDKv1/ActionParameters_MouseButton_PressAndRelease.js +0 -3
- package/dist/cjs/proto/Askui/API/TDKv1/ActionParameters_MouseButton_Release.d.ts +0 -7
- package/dist/cjs/proto/Askui/API/TDKv1/ActionParameters_MouseButton_Release.js +0 -3
- package/dist/cjs/proto/Askui/API/TDKv1/ActionParameters_MouseMove.d.ts +0 -11
- package/dist/cjs/proto/Askui/API/TDKv1/ActionParameters_MouseMove.js +0 -3
- package/dist/cjs/proto/Askui/API/TDKv1/ActionParameters_MouseMove_Delta.d.ts +0 -11
- package/dist/cjs/proto/Askui/API/TDKv1/ActionParameters_MouseMove_Delta.js +0 -3
- package/dist/cjs/proto/Askui/API/TDKv1/ActionParameters_MouseWheelScroll.d.ts +0 -14
- package/dist/cjs/proto/Askui/API/TDKv1/ActionParameters_MouseWheelScroll.js +0 -3
- package/dist/cjs/proto/Askui/API/TDKv1/ActionParameters_RunCommand.d.ts +0 -6
- package/dist/cjs/proto/Askui/API/TDKv1/ActionParameters_RunCommand.js +0 -3
- package/dist/cjs/proto/Askui/API/TDKv1/ActionParameters_Wait.d.ts +0 -6
- package/dist/cjs/proto/Askui/API/TDKv1/ActionParameters_Wait.js +0 -3
- package/dist/cjs/proto/Askui/API/TDKv1/Bitmap.d.ts +0 -17
- package/dist/cjs/proto/Askui/API/TDKv1/Bitmap.js +0 -3
- package/dist/cjs/proto/Askui/API/TDKv1/CaptureArea.d.ts +0 -13
- package/dist/cjs/proto/Askui/API/TDKv1/CaptureArea.js +0 -3
- package/dist/cjs/proto/Askui/API/TDKv1/Color.d.ts +0 -10
- package/dist/cjs/proto/Askui/API/TDKv1/Color.js +0 -3
- package/dist/cjs/proto/Askui/API/TDKv1/ControllerAPI.d.ts +0 -239
- package/dist/cjs/proto/Askui/API/TDKv1/ControllerAPI.js +0 -3
- package/dist/cjs/proto/Askui/API/TDKv1/Coordinate2.d.ts +0 -8
- package/dist/cjs/proto/Askui/API/TDKv1/Coordinate2.js +0 -3
- package/dist/cjs/proto/Askui/API/TDKv1/Delta2.d.ts +0 -8
- package/dist/cjs/proto/Askui/API/TDKv1/Delta2.js +0 -3
- package/dist/cjs/proto/Askui/API/TDKv1/DisplayInformation.d.ts +0 -14
- package/dist/cjs/proto/Askui/API/TDKv1/DisplayInformation.js +0 -3
- package/dist/cjs/proto/Askui/API/TDKv1/GUID.d.ts +0 -9
- package/dist/cjs/proto/Askui/API/TDKv1/GUID.js +0 -3
- package/dist/cjs/proto/Askui/API/TDKv1/MouseButton.d.ts +0 -8
- package/dist/cjs/proto/Askui/API/TDKv1/MouseButton.js +0 -10
- package/dist/cjs/proto/Askui/API/TDKv1/MouseWheelDeltaType.d.ts +0 -7
- package/dist/cjs/proto/Askui/API/TDKv1/MouseWheelDeltaType.js +0 -9
- package/dist/cjs/proto/Askui/API/TDKv1/MouseWheelScrollDirection.d.ts +0 -7
- package/dist/cjs/proto/Askui/API/TDKv1/MouseWheelScrollDirection.js +0 -9
- package/dist/cjs/proto/Askui/API/TDKv1/PollEventID.d.ts +0 -6
- package/dist/cjs/proto/Askui/API/TDKv1/PollEventID.js +0 -8
- package/dist/cjs/proto/Askui/API/TDKv1/PollEventParameters.d.ts +0 -9
- package/dist/cjs/proto/Askui/API/TDKv1/PollEventParameters.js +0 -3
- package/dist/cjs/proto/Askui/API/TDKv1/PollEventParameters_ActionFinished.d.ts +0 -6
- package/dist/cjs/proto/Askui/API/TDKv1/PollEventParameters_ActionFinished.js +0 -3
- package/dist/cjs/proto/Askui/API/TDKv1/Rectangle.d.ts +0 -12
- package/dist/cjs/proto/Askui/API/TDKv1/Rectangle.js +0 -3
- package/dist/cjs/proto/Askui/API/TDKv1/Request_CaptureScreen.d.ts +0 -12
- package/dist/cjs/proto/Askui/API/TDKv1/Request_CaptureScreen.js +0 -3
- package/dist/cjs/proto/Askui/API/TDKv1/Request_EndSession.d.ts +0 -7
- package/dist/cjs/proto/Askui/API/TDKv1/Request_EndSession.js +0 -3
- package/dist/cjs/proto/Askui/API/TDKv1/Request_GetAction.d.ts +0 -9
- package/dist/cjs/proto/Askui/API/TDKv1/Request_GetAction.js +0 -3
- package/dist/cjs/proto/Askui/API/TDKv1/Request_GetActionCount.d.ts +0 -7
- package/dist/cjs/proto/Askui/API/TDKv1/Request_GetActionCount.js +0 -3
- package/dist/cjs/proto/Askui/API/TDKv1/Request_GetColor.d.ts +0 -11
- package/dist/cjs/proto/Askui/API/TDKv1/Request_GetColor.js +0 -3
- package/dist/cjs/proto/Askui/API/TDKv1/Request_GetPixelColor.d.ts +0 -8
- package/dist/cjs/proto/Askui/API/TDKv1/Request_GetPixelColor.js +0 -3
- package/dist/cjs/proto/Askui/API/TDKv1/Request_Poll.d.ts +0 -10
- package/dist/cjs/proto/Askui/API/TDKv1/Request_Poll.js +0 -3
- package/dist/cjs/proto/Askui/API/TDKv1/Request_RemoveAction.d.ts +0 -9
- package/dist/cjs/proto/Askui/API/TDKv1/Request_RemoveAction.js +0 -3
- package/dist/cjs/proto/Askui/API/TDKv1/Request_RemoveAllActions.d.ts +0 -7
- package/dist/cjs/proto/Askui/API/TDKv1/Request_RemoveAllActions.js +0 -3
- package/dist/cjs/proto/Askui/API/TDKv1/Request_RunRecordedAction.d.ts +0 -13
- package/dist/cjs/proto/Askui/API/TDKv1/Request_RunRecordedAction.js +0 -3
- package/dist/cjs/proto/Askui/API/TDKv1/Request_ScheduleBatchedAction.d.ts +0 -13
- package/dist/cjs/proto/Askui/API/TDKv1/Request_ScheduleBatchedAction.js +0 -3
- package/dist/cjs/proto/Askui/API/TDKv1/Request_SetDisplayLabel.d.ts +0 -11
- package/dist/cjs/proto/Askui/API/TDKv1/Request_SetDisplayLabel.js +0 -3
- package/dist/cjs/proto/Askui/API/TDKv1/Request_SetKeyboardDelay.d.ts +0 -9
- package/dist/cjs/proto/Askui/API/TDKv1/Request_SetKeyboardDelay.js +0 -3
- package/dist/cjs/proto/Askui/API/TDKv1/Request_SetMouseDelay.d.ts +0 -9
- package/dist/cjs/proto/Askui/API/TDKv1/Request_SetMouseDelay.js +0 -3
- package/dist/cjs/proto/Askui/API/TDKv1/Request_StartBatchRun.d.ts +0 -7
- package/dist/cjs/proto/Askui/API/TDKv1/Request_StartBatchRun.js +0 -3
- package/dist/cjs/proto/Askui/API/TDKv1/Request_StartSession.d.ts +0 -8
- package/dist/cjs/proto/Askui/API/TDKv1/Request_StartSession.js +0 -3
- package/dist/cjs/proto/Askui/API/TDKv1/Request_StopBatchRun.d.ts +0 -7
- package/dist/cjs/proto/Askui/API/TDKv1/Request_StopBatchRun.js +0 -3
- package/dist/cjs/proto/Askui/API/TDKv1/Request_Void.d.ts +0 -4
- package/dist/cjs/proto/Askui/API/TDKv1/Request_Void.js +0 -3
- package/dist/cjs/proto/Askui/API/TDKv1/Response_CaptureScreen.d.ts +0 -7
- package/dist/cjs/proto/Askui/API/TDKv1/Response_CaptureScreen.js +0 -3
- package/dist/cjs/proto/Askui/API/TDKv1/Response_GetAction.d.ts +0 -12
- package/dist/cjs/proto/Askui/API/TDKv1/Response_GetAction.js +0 -3
- package/dist/cjs/proto/Askui/API/TDKv1/Response_GetActionCount.d.ts +0 -6
- package/dist/cjs/proto/Askui/API/TDKv1/Response_GetActionCount.js +0 -3
- package/dist/cjs/proto/Askui/API/TDKv1/Response_GetColor.d.ts +0 -7
- package/dist/cjs/proto/Askui/API/TDKv1/Response_GetColor.js +0 -3
- package/dist/cjs/proto/Askui/API/TDKv1/Response_GetContinuousCapturedScreen.d.ts +0 -7
- package/dist/cjs/proto/Askui/API/TDKv1/Response_GetContinuousCapturedScreen.js +0 -3
- package/dist/cjs/proto/Askui/API/TDKv1/Response_GetDisplayInformation.d.ts +0 -10
- package/dist/cjs/proto/Askui/API/TDKv1/Response_GetDisplayInformation.js +0 -3
- package/dist/cjs/proto/Askui/API/TDKv1/Response_GetMousePosition.d.ts +0 -8
- package/dist/cjs/proto/Askui/API/TDKv1/Response_GetMousePosition.js +0 -3
- package/dist/cjs/proto/Askui/API/TDKv1/Response_GetPixelColor.d.ts +0 -7
- package/dist/cjs/proto/Askui/API/TDKv1/Response_GetPixelColor.js +0 -3
- package/dist/cjs/proto/Askui/API/TDKv1/Response_Poll.d.ts +0 -10
- package/dist/cjs/proto/Askui/API/TDKv1/Response_Poll.js +0 -3
- package/dist/cjs/proto/Askui/API/TDKv1/Response_RunRecordedAction.d.ts +0 -6
- package/dist/cjs/proto/Askui/API/TDKv1/Response_RunRecordedAction.js +0 -3
- package/dist/cjs/proto/Askui/API/TDKv1/Response_ScheduleBatchedAction.d.ts +0 -6
- package/dist/cjs/proto/Askui/API/TDKv1/Response_ScheduleBatchedAction.js +0 -3
- package/dist/cjs/proto/Askui/API/TDKv1/Response_StartSession.d.ts +0 -7
- package/dist/cjs/proto/Askui/API/TDKv1/Response_StartSession.js +0 -3
- package/dist/cjs/proto/Askui/API/TDKv1/Response_Void.d.ts +0 -4
- package/dist/cjs/proto/Askui/API/TDKv1/Response_Void.js +0 -3
- package/dist/cjs/proto/Askui/API/TDKv1/Reuqest_SetTestConfiguration.d.ts +0 -14
- package/dist/cjs/proto/Askui/API/TDKv1/Reuqest_SetTestConfiguration.js +0 -3
- package/dist/cjs/proto/Askui/API/TDKv1/SessionInfo.d.ts +0 -10
- package/dist/cjs/proto/Askui/API/TDKv1/SessionInfo.js +0 -3
- package/dist/cjs/proto/Askui/API/TDKv1/Size2.d.ts +0 -8
- package/dist/cjs/proto/Askui/API/TDKv1/Size2.js +0 -3
- package/dist/cjs/proto/Askui/API/TDKv1/TypingSpeedValue.d.ts +0 -7
- package/dist/cjs/proto/Askui/API/TDKv1/TypingSpeedValue.js +0 -9
- package/dist/cjs/proto/Askui/API/TDKv1/VirtualScreen.d.ts +0 -10
- package/dist/cjs/proto/Askui/API/TDKv1/VirtualScreen.js +0 -3
- package/dist/cjs/proto/Askui/API/TDKv1/Void.d.ts +0 -4
- package/dist/cjs/proto/Askui/API/TDKv1/Void.js +0 -3
- package/dist/cjs/proto/tdk-v1.d.ts +0 -87
- package/dist/cjs/proto/tdk-v1.js +0 -2
- package/dist/esm/core/reporting/default-reporter.d.ts +0 -10
- package/dist/esm/core/reporting/default-reporter.js +0 -9
- package/dist/esm/core/ui-control-commands/action-class-tdk-v1.d.ts +0 -19
- package/dist/esm/core/ui-control-commands/action-class-tdk-v1.js +0 -20
- package/dist/esm/core/ui-control-commands/action-tdk-v1.d.ts +0 -10
- package/dist/esm/core/ui-control-commands/action-tdk-v1.js +0 -96
- package/dist/esm/execution/annotation-level.d.ts +0 -5
- package/dist/esm/execution/annotation-level.js +0 -6
- package/dist/esm/execution/ui-control-client-error.d.ts +0 -2
- package/dist/esm/execution/ui-control-client-error.js +0 -2
- package/dist/esm/execution/ui-controller-client-facade.d.ts +0 -15
- package/dist/esm/execution/ui-controller-client-facade.js +0 -1
- package/dist/esm/execution/ui-controller-client-grpc.d.ts +0 -24
- package/dist/esm/execution/ui-controller-client-grpc.js +0 -133
- package/dist/esm/execution/ui-controller-client-tdk-v1.d.ts +0 -26
- package/dist/esm/execution/ui-controller-client-tdk-v1.js +0 -195
- package/dist/esm/proto/Askui/API/TDKv1/ActionClassID.d.ts +0 -21
- package/dist/esm/proto/Askui/API/TDKv1/ActionClassID.js +0 -20
- package/dist/esm/proto/Askui/API/TDKv1/ActionParameters.d.ts +0 -57
- package/dist/esm/proto/Askui/API/TDKv1/ActionParameters.js +0 -2
- package/dist/esm/proto/Askui/API/TDKv1/ActionParameters_KeyboardKey_Press.d.ts +0 -8
- package/dist/esm/proto/Askui/API/TDKv1/ActionParameters_KeyboardKey_Press.js +0 -2
- package/dist/esm/proto/Askui/API/TDKv1/ActionParameters_KeyboardKey_PressAndRelease.d.ts +0 -8
- package/dist/esm/proto/Askui/API/TDKv1/ActionParameters_KeyboardKey_PressAndRelease.js +0 -2
- package/dist/esm/proto/Askui/API/TDKv1/ActionParameters_KeyboardKey_Release.d.ts +0 -8
- package/dist/esm/proto/Askui/API/TDKv1/ActionParameters_KeyboardKey_Release.js +0 -2
- package/dist/esm/proto/Askui/API/TDKv1/ActionParameters_KeyboardKeys_Press.d.ts +0 -8
- package/dist/esm/proto/Askui/API/TDKv1/ActionParameters_KeyboardKeys_Press.js +0 -2
- package/dist/esm/proto/Askui/API/TDKv1/ActionParameters_KeyboardKeys_PressAndRelease.d.ts +0 -8
- package/dist/esm/proto/Askui/API/TDKv1/ActionParameters_KeyboardKeys_PressAndRelease.js +0 -2
- package/dist/esm/proto/Askui/API/TDKv1/ActionParameters_KeyboardKeys_Release.d.ts +0 -8
- package/dist/esm/proto/Askui/API/TDKv1/ActionParameters_KeyboardKeys_Release.js +0 -2
- package/dist/esm/proto/Askui/API/TDKv1/ActionParameters_KeyboardType_Text.d.ts +0 -13
- package/dist/esm/proto/Askui/API/TDKv1/ActionParameters_KeyboardType_Text.js +0 -2
- package/dist/esm/proto/Askui/API/TDKv1/ActionParameters_KeyboardType_UnicodeText.d.ts +0 -14
- package/dist/esm/proto/Askui/API/TDKv1/ActionParameters_KeyboardType_UnicodeText.js +0 -2
- package/dist/esm/proto/Askui/API/TDKv1/ActionParameters_MouseButton_Press.d.ts +0 -7
- package/dist/esm/proto/Askui/API/TDKv1/ActionParameters_MouseButton_Press.js +0 -2
- package/dist/esm/proto/Askui/API/TDKv1/ActionParameters_MouseButton_PressAndRelease.d.ts +0 -9
- package/dist/esm/proto/Askui/API/TDKv1/ActionParameters_MouseButton_PressAndRelease.js +0 -2
- package/dist/esm/proto/Askui/API/TDKv1/ActionParameters_MouseButton_Release.d.ts +0 -7
- package/dist/esm/proto/Askui/API/TDKv1/ActionParameters_MouseButton_Release.js +0 -2
- package/dist/esm/proto/Askui/API/TDKv1/ActionParameters_MouseMove.d.ts +0 -11
- package/dist/esm/proto/Askui/API/TDKv1/ActionParameters_MouseMove.js +0 -2
- package/dist/esm/proto/Askui/API/TDKv1/ActionParameters_MouseMove_Delta.d.ts +0 -11
- package/dist/esm/proto/Askui/API/TDKv1/ActionParameters_MouseMove_Delta.js +0 -2
- package/dist/esm/proto/Askui/API/TDKv1/ActionParameters_MouseWheelScroll.d.ts +0 -14
- package/dist/esm/proto/Askui/API/TDKv1/ActionParameters_MouseWheelScroll.js +0 -2
- package/dist/esm/proto/Askui/API/TDKv1/ActionParameters_RunCommand.d.ts +0 -6
- package/dist/esm/proto/Askui/API/TDKv1/ActionParameters_RunCommand.js +0 -2
- package/dist/esm/proto/Askui/API/TDKv1/ActionParameters_Wait.d.ts +0 -6
- package/dist/esm/proto/Askui/API/TDKv1/ActionParameters_Wait.js +0 -2
- package/dist/esm/proto/Askui/API/TDKv1/Bitmap.d.ts +0 -17
- package/dist/esm/proto/Askui/API/TDKv1/Bitmap.js +0 -2
- package/dist/esm/proto/Askui/API/TDKv1/CaptureArea.d.ts +0 -13
- package/dist/esm/proto/Askui/API/TDKv1/CaptureArea.js +0 -2
- package/dist/esm/proto/Askui/API/TDKv1/Color.d.ts +0 -10
- package/dist/esm/proto/Askui/API/TDKv1/Color.js +0 -2
- package/dist/esm/proto/Askui/API/TDKv1/ControllerAPI.d.ts +0 -239
- package/dist/esm/proto/Askui/API/TDKv1/ControllerAPI.js +0 -2
- package/dist/esm/proto/Askui/API/TDKv1/Coordinate2.d.ts +0 -8
- package/dist/esm/proto/Askui/API/TDKv1/Coordinate2.js +0 -2
- package/dist/esm/proto/Askui/API/TDKv1/Delta2.d.ts +0 -8
- package/dist/esm/proto/Askui/API/TDKv1/Delta2.js +0 -2
- package/dist/esm/proto/Askui/API/TDKv1/DisplayInformation.d.ts +0 -14
- package/dist/esm/proto/Askui/API/TDKv1/DisplayInformation.js +0 -2
- package/dist/esm/proto/Askui/API/TDKv1/GUID.d.ts +0 -9
- package/dist/esm/proto/Askui/API/TDKv1/GUID.js +0 -2
- package/dist/esm/proto/Askui/API/TDKv1/MouseButton.d.ts +0 -8
- package/dist/esm/proto/Askui/API/TDKv1/MouseButton.js +0 -7
- package/dist/esm/proto/Askui/API/TDKv1/MouseWheelDeltaType.d.ts +0 -7
- package/dist/esm/proto/Askui/API/TDKv1/MouseWheelDeltaType.js +0 -6
- package/dist/esm/proto/Askui/API/TDKv1/MouseWheelScrollDirection.d.ts +0 -7
- package/dist/esm/proto/Askui/API/TDKv1/MouseWheelScrollDirection.js +0 -6
- package/dist/esm/proto/Askui/API/TDKv1/PollEventID.d.ts +0 -6
- package/dist/esm/proto/Askui/API/TDKv1/PollEventID.js +0 -5
- package/dist/esm/proto/Askui/API/TDKv1/PollEventParameters.d.ts +0 -9
- package/dist/esm/proto/Askui/API/TDKv1/PollEventParameters.js +0 -2
- package/dist/esm/proto/Askui/API/TDKv1/PollEventParameters_ActionFinished.d.ts +0 -6
- package/dist/esm/proto/Askui/API/TDKv1/PollEventParameters_ActionFinished.js +0 -2
- package/dist/esm/proto/Askui/API/TDKv1/Rectangle.d.ts +0 -12
- package/dist/esm/proto/Askui/API/TDKv1/Rectangle.js +0 -2
- package/dist/esm/proto/Askui/API/TDKv1/Request_CaptureScreen.d.ts +0 -12
- package/dist/esm/proto/Askui/API/TDKv1/Request_CaptureScreen.js +0 -2
- package/dist/esm/proto/Askui/API/TDKv1/Request_EndSession.d.ts +0 -7
- package/dist/esm/proto/Askui/API/TDKv1/Request_EndSession.js +0 -2
- package/dist/esm/proto/Askui/API/TDKv1/Request_GetAction.d.ts +0 -9
- package/dist/esm/proto/Askui/API/TDKv1/Request_GetAction.js +0 -2
- package/dist/esm/proto/Askui/API/TDKv1/Request_GetActionCount.d.ts +0 -7
- package/dist/esm/proto/Askui/API/TDKv1/Request_GetActionCount.js +0 -2
- package/dist/esm/proto/Askui/API/TDKv1/Request_GetColor.d.ts +0 -11
- package/dist/esm/proto/Askui/API/TDKv1/Request_GetColor.js +0 -2
- package/dist/esm/proto/Askui/API/TDKv1/Request_GetPixelColor.d.ts +0 -8
- package/dist/esm/proto/Askui/API/TDKv1/Request_GetPixelColor.js +0 -2
- package/dist/esm/proto/Askui/API/TDKv1/Request_Poll.d.ts +0 -10
- package/dist/esm/proto/Askui/API/TDKv1/Request_Poll.js +0 -2
- package/dist/esm/proto/Askui/API/TDKv1/Request_RemoveAction.d.ts +0 -9
- package/dist/esm/proto/Askui/API/TDKv1/Request_RemoveAction.js +0 -2
- package/dist/esm/proto/Askui/API/TDKv1/Request_RemoveAllActions.d.ts +0 -7
- package/dist/esm/proto/Askui/API/TDKv1/Request_RemoveAllActions.js +0 -2
- package/dist/esm/proto/Askui/API/TDKv1/Request_RunRecordedAction.d.ts +0 -13
- package/dist/esm/proto/Askui/API/TDKv1/Request_RunRecordedAction.js +0 -2
- package/dist/esm/proto/Askui/API/TDKv1/Request_ScheduleBatchedAction.d.ts +0 -13
- package/dist/esm/proto/Askui/API/TDKv1/Request_ScheduleBatchedAction.js +0 -2
- package/dist/esm/proto/Askui/API/TDKv1/Request_SetDisplayLabel.d.ts +0 -11
- package/dist/esm/proto/Askui/API/TDKv1/Request_SetDisplayLabel.js +0 -2
- package/dist/esm/proto/Askui/API/TDKv1/Request_SetKeyboardDelay.d.ts +0 -9
- package/dist/esm/proto/Askui/API/TDKv1/Request_SetKeyboardDelay.js +0 -2
- package/dist/esm/proto/Askui/API/TDKv1/Request_SetMouseDelay.d.ts +0 -9
- package/dist/esm/proto/Askui/API/TDKv1/Request_SetMouseDelay.js +0 -2
- package/dist/esm/proto/Askui/API/TDKv1/Request_StartBatchRun.d.ts +0 -7
- package/dist/esm/proto/Askui/API/TDKv1/Request_StartBatchRun.js +0 -2
- package/dist/esm/proto/Askui/API/TDKv1/Request_StartSession.d.ts +0 -8
- package/dist/esm/proto/Askui/API/TDKv1/Request_StartSession.js +0 -2
- package/dist/esm/proto/Askui/API/TDKv1/Request_StopBatchRun.d.ts +0 -7
- package/dist/esm/proto/Askui/API/TDKv1/Request_StopBatchRun.js +0 -2
- package/dist/esm/proto/Askui/API/TDKv1/Request_Void.d.ts +0 -4
- package/dist/esm/proto/Askui/API/TDKv1/Request_Void.js +0 -2
- package/dist/esm/proto/Askui/API/TDKv1/Response_CaptureScreen.d.ts +0 -7
- package/dist/esm/proto/Askui/API/TDKv1/Response_CaptureScreen.js +0 -2
- package/dist/esm/proto/Askui/API/TDKv1/Response_GetAction.d.ts +0 -12
- package/dist/esm/proto/Askui/API/TDKv1/Response_GetAction.js +0 -2
- package/dist/esm/proto/Askui/API/TDKv1/Response_GetActionCount.d.ts +0 -6
- package/dist/esm/proto/Askui/API/TDKv1/Response_GetActionCount.js +0 -2
- package/dist/esm/proto/Askui/API/TDKv1/Response_GetColor.d.ts +0 -7
- package/dist/esm/proto/Askui/API/TDKv1/Response_GetColor.js +0 -2
- package/dist/esm/proto/Askui/API/TDKv1/Response_GetContinuousCapturedScreen.d.ts +0 -7
- package/dist/esm/proto/Askui/API/TDKv1/Response_GetContinuousCapturedScreen.js +0 -2
- package/dist/esm/proto/Askui/API/TDKv1/Response_GetDisplayInformation.d.ts +0 -10
- package/dist/esm/proto/Askui/API/TDKv1/Response_GetDisplayInformation.js +0 -2
- package/dist/esm/proto/Askui/API/TDKv1/Response_GetMousePosition.d.ts +0 -8
- package/dist/esm/proto/Askui/API/TDKv1/Response_GetMousePosition.js +0 -2
- package/dist/esm/proto/Askui/API/TDKv1/Response_GetPixelColor.d.ts +0 -7
- package/dist/esm/proto/Askui/API/TDKv1/Response_GetPixelColor.js +0 -2
- package/dist/esm/proto/Askui/API/TDKv1/Response_Poll.d.ts +0 -10
- package/dist/esm/proto/Askui/API/TDKv1/Response_Poll.js +0 -2
- package/dist/esm/proto/Askui/API/TDKv1/Response_RunRecordedAction.d.ts +0 -6
- package/dist/esm/proto/Askui/API/TDKv1/Response_RunRecordedAction.js +0 -2
- package/dist/esm/proto/Askui/API/TDKv1/Response_ScheduleBatchedAction.d.ts +0 -6
- package/dist/esm/proto/Askui/API/TDKv1/Response_ScheduleBatchedAction.js +0 -2
- package/dist/esm/proto/Askui/API/TDKv1/Response_StartSession.d.ts +0 -7
- package/dist/esm/proto/Askui/API/TDKv1/Response_StartSession.js +0 -2
- package/dist/esm/proto/Askui/API/TDKv1/Response_Void.d.ts +0 -4
- package/dist/esm/proto/Askui/API/TDKv1/Response_Void.js +0 -2
- package/dist/esm/proto/Askui/API/TDKv1/Reuqest_SetTestConfiguration.d.ts +0 -14
- package/dist/esm/proto/Askui/API/TDKv1/Reuqest_SetTestConfiguration.js +0 -2
- package/dist/esm/proto/Askui/API/TDKv1/SessionInfo.d.ts +0 -10
- package/dist/esm/proto/Askui/API/TDKv1/SessionInfo.js +0 -2
- package/dist/esm/proto/Askui/API/TDKv1/Size2.d.ts +0 -8
- package/dist/esm/proto/Askui/API/TDKv1/Size2.js +0 -2
- package/dist/esm/proto/Askui/API/TDKv1/TypingSpeedValue.d.ts +0 -7
- package/dist/esm/proto/Askui/API/TDKv1/TypingSpeedValue.js +0 -6
- package/dist/esm/proto/Askui/API/TDKv1/VirtualScreen.d.ts +0 -10
- package/dist/esm/proto/Askui/API/TDKv1/VirtualScreen.js +0 -2
- package/dist/esm/proto/Askui/API/TDKv1/Void.d.ts +0 -4
- package/dist/esm/proto/Askui/API/TDKv1/Void.js +0 -2
- package/dist/esm/proto/tdk-v1.d.ts +0 -87
- package/dist/esm/proto/tdk-v1.js +0 -1
|
@@ -9,68 +9,83 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
};
|
|
10
10
|
import { DefaultStep } from './default-step';
|
|
11
11
|
import { logger } from '../../lib/logger';
|
|
12
|
+
import { maxSnapshotDetailLevel } from './snapshot-detail-level';
|
|
13
|
+
function buildReportersWithPromiseQueue(reporter) {
|
|
14
|
+
if (reporter === undefined) {
|
|
15
|
+
return [];
|
|
16
|
+
}
|
|
17
|
+
if (Array.isArray(reporter)) {
|
|
18
|
+
return reporter.map((r) => ({
|
|
19
|
+
reporter: r,
|
|
20
|
+
promiseQueue: Promise.resolve(),
|
|
21
|
+
}));
|
|
22
|
+
}
|
|
23
|
+
return [
|
|
24
|
+
{
|
|
25
|
+
reporter,
|
|
26
|
+
promiseQueue: Promise.resolve(),
|
|
27
|
+
},
|
|
28
|
+
];
|
|
29
|
+
}
|
|
12
30
|
export class StepReporter {
|
|
13
31
|
constructor(reporter) {
|
|
14
|
-
this.
|
|
32
|
+
this.reporters = buildReportersWithPromiseQueue(reporter);
|
|
33
|
+
this.config = {
|
|
34
|
+
withScreenshots: maxSnapshotDetailLevel(...this.reporters.map((r) => { var _a, _b; return (_b = (_a = r.reporter.config) === null || _a === void 0 ? void 0 : _a.withScreenshots) !== null && _b !== void 0 ? _b : 'onFailure'; })),
|
|
35
|
+
withDetectedElements: maxSnapshotDetailLevel(...this.reporters.map((r) => { var _a, _b; return (_b = (_a = r.reporter.config) === null || _a === void 0 ? void 0 : _a.withDetectedElements) !== null && _b !== void 0 ? _b : 'onFailure'; })),
|
|
36
|
+
};
|
|
15
37
|
}
|
|
16
|
-
|
|
17
|
-
return this.reporter.
|
|
38
|
+
flush() {
|
|
39
|
+
return Promise.all(this.reporters.map((reporter) => reporter.promiseQueue)).then(() => { });
|
|
40
|
+
}
|
|
41
|
+
get currentStep() {
|
|
42
|
+
return this._currentStep;
|
|
18
43
|
}
|
|
19
44
|
resetStep(instruction) {
|
|
20
|
-
this.
|
|
45
|
+
this._currentStep = new DefaultStep(instruction);
|
|
46
|
+
}
|
|
47
|
+
enqueueReporterCalls(type, step) {
|
|
48
|
+
this.reporters = this.reporters.map((reporter) => (Object.assign(Object.assign({}, reporter), { promiseQueue: reporter.promiseQueue
|
|
49
|
+
.then(() => { var _a, _b, _c; return (_c = (_b = (_a = reporter.reporter)[type]) === null || _b === void 0 ? void 0 : _b.call(_a, step)) !== null && _c !== void 0 ? _c : Promise.resolve(); })
|
|
50
|
+
.catch((error) => {
|
|
51
|
+
logger.error(error);
|
|
52
|
+
return Promise.resolve();
|
|
53
|
+
}) })));
|
|
21
54
|
}
|
|
22
55
|
onStepBegin(snapshot) {
|
|
23
|
-
var _a, _b;
|
|
24
56
|
return __awaiter(this, void 0, void 0, function* () {
|
|
25
|
-
if (this.
|
|
57
|
+
if (this._currentStep === undefined) {
|
|
26
58
|
throw new Error('Cannot begin step if step is undefined.');
|
|
27
59
|
}
|
|
28
|
-
if (this.
|
|
60
|
+
if (this._currentStep.status !== 'pending') {
|
|
29
61
|
throw new Error('Cannot begin step that is not pending.');
|
|
30
62
|
}
|
|
31
|
-
this.
|
|
32
|
-
|
|
33
|
-
yield ((_b = (_a = this.reporter).onStepBegin) === null || _b === void 0 ? void 0 : _b.call(_a, this.currentStep));
|
|
34
|
-
}
|
|
35
|
-
catch (reporterError) {
|
|
36
|
-
logger.error(reporterError);
|
|
37
|
-
}
|
|
63
|
+
this._currentStep = this._currentStep.onBegin(snapshot);
|
|
64
|
+
this.enqueueReporterCalls('onStepBegin', this._currentStep);
|
|
38
65
|
});
|
|
39
66
|
}
|
|
40
67
|
onStepRetry(snapshot, error) {
|
|
41
|
-
var _a, _b;
|
|
42
68
|
return __awaiter(this, void 0, void 0, function* () {
|
|
43
|
-
if (this.
|
|
69
|
+
if (this._currentStep === undefined) {
|
|
44
70
|
throw new Error('Cannot retry step if step is undefined.');
|
|
45
71
|
}
|
|
46
|
-
if (this.
|
|
72
|
+
if (this._currentStep.status !== 'running') {
|
|
47
73
|
throw new Error('Cannot retry step that has not been running.');
|
|
48
74
|
}
|
|
49
|
-
this.
|
|
50
|
-
|
|
51
|
-
yield ((_b = (_a = this.reporter).onStepRetry) === null || _b === void 0 ? void 0 : _b.call(_a, this.currentStep));
|
|
52
|
-
}
|
|
53
|
-
catch (reporterError) {
|
|
54
|
-
logger.error(reporterError);
|
|
55
|
-
}
|
|
75
|
+
this._currentStep = this._currentStep.onRetry(snapshot, error);
|
|
76
|
+
this.enqueueReporterCalls('onStepRetry', this._currentStep);
|
|
56
77
|
});
|
|
57
78
|
}
|
|
58
79
|
onStepEnd(snapshot, error) {
|
|
59
|
-
var _a, _b;
|
|
60
80
|
return __awaiter(this, void 0, void 0, function* () {
|
|
61
|
-
if (this.
|
|
81
|
+
if (this._currentStep === undefined) {
|
|
62
82
|
throw new Error('Cannot end step if step is undefined.');
|
|
63
83
|
}
|
|
64
|
-
if (this.
|
|
84
|
+
if (this._currentStep.status !== 'running') {
|
|
65
85
|
throw new Error('Cannot end step that has not been running.');
|
|
66
86
|
}
|
|
67
|
-
this.
|
|
68
|
-
|
|
69
|
-
yield ((_b = (_a = this.reporter).onStepEnd) === null || _b === void 0 ? void 0 : _b.call(_a, this.currentStep));
|
|
70
|
-
}
|
|
71
|
-
catch (reporterError) {
|
|
72
|
-
logger.error(reporterError);
|
|
73
|
-
}
|
|
87
|
+
this._currentStep = this._currentStep.onEnd(snapshot, error);
|
|
88
|
+
this.enqueueReporterCalls('onStepEnd', this._currentStep);
|
|
74
89
|
});
|
|
75
90
|
}
|
|
76
91
|
}
|
|
@@ -14,7 +14,7 @@ import { envCredentials } from './read-environment-credentials';
|
|
|
14
14
|
import { Analytics } from '../utils/analytics';
|
|
15
15
|
import { envProxyAgents } from '../utils/proxy/proxy-builder';
|
|
16
16
|
import { ExecutionRuntime } from './execution-runtime';
|
|
17
|
-
import {
|
|
17
|
+
import { StepReporter } from '../core/reporting';
|
|
18
18
|
export class UiControlClientDependencyBuilder {
|
|
19
19
|
static buildHttpClient(clientArgs) {
|
|
20
20
|
var _a;
|
|
@@ -46,22 +46,10 @@ export class UiControlClientDependencyBuilder {
|
|
|
46
46
|
};
|
|
47
47
|
});
|
|
48
48
|
}
|
|
49
|
-
static buildReporter(reporterArg) {
|
|
50
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
51
|
-
return {
|
|
52
|
-
config: {
|
|
53
|
-
withScreenshots: (_b = (_a = reporterArg === null || reporterArg === void 0 ? void 0 : reporterArg.config) === null || _a === void 0 ? void 0 : _a.withScreenshots) !== null && _b !== void 0 ? _b : DEFAULT_REPORTER.config.withScreenshots,
|
|
54
|
-
withDetectedElements: (_d = (_c = reporterArg === null || reporterArg === void 0 ? void 0 : reporterArg.config) === null || _c === void 0 ? void 0 : _c.withDetectedElements) !== null && _d !== void 0 ? _d : DEFAULT_REPORTER.config.withDetectedElements,
|
|
55
|
-
},
|
|
56
|
-
onStepBegin: (_f = (_e = reporterArg === null || reporterArg === void 0 ? void 0 : reporterArg.onStepBegin) === null || _e === void 0 ? void 0 : _e.bind(reporterArg)) !== null && _f !== void 0 ? _f : DEFAULT_REPORTER.onStepBegin.bind(DEFAULT_REPORTER),
|
|
57
|
-
onStepRetry: (_h = (_g = reporterArg === null || reporterArg === void 0 ? void 0 : reporterArg.onStepRetry) === null || _g === void 0 ? void 0 : _g.bind(reporterArg)) !== null && _h !== void 0 ? _h : DEFAULT_REPORTER.onStepRetry.bind(DEFAULT_REPORTER),
|
|
58
|
-
onStepEnd: (_k = (_j = reporterArg === null || reporterArg === void 0 ? void 0 : reporterArg.onStepEnd) === null || _j === void 0 ? void 0 : _j.bind(reporterArg)) !== null && _k !== void 0 ? _k : DEFAULT_REPORTER.onStepEnd.bind(DEFAULT_REPORTER),
|
|
59
|
-
};
|
|
60
|
-
}
|
|
61
49
|
static getClientArgsWithDefaults(clientArgs) {
|
|
62
50
|
var _a, _b, _c, _d;
|
|
63
51
|
return __awaiter(this, void 0, void 0, function* () {
|
|
64
|
-
return Object.assign(Object.assign({}, clientArgs), { uiControllerUrl: (_a = clientArgs.uiControllerUrl) !== null && _a !== void 0 ? _a : 'http://127.0.0.1:6769', inferenceServerUrl: (_b = clientArgs.inferenceServerUrl) !== null && _b !== void 0 ? _b : 'https://inference.askui.com', credentials: (_c = clientArgs.credentials) !== null && _c !== void 0 ? _c : envCredentials(), proxyAgents: (_d = clientArgs.proxyAgents) !== null && _d !== void 0 ? _d : yield envProxyAgents()
|
|
52
|
+
return Object.assign(Object.assign({}, clientArgs), { uiControllerUrl: (_a = clientArgs.uiControllerUrl) !== null && _a !== void 0 ? _a : 'http://127.0.0.1:6769', inferenceServerUrl: (_b = clientArgs.inferenceServerUrl) !== null && _b !== void 0 ? _b : 'https://inference.askui.com', credentials: (_c = clientArgs.credentials) !== null && _c !== void 0 ? _c : envCredentials(), proxyAgents: (_d = clientArgs.proxyAgents) !== null && _d !== void 0 ? _d : yield envProxyAgents() });
|
|
65
53
|
});
|
|
66
54
|
}
|
|
67
55
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CredentialArgs } from './credentials-args';
|
|
2
2
|
import { ProxyAgentArgs } from '../shared/proxy-agent-args';
|
|
3
3
|
import { ModelCompositionBranch } from './model-composition-branch';
|
|
4
|
-
import { Reporter
|
|
4
|
+
import { Reporter } from '../core/reporting';
|
|
5
5
|
/**
|
|
6
6
|
* Configuration options for the askui UI Control Client
|
|
7
7
|
*
|
|
@@ -21,7 +21,8 @@ import { Reporter, ReporterConfig } from '../core/reporting';
|
|
|
21
21
|
* the authentication of the askui Inference Server.
|
|
22
22
|
* You have three options: `DISABLED`, `ON_FAILURE`, `ALL`.
|
|
23
23
|
* @param {ProxyAgentArgs} proxyAgents - To configure the proxy agents for http(s) requests.
|
|
24
|
-
* @param {Reporter} reporter - To configure the reporter
|
|
24
|
+
* @param {Reporter | Reporter[]} reporter - To configure the reporter(s)
|
|
25
|
+
* to report on step runs/executions.
|
|
25
26
|
*/
|
|
26
27
|
export interface ClientArgs {
|
|
27
28
|
readonly uiControllerUrl?: string;
|
|
@@ -30,12 +31,9 @@ export interface ClientArgs {
|
|
|
30
31
|
readonly proxyAgents?: ProxyAgentArgs | undefined;
|
|
31
32
|
readonly resize?: number;
|
|
32
33
|
readonly modelComposition?: ModelCompositionBranch[];
|
|
33
|
-
readonly reporter?: Reporter | undefined;
|
|
34
|
+
readonly reporter?: Reporter | Reporter[] | undefined;
|
|
34
35
|
}
|
|
35
36
|
export interface ClientArgsWithDefaults extends ClientArgs {
|
|
36
37
|
readonly uiControllerUrl: string;
|
|
37
38
|
readonly inferenceServerUrl: string;
|
|
38
|
-
readonly reporter: Required<Reporter> & {
|
|
39
|
-
config: Required<ReporterConfig>;
|
|
40
|
-
};
|
|
41
39
|
}
|
|
@@ -1,18 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
import type sharp from 'sharp';
|
|
2
2
|
export declare class Base64Image {
|
|
3
|
-
private readonly aSharp;
|
|
4
|
-
private info;
|
|
5
3
|
private buffer;
|
|
6
4
|
static readonly strPrefix = "data:image/png;base64,";
|
|
5
|
+
private _sharp?;
|
|
7
6
|
private constructor();
|
|
8
|
-
private static fromSharp;
|
|
9
7
|
static fromPathOrString(pathOrStr: string): Promise<Base64Image>;
|
|
10
|
-
static fromPath(
|
|
8
|
+
static fromPath(filePath: string): Promise<Base64Image>;
|
|
11
9
|
static fromString(str: string): Promise<Base64Image>;
|
|
12
|
-
static fromBuffer
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
private static fromBuffer;
|
|
11
|
+
private getSharp;
|
|
12
|
+
getInfo(): Promise<sharp.OutputInfo>;
|
|
15
13
|
resizeToFitInto(dimension: number): Promise<Base64Image>;
|
|
16
14
|
toString(): string;
|
|
17
|
-
toBuffer(): Buffer;
|
|
18
15
|
}
|
|
@@ -7,36 +7,25 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
7
7
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
|
-
import
|
|
10
|
+
import fs from 'fs';
|
|
11
|
+
import { getSharpFactory } from './sharp';
|
|
11
12
|
import { Base64ImageStringError } from './base-64-image-string-error';
|
|
12
13
|
export class Base64Image {
|
|
13
|
-
constructor(
|
|
14
|
-
this.aSharp = aSharp;
|
|
15
|
-
this.info = info;
|
|
14
|
+
constructor(buffer) {
|
|
16
15
|
this.buffer = buffer;
|
|
17
16
|
}
|
|
18
|
-
static fromSharp(s) {
|
|
19
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
20
|
-
const { info, data } = yield s.toBuffer({ resolveWithObject: true });
|
|
21
|
-
return new Base64Image(s, info, data);
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
17
|
static fromPathOrString(pathOrStr) {
|
|
25
18
|
return __awaiter(this, void 0, void 0, function* () {
|
|
26
|
-
|
|
27
|
-
return
|
|
28
|
-
}
|
|
29
|
-
catch (error) {
|
|
30
|
-
if (!(error instanceof Base64ImageStringError)) {
|
|
31
|
-
throw error;
|
|
32
|
-
}
|
|
19
|
+
if (pathOrStr.startsWith(Base64Image.strPrefix)) {
|
|
20
|
+
return Base64Image.fromString(pathOrStr);
|
|
33
21
|
}
|
|
34
22
|
return Base64Image.fromPath(pathOrStr);
|
|
35
23
|
});
|
|
36
24
|
}
|
|
37
|
-
static fromPath(
|
|
25
|
+
static fromPath(filePath) {
|
|
38
26
|
return __awaiter(this, void 0, void 0, function* () {
|
|
39
|
-
|
|
27
|
+
const data = yield fs.promises.readFile(filePath, 'base64');
|
|
28
|
+
return Base64Image.fromString(`${Base64Image.strPrefix}${data}`);
|
|
40
29
|
});
|
|
41
30
|
}
|
|
42
31
|
static fromString(str) {
|
|
@@ -45,35 +34,45 @@ export class Base64Image {
|
|
|
45
34
|
throw new Base64ImageStringError(str, Base64Image.strPrefix);
|
|
46
35
|
}
|
|
47
36
|
const data = str.substring(Base64Image.strPrefix.length);
|
|
48
|
-
return Base64Image
|
|
37
|
+
return new Base64Image(Buffer.from(data, 'base64'));
|
|
49
38
|
});
|
|
50
39
|
}
|
|
51
40
|
static fromBuffer(buffer) {
|
|
52
41
|
return __awaiter(this, void 0, void 0, function* () {
|
|
53
|
-
return Base64Image
|
|
42
|
+
return new Base64Image(buffer);
|
|
54
43
|
});
|
|
55
44
|
}
|
|
56
|
-
|
|
57
|
-
return this
|
|
45
|
+
getSharp() {
|
|
46
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
47
|
+
if (this._sharp === undefined) {
|
|
48
|
+
const createSharp = yield getSharpFactory();
|
|
49
|
+
this._sharp = createSharp(this.buffer);
|
|
50
|
+
}
|
|
51
|
+
return this._sharp;
|
|
52
|
+
});
|
|
58
53
|
}
|
|
59
|
-
|
|
60
|
-
return this
|
|
54
|
+
getInfo() {
|
|
55
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
56
|
+
return (yield this.getSharp())
|
|
57
|
+
.toBuffer({ resolveWithObject: true })
|
|
58
|
+
.then(({ info }) => info);
|
|
59
|
+
});
|
|
61
60
|
}
|
|
62
61
|
resizeToFitInto(dimension) {
|
|
63
62
|
return __awaiter(this, void 0, void 0, function* () {
|
|
64
|
-
const
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
63
|
+
const { width, height } = yield this.getInfo();
|
|
64
|
+
const buffer = yield (yield this.getSharp())
|
|
65
|
+
.resize({
|
|
66
|
+
width: width >= height ? dimension : undefined,
|
|
67
|
+
height: height > width ? dimension : undefined,
|
|
68
|
+
fit: 'contain',
|
|
69
|
+
})
|
|
70
|
+
.toBuffer();
|
|
69
71
|
return Base64Image.fromBuffer(buffer);
|
|
70
72
|
});
|
|
71
73
|
}
|
|
72
74
|
toString() {
|
|
73
75
|
return `${Base64Image.strPrefix}${this.buffer.toString('base64')}`;
|
|
74
76
|
}
|
|
75
|
-
toBuffer() {
|
|
76
|
-
return this.buffer;
|
|
77
|
-
}
|
|
78
77
|
}
|
|
79
78
|
Base64Image.strPrefix = 'data:image/png;base64,';
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
let lazilyInitializedSharpFactory;
|
|
11
|
+
class SharpImportError extends Error {
|
|
12
|
+
}
|
|
13
|
+
function dynamicallyImportSharp() {
|
|
14
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
15
|
+
try {
|
|
16
|
+
const sharp = yield import('sharp');
|
|
17
|
+
return sharp.default;
|
|
18
|
+
}
|
|
19
|
+
catch (err) {
|
|
20
|
+
throw new SharpImportError('Can\'t find "sharp" module to do resizing of image!'
|
|
21
|
+
+ ' Please, install sharp for resizing support with'
|
|
22
|
+
+ ' "npm install --save-dev sharp" or "npm install --save sharp".');
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
export function getSharpFactory() {
|
|
27
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
28
|
+
if (lazilyInitializedSharpFactory === undefined) {
|
|
29
|
+
lazilyInitializedSharpFactory = yield dynamicallyImportSharp();
|
|
30
|
+
}
|
|
31
|
+
return lazilyInitializedSharpFactory;
|
|
32
|
+
});
|
|
33
|
+
}
|
|
@@ -17,7 +17,9 @@ function dynmicImportHpagent() {
|
|
|
17
17
|
return yield import('hpagent');
|
|
18
18
|
}
|
|
19
19
|
catch (err) {
|
|
20
|
-
throw new ProxyImportError('Can\'t find "hpagent" module to configure proxy!
|
|
20
|
+
throw new ProxyImportError('Can\'t find "hpagent" module to configure proxy!'
|
|
21
|
+
+ ' Please, install hpagent for proxy support with'
|
|
22
|
+
+ ' "npm install --save-dev hpagent" or "npm install --save hpagent".');
|
|
21
23
|
}
|
|
22
24
|
});
|
|
23
25
|
}
|
|
@@ -25,13 +25,15 @@ export function resizeBase64ImageWithSameRatio(base64ImageString, maxEdge = 1400
|
|
|
25
25
|
logger.debug('Image resizing');
|
|
26
26
|
try {
|
|
27
27
|
const image = yield Base64Image.fromString(base64ImageString);
|
|
28
|
-
|
|
28
|
+
const imageInfo = yield image.getInfo();
|
|
29
|
+
if (imageInfo.height <= maxEdge && imageInfo.width <= maxEdge) {
|
|
29
30
|
return { base64Image: base64ImageString, resizeRatio: 1 };
|
|
30
31
|
}
|
|
31
32
|
const resizedImage = yield image.resizeToFitInto(maxEdge);
|
|
33
|
+
const resizedImageInfo = yield resizedImage.getInfo();
|
|
32
34
|
return {
|
|
33
35
|
base64Image: resizedImage.toString(),
|
|
34
|
-
resizeRatio:
|
|
36
|
+
resizeRatio: imageInfo.width / resizedImageInfo.width,
|
|
35
37
|
};
|
|
36
38
|
}
|
|
37
39
|
catch (error) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "askui",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "askui GmbH <info@askui.com> (http://www.askui.com/)",
|
|
6
6
|
"description": "Reliable, automated end-to-end-testing that depends on what is shown on your screen instead of the technology you are running on",
|
|
@@ -54,10 +54,10 @@
|
|
|
54
54
|
"fs-extra": "10.0.0",
|
|
55
55
|
"got": "11.8.6",
|
|
56
56
|
"jsdom": "20.0.0",
|
|
57
|
+
"lodash": "^4.17.21",
|
|
57
58
|
"node-machine-id": "1.1.12",
|
|
58
59
|
"pino": "7.8.1",
|
|
59
60
|
"pino-pretty": "7.5.3",
|
|
60
|
-
"sharp": "0.30.6",
|
|
61
61
|
"tough-cookie": "4.1.2",
|
|
62
62
|
"url-join": "4.0.1",
|
|
63
63
|
"wait-port": "0.2.9",
|
|
@@ -75,14 +75,17 @@
|
|
|
75
75
|
"@types/ws": "7.4.4",
|
|
76
76
|
"hpagent": "^1.2.0",
|
|
77
77
|
"jest": "28.1.1",
|
|
78
|
+
"jest-extended": "^4.0.1",
|
|
78
79
|
"proxy": "^1.0.2",
|
|
79
80
|
"proxy-agent": "^5.0.0",
|
|
80
|
-
"sharp": "0.30.6",
|
|
81
81
|
"shx": "0.3.4",
|
|
82
82
|
"ts-jest": "28.0.4",
|
|
83
83
|
"typescript": "4.5.4"
|
|
84
84
|
},
|
|
85
85
|
"lint-staged": {
|
|
86
86
|
"./**/*.{js,ts}": "eslint --cache --fix --max-warnings 0"
|
|
87
|
+
},
|
|
88
|
+
"optionalDependencies": {
|
|
89
|
+
"sharp": "^0.32.6"
|
|
87
90
|
}
|
|
88
91
|
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Step } from './step';
|
|
2
|
-
export declare const DEFAULT_REPORTER: {
|
|
3
|
-
config: {
|
|
4
|
-
readonly withScreenshots: "onFailure";
|
|
5
|
-
readonly withDetectedElements: "onFailure";
|
|
6
|
-
};
|
|
7
|
-
onStepBegin: (_step: Step) => Promise<void>;
|
|
8
|
-
onStepRetry: (_step: Step) => Promise<void>;
|
|
9
|
-
onStepEnd: (_step: Step) => Promise<void>;
|
|
10
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DEFAULT_REPORTER = void 0;
|
|
4
|
-
exports.DEFAULT_REPORTER = {
|
|
5
|
-
config: {
|
|
6
|
-
withScreenshots: 'onFailure',
|
|
7
|
-
withDetectedElements: 'onFailure',
|
|
8
|
-
},
|
|
9
|
-
onStepBegin: (_step) => Promise.resolve(),
|
|
10
|
-
onStepRetry: (_step) => Promise.resolve(),
|
|
11
|
-
onStepEnd: (_step) => Promise.resolve(),
|
|
12
|
-
};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export declare enum ActionClassIdTdkV1 {
|
|
2
|
-
ActionClassID_Undefined = "ActionClassID_Undefined",
|
|
3
|
-
ActionClassID_Wait = "ActionClassID_Wait",
|
|
4
|
-
ActionClassID_MouseButton_Press = "ActionClassID_MouseButton_Press",
|
|
5
|
-
ActionClassID_MouseButton_Release = "ActionClassID_MouseButton_Release",
|
|
6
|
-
ActionClassID_MouseButton_PressAndRelease = "ActionClassID_MouseButton_PressAndRelease",
|
|
7
|
-
ActionClassID_MouseWheelScroll = "ActionClassID_MouseWheelScroll",
|
|
8
|
-
ActionClassID_MouseMove = "ActionClassID_MouseMove",
|
|
9
|
-
ActionClassID_MouseMove_Delta = "ActionClassID_MouseMove_Delta",
|
|
10
|
-
ActionClassID_KeyboardKey_Press = "ActionClassID_KeyboardKey_Press",
|
|
11
|
-
ActionClassID_KeyboardKey_Release = "ActionClassID_KeyboardKey_Release",
|
|
12
|
-
ActionClassID_KeyboardKey_PressAndRelease = "ActionClassID_KeyboardKey_PressAndRelease",
|
|
13
|
-
ActionClassID_KeyboardKeys_Press = "ActionClassID_KeyboardKeys_Press",
|
|
14
|
-
ActionClassID_KeyboardKeys_Release = "ActionClassID_KeyboardKeys_Release",
|
|
15
|
-
ActionClassID_KeyboardKeys_PressAndRelease = "ActionClassID_KeyboardKeys_PressAndRelease",
|
|
16
|
-
ActionClassID_KeyboardType_Text = "ActionClassID_KeyboardType_Text",
|
|
17
|
-
ActionClassID_KeyboardType_UnicodeText = "ActionClassID_KeyboardType_UnicodeText",
|
|
18
|
-
ActionClassID_RunCommand = "ActionClassID_RunCommand"
|
|
19
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ActionClassIdTdkV1 = void 0;
|
|
4
|
-
var ActionClassIdTdkV1;
|
|
5
|
-
(function (ActionClassIdTdkV1) {
|
|
6
|
-
ActionClassIdTdkV1["ActionClassID_Undefined"] = "ActionClassID_Undefined";
|
|
7
|
-
ActionClassIdTdkV1["ActionClassID_Wait"] = "ActionClassID_Wait";
|
|
8
|
-
ActionClassIdTdkV1["ActionClassID_MouseButton_Press"] = "ActionClassID_MouseButton_Press";
|
|
9
|
-
ActionClassIdTdkV1["ActionClassID_MouseButton_Release"] = "ActionClassID_MouseButton_Release";
|
|
10
|
-
ActionClassIdTdkV1["ActionClassID_MouseButton_PressAndRelease"] = "ActionClassID_MouseButton_PressAndRelease";
|
|
11
|
-
ActionClassIdTdkV1["ActionClassID_MouseWheelScroll"] = "ActionClassID_MouseWheelScroll";
|
|
12
|
-
ActionClassIdTdkV1["ActionClassID_MouseMove"] = "ActionClassID_MouseMove";
|
|
13
|
-
ActionClassIdTdkV1["ActionClassID_MouseMove_Delta"] = "ActionClassID_MouseMove_Delta";
|
|
14
|
-
ActionClassIdTdkV1["ActionClassID_KeyboardKey_Press"] = "ActionClassID_KeyboardKey_Press";
|
|
15
|
-
ActionClassIdTdkV1["ActionClassID_KeyboardKey_Release"] = "ActionClassID_KeyboardKey_Release";
|
|
16
|
-
ActionClassIdTdkV1["ActionClassID_KeyboardKey_PressAndRelease"] = "ActionClassID_KeyboardKey_PressAndRelease";
|
|
17
|
-
ActionClassIdTdkV1["ActionClassID_KeyboardKeys_Press"] = "ActionClassID_KeyboardKeys_Press";
|
|
18
|
-
ActionClassIdTdkV1["ActionClassID_KeyboardKeys_Release"] = "ActionClassID_KeyboardKeys_Release";
|
|
19
|
-
ActionClassIdTdkV1["ActionClassID_KeyboardKeys_PressAndRelease"] = "ActionClassID_KeyboardKeys_PressAndRelease";
|
|
20
|
-
ActionClassIdTdkV1["ActionClassID_KeyboardType_Text"] = "ActionClassID_KeyboardType_Text";
|
|
21
|
-
ActionClassIdTdkV1["ActionClassID_KeyboardType_UnicodeText"] = "ActionClassID_KeyboardType_UnicodeText";
|
|
22
|
-
ActionClassIdTdkV1["ActionClassID_RunCommand"] = "ActionClassID_RunCommand";
|
|
23
|
-
})(ActionClassIdTdkV1 = exports.ActionClassIdTdkV1 || (exports.ActionClassIdTdkV1 = {}));
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { ActionParameters } from '../../proto/Askui/API/TDKv1/ActionParameters';
|
|
2
|
-
import { ActionClassIdTdkV1 } from './action-class-tdk-v1';
|
|
3
|
-
import { Action } from './action';
|
|
4
|
-
export declare class ActionTdkV1 {
|
|
5
|
-
actionClassID: ActionClassIdTdkV1;
|
|
6
|
-
actionParameters: ActionParameters;
|
|
7
|
-
constructor(actionClassID: ActionClassIdTdkV1, actionParameters: ActionParameters);
|
|
8
|
-
static fromJson(json: unknown, _resizeRatio?: number): ActionTdkV1;
|
|
9
|
-
static fromAction(action: Action, _resizeRatio?: number): ActionTdkV1;
|
|
10
|
-
}
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ActionTdkV1 = void 0;
|
|
4
|
-
const action_class_tdk_v1_1 = require("./action-class-tdk-v1");
|
|
5
|
-
const actionMapper = {
|
|
6
|
-
NO_COMMAND: (_action) => [
|
|
7
|
-
action_class_tdk_v1_1.ActionClassIdTdkV1.ActionClassID_Undefined,
|
|
8
|
-
{},
|
|
9
|
-
],
|
|
10
|
-
MOUSE_CLICK_LEFT: (_action) => [
|
|
11
|
-
action_class_tdk_v1_1.ActionClassIdTdkV1.ActionClassID_MouseButton_PressAndRelease,
|
|
12
|
-
{ mouseButtonPressAndRelease: { count: 1, mouseButton: 'MouseButton_Left' } },
|
|
13
|
-
],
|
|
14
|
-
MOUSE_CLICK_RIGHT: (_action) => [
|
|
15
|
-
action_class_tdk_v1_1.ActionClassIdTdkV1.ActionClassID_MouseButton_PressAndRelease,
|
|
16
|
-
{ mouseButtonPressAndRelease: { count: 1, mouseButton: 'MouseButton_Right' } },
|
|
17
|
-
],
|
|
18
|
-
MOUSE_CLICK_MIDDLE: (_action) => [
|
|
19
|
-
action_class_tdk_v1_1.ActionClassIdTdkV1.ActionClassID_MouseButton_PressAndRelease,
|
|
20
|
-
{ mouseButtonPressAndRelease: { count: 1, mouseButton: 'MouseButton_Middle' } },
|
|
21
|
-
],
|
|
22
|
-
MOUSE_CLICK_DOUBLE_LEFT: (_action) => [
|
|
23
|
-
action_class_tdk_v1_1.ActionClassIdTdkV1.ActionClassID_MouseButton_PressAndRelease,
|
|
24
|
-
{ mouseButtonPressAndRelease: { count: 2, mouseButton: 'MouseButton_Left' } },
|
|
25
|
-
],
|
|
26
|
-
MOUSE_CLICK_DOUBLE_RIGHT: (_action) => [
|
|
27
|
-
action_class_tdk_v1_1.ActionClassIdTdkV1.ActionClassID_MouseButton_PressAndRelease,
|
|
28
|
-
{ mouseButtonPressAndRelease: { count: 2, mouseButton: 'MouseButton_Right' } },
|
|
29
|
-
],
|
|
30
|
-
MOUSE_CLICK_DOUBLE_MIDDLE: (_action) => [
|
|
31
|
-
action_class_tdk_v1_1.ActionClassIdTdkV1.ActionClassID_MouseButton_PressAndRelease,
|
|
32
|
-
{ mouseButtonPressAndRelease: { count: 2, mouseButton: 'MouseButton_Middle' } },
|
|
33
|
-
],
|
|
34
|
-
MOUSE_SCROLL: (action) => [
|
|
35
|
-
action_class_tdk_v1_1.ActionClassIdTdkV1.ActionClassID_MouseWheelScroll,
|
|
36
|
-
{
|
|
37
|
-
mouseWheelScroll: {
|
|
38
|
-
direction: action.position.x !== 0
|
|
39
|
-
? 'MouseWheelScrollDirection_Horizontal'
|
|
40
|
-
: 'MouseWheelScrollDirection_Vertical',
|
|
41
|
-
delta: action.position.x !== 0 ? action.position.x : action.position.y,
|
|
42
|
-
},
|
|
43
|
-
},
|
|
44
|
-
],
|
|
45
|
-
TYPE_TEXT: (_action) => [
|
|
46
|
-
action_class_tdk_v1_1.ActionClassIdTdkV1.ActionClassID_Undefined,
|
|
47
|
-
{},
|
|
48
|
-
],
|
|
49
|
-
TYPE: (action) => [
|
|
50
|
-
action_class_tdk_v1_1.ActionClassIdTdkV1.ActionClassID_KeyboardType_UnicodeText,
|
|
51
|
-
{ keyboardTypeUnicodeText: { text: action.text } },
|
|
52
|
-
],
|
|
53
|
-
PRESS_KEY_SEQUENCE: (_action) => [
|
|
54
|
-
action_class_tdk_v1_1.ActionClassIdTdkV1.ActionClassID_Undefined,
|
|
55
|
-
{},
|
|
56
|
-
],
|
|
57
|
-
PRESS_ANDROID_KEY_SEQUENCE: (_action) => [
|
|
58
|
-
action_class_tdk_v1_1.ActionClassIdTdkV1.ActionClassID_Undefined,
|
|
59
|
-
{},
|
|
60
|
-
],
|
|
61
|
-
PRESS_ANDROID_SINGLE_KEY: (_action) => [
|
|
62
|
-
action_class_tdk_v1_1.ActionClassIdTdkV1.ActionClassID_Undefined,
|
|
63
|
-
{},
|
|
64
|
-
],
|
|
65
|
-
MOUSE_MOVE_RELATIVELY: (action) => [
|
|
66
|
-
action_class_tdk_v1_1.ActionClassIdTdkV1.ActionClassID_MouseMove_Delta,
|
|
67
|
-
{ mouseMoveDelta: { delta: { x: action.position.x, y: action.position.y } } },
|
|
68
|
-
],
|
|
69
|
-
MOUSE_MOVE: (action) => [
|
|
70
|
-
action_class_tdk_v1_1.ActionClassIdTdkV1.ActionClassID_MouseMove,
|
|
71
|
-
{ mouseMove: { position: { x: action.position.x, y: action.position.y } } },
|
|
72
|
-
],
|
|
73
|
-
MOUSE_DOWN: (_action) => [
|
|
74
|
-
action_class_tdk_v1_1.ActionClassIdTdkV1.ActionClassID_MouseButton_Press,
|
|
75
|
-
{ mouseButtonPress: { mouseButton: 'MouseButton_Left' } },
|
|
76
|
-
],
|
|
77
|
-
MOUSE_UP: (_action) => [
|
|
78
|
-
action_class_tdk_v1_1.ActionClassIdTdkV1.ActionClassID_MouseButton_Release,
|
|
79
|
-
{ mouseButtonPress: { mouseButton: 'MouseButton_Left' } },
|
|
80
|
-
],
|
|
81
|
-
EXECUTE_COMMAND: (_action) => [
|
|
82
|
-
action_class_tdk_v1_1.ActionClassIdTdkV1.ActionClassID_Undefined,
|
|
83
|
-
{},
|
|
84
|
-
],
|
|
85
|
-
};
|
|
86
|
-
class ActionTdkV1 {
|
|
87
|
-
constructor(actionClassID, actionParameters) {
|
|
88
|
-
this.actionClassID = actionClassID;
|
|
89
|
-
this.actionParameters = actionParameters;
|
|
90
|
-
}
|
|
91
|
-
static fromJson(json, _resizeRatio = 1) {
|
|
92
|
-
const actionTdk = json;
|
|
93
|
-
return new ActionTdkV1(action_class_tdk_v1_1.ActionClassIdTdkV1[actionTdk.actionClassID], actionTdk.actionParameters);
|
|
94
|
-
}
|
|
95
|
-
static fromAction(action, _resizeRatio = 1) {
|
|
96
|
-
const [classId, parameters] = actionMapper[action.inputEvent](action);
|
|
97
|
-
return new ActionTdkV1(classId, parameters);
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
exports.ActionTdkV1 = ActionTdkV1;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AnnotationLevel = void 0;
|
|
4
|
-
var AnnotationLevel;
|
|
5
|
-
(function (AnnotationLevel) {
|
|
6
|
-
AnnotationLevel["DISABLED"] = "disabled";
|
|
7
|
-
AnnotationLevel["ON_FAILURE"] = "onFailure";
|
|
8
|
-
AnnotationLevel["ALL"] = "all";
|
|
9
|
-
})(AnnotationLevel = exports.AnnotationLevel || (exports.AnnotationLevel = {}));
|