@testmuai/playwright-bindings 0.1.44-beta.1 → 0.1.45-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +28 -0
- package/dist/configure.d.ts +3 -0
- package/dist/configure.d.ts.map +1 -1
- package/dist/configure.js +8 -0
- package/dist/configure.js.map +1 -1
- package/dist/errors.d.ts +6 -0
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +9 -0
- package/dist/errors.js.map +1 -1
- package/dist/index.d.ts +87 -100
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +71 -37
- package/dist/index.js.map +1 -1
- package/dist/router.d.ts +53 -0
- package/dist/router.d.ts.map +1 -0
- package/dist/router.js +137 -0
- package/dist/router.js.map +1 -0
- package/dist/v3/actionEngine.d.ts.map +1 -0
- package/dist/v3/actionEngine.js +194 -0
- package/dist/v3/actionEngine.js.map +1 -0
- package/dist/v3/actionSpecs.d.ts.map +1 -0
- package/dist/v3/actionSpecs.js +354 -0
- package/dist/v3/actionSpecs.js.map +1 -0
- package/dist/v3/capability.d.ts.map +1 -0
- package/dist/v3/capability.js +346 -0
- package/dist/v3/capability.js.map +1 -0
- package/dist/v3/downloadsPath.d.ts.map +1 -0
- package/dist/v3/downloadsPath.js.map +1 -0
- package/dist/v3/healCache.d.ts.map +1 -0
- package/dist/v3/healCache.js.map +1 -0
- package/dist/v3/healPatch.d.ts +22 -0
- package/dist/v3/healPatch.d.ts.map +1 -0
- package/dist/v3/healPatch.js +345 -0
- package/dist/v3/healPatch.js.map +1 -0
- package/dist/v3/helpers/a11yFlatten.d.ts.map +1 -0
- package/dist/v3/helpers/a11yFlatten.js +569 -0
- package/dist/v3/helpers/a11yFlatten.js.map +1 -0
- package/dist/v3/helpers/apiCalls.d.ts.map +1 -0
- package/dist/v3/helpers/apiCalls.js +59 -0
- package/dist/v3/helpers/apiCalls.js.map +1 -0
- package/dist/v3/helpers/assertion.d.ts.map +1 -0
- package/dist/v3/helpers/assertion.js +105 -0
- package/dist/v3/helpers/assertion.js.map +1 -0
- package/dist/v3/helpers/assertionV3.d.ts.map +1 -0
- package/dist/v3/helpers/assertionV3.js.map +1 -0
- package/dist/v3/helpers/autohealAx.d.ts.map +1 -0
- package/dist/v3/helpers/autohealAx.js +148 -0
- package/dist/v3/helpers/autohealAx.js.map +1 -0
- package/dist/v3/helpers/axTree/actionable.d.ts.map +1 -0
- package/dist/v3/helpers/axTree/actionable.js +404 -0
- package/dist/v3/helpers/axTree/actionable.js.map +1 -0
- package/dist/v3/helpers/axTree/captureAxTree.d.ts.map +1 -0
- package/dist/v3/helpers/axTree/captureAxTree.js.map +1 -0
- package/dist/v3/helpers/axTree/captureFrameForest.d.ts.map +1 -0
- package/dist/v3/helpers/axTree/captureFrameForest.js +475 -0
- package/dist/v3/helpers/axTree/captureFrameForest.js.map +1 -0
- package/dist/v3/helpers/axTree/index.d.ts.map +1 -0
- package/dist/v3/helpers/axTree/index.js.map +1 -0
- package/dist/v3/helpers/axTree/serializeAxTree.d.ts.map +1 -0
- package/dist/v3/helpers/axTree/serializeAxTree.js.map +1 -0
- package/dist/v3/helpers/clipboard-intercept.d.ts.map +1 -0
- package/dist/v3/helpers/clipboard-intercept.js.map +1 -0
- package/dist/v3/helpers/clipboard.d.ts.map +1 -0
- package/dist/v3/helpers/clipboard.js.map +1 -0
- package/dist/v3/helpers/condition.d.ts +100 -0
- package/dist/v3/helpers/condition.d.ts.map +1 -0
- package/dist/v3/helpers/condition.js +356 -0
- package/dist/v3/helpers/condition.js.map +1 -0
- package/dist/v3/helpers/cookies.d.ts.map +1 -0
- package/dist/v3/helpers/cookies.js +66 -0
- package/dist/v3/helpers/cookies.js.map +1 -0
- package/dist/v3/helpers/coordinateResolver.d.ts.map +1 -0
- package/dist/v3/helpers/coordinateResolver.js +118 -0
- package/dist/v3/helpers/coordinateResolver.js.map +1 -0
- package/dist/v3/helpers/coordinateResolverRead.d.ts.map +1 -0
- package/dist/v3/helpers/coordinateResolverRead.js +107 -0
- package/dist/v3/helpers/coordinateResolverRead.js.map +1 -0
- package/dist/v3/helpers/credits.d.ts.map +1 -0
- package/dist/v3/helpers/credits.js +52 -0
- package/dist/v3/helpers/credits.js.map +1 -0
- package/dist/v3/helpers/derive.d.ts.map +1 -0
- package/dist/v3/helpers/derive.js +87 -0
- package/dist/v3/helpers/derive.js.map +1 -0
- package/dist/v3/helpers/devtools.d.ts.map +1 -0
- package/dist/v3/helpers/devtools.js +1215 -0
- package/dist/v3/helpers/devtools.js.map +1 -0
- package/dist/v3/helpers/dialog.d.ts.map +1 -0
- package/dist/v3/helpers/dialog.js.map +1 -0
- package/dist/v3/helpers/drag.d.ts.map +1 -0
- package/dist/v3/helpers/drag.js +276 -0
- package/dist/v3/helpers/drag.js.map +1 -0
- package/dist/v3/helpers/evaluation/colors.d.ts.map +1 -0
- package/dist/v3/helpers/evaluation/colors.js.map +1 -0
- package/dist/v3/helpers/evaluation/evaluate.d.ts.map +1 -0
- package/dist/v3/helpers/evaluation/evaluate.js.map +1 -0
- package/dist/v3/helpers/executeApi.d.ts.map +1 -0
- package/dist/v3/helpers/executeApi.js +373 -0
- package/dist/v3/helpers/executeApi.js.map +1 -0
- package/dist/v3/helpers/executeDb.d.ts.map +1 -0
- package/dist/v3/helpers/executeDb.js +54 -0
- package/dist/v3/helpers/executeDb.js.map +1 -0
- package/dist/v3/helpers/executeJs.d.ts.map +1 -0
- package/dist/v3/helpers/executeJs.js +93 -0
- package/dist/v3/helpers/executeJs.js.map +1 -0
- package/dist/v3/helpers/gesture.d.ts.map +1 -0
- package/dist/v3/helpers/gesture.js +131 -0
- package/dist/v3/helpers/gesture.js.map +1 -0
- package/dist/v3/helpers/healCascade.d.ts.map +1 -0
- package/dist/v3/helpers/healCascade.js +418 -0
- package/dist/v3/helpers/healCascade.js.map +1 -0
- package/dist/v3/helpers/iframeA11y.d.ts.map +1 -0
- package/dist/v3/helpers/iframeA11y.js +128 -0
- package/dist/v3/helpers/iframeA11y.js.map +1 -0
- package/dist/v3/helpers/kaneCli.d.ts.map +1 -0
- package/dist/v3/helpers/kaneCli.js +319 -0
- package/dist/v3/helpers/kaneCli.js.map +1 -0
- package/dist/v3/helpers/loop.d.ts +4 -0
- package/dist/v3/helpers/loop.d.ts.map +1 -0
- package/dist/v3/helpers/loop.js +4 -0
- package/dist/v3/helpers/loop.js.map +1 -0
- package/dist/v3/helpers/math.d.ts.map +1 -0
- package/dist/v3/helpers/math.js +119 -0
- package/dist/v3/helpers/math.js.map +1 -0
- package/dist/v3/helpers/network.d.ts.map +1 -0
- package/dist/v3/helpers/network.js +185 -0
- package/dist/v3/helpers/network.js.map +1 -0
- package/dist/v3/helpers/pageReady.d.ts.map +1 -0
- package/dist/v3/helpers/pageReady.js +85 -0
- package/dist/v3/helpers/pageReady.js.map +1 -0
- package/dist/v3/helpers/png.d.ts.map +1 -0
- package/dist/v3/helpers/png.js.map +1 -0
- package/dist/v3/helpers/queryResult.d.ts.map +1 -0
- package/dist/v3/helpers/queryResult.js.map +1 -0
- package/dist/v3/helpers/runtimeSnapshot.d.ts.map +1 -0
- package/dist/v3/helpers/runtimeSnapshot.js +204 -0
- package/dist/v3/helpers/runtimeSnapshot.js.map +1 -0
- package/dist/v3/helpers/schemaAssertion.d.ts.map +1 -0
- package/dist/v3/helpers/schemaAssertion.js +117 -0
- package/dist/v3/helpers/schemaAssertion.js.map +1 -0
- package/dist/v3/helpers/screenshot.d.ts +41 -0
- package/dist/v3/helpers/screenshot.d.ts.map +1 -0
- package/dist/v3/helpers/screenshot.js +83 -0
- package/dist/v3/helpers/screenshot.js.map +1 -0
- package/dist/v3/helpers/scrollUntil.d.ts.map +1 -0
- package/dist/v3/helpers/scrollUntil.js +90 -0
- package/dist/v3/helpers/scrollUntil.js.map +1 -0
- package/dist/v3/helpers/smartui.d.ts.map +1 -0
- package/dist/v3/helpers/smartui.js +77 -0
- package/dist/v3/helpers/smartui.js.map +1 -0
- package/dist/v3/helpers/sseParser.d.ts.map +1 -0
- package/dist/v3/helpers/sseParser.js.map +1 -0
- package/dist/v3/helpers/tabs.d.ts +43 -0
- package/dist/v3/helpers/tabs.d.ts.map +1 -0
- package/dist/v3/helpers/tabs.js +258 -0
- package/dist/v3/helpers/tabs.js.map +1 -0
- package/dist/v3/helpers/text.d.ts.map +1 -0
- package/dist/v3/helpers/text.js.map +1 -0
- package/dist/v3/helpers/textNormalize.d.ts.map +1 -0
- package/dist/v3/helpers/textNormalize.js.map +1 -0
- package/dist/v3/helpers/textualAnalyzer/domStructured.d.ts.map +1 -0
- package/dist/v3/helpers/textualAnalyzer/domStructured.js +242 -0
- package/dist/v3/helpers/textualAnalyzer/domStructured.js.map +1 -0
- package/dist/v3/helpers/textualAnalyzer/evaluate.d.ts.map +1 -0
- package/dist/v3/helpers/textualAnalyzer/evaluate.js.map +1 -0
- package/dist/v3/helpers/textualAnalyzer/extractor.d.ts.map +1 -0
- package/dist/v3/helpers/textualAnalyzer/extractor.js.map +1 -0
- package/dist/v3/helpers/textualAnalyzer/heal.d.ts.map +1 -0
- package/dist/v3/helpers/textualAnalyzer/heal.js +120 -0
- package/dist/v3/helpers/textualAnalyzer/heal.js.map +1 -0
- package/dist/v3/helpers/textualAnalyzer/index.d.ts.map +1 -0
- package/dist/v3/helpers/textualAnalyzer/index.js +60 -0
- package/dist/v3/helpers/textualAnalyzer/index.js.map +1 -0
- package/dist/v3/helpers/textualAnalyzer/locatorEnrichment.d.ts.map +1 -0
- package/dist/v3/helpers/textualAnalyzer/locatorEnrichment.js +224 -0
- package/dist/v3/helpers/textualAnalyzer/locatorEnrichment.js.map +1 -0
- package/dist/v3/helpers/textualRead.d.ts.map +1 -0
- package/dist/v3/helpers/textualRead.js.map +1 -0
- package/dist/v3/helpers/vision.d.ts +79 -0
- package/dist/v3/helpers/vision.d.ts.map +1 -0
- package/dist/v3/helpers/vision.js +235 -0
- package/dist/v3/helpers/vision.js.map +1 -0
- package/dist/v3/helpers/visionFence.d.ts.map +1 -0
- package/dist/v3/helpers/visionFence.js.map +1 -0
- package/dist/v3/helpers/visionV3.d.ts +52 -0
- package/dist/v3/helpers/visionV3.d.ts.map +1 -0
- package/dist/v3/helpers/visionV3.js +366 -0
- package/dist/v3/helpers/visionV3.js.map +1 -0
- package/dist/v3/helpers/wait.d.ts.map +1 -0
- package/dist/v3/helpers/wait.js +48 -0
- package/dist/v3/helpers/wait.js.map +1 -0
- package/dist/v3/http.d.ts.map +1 -0
- package/dist/v3/http.js +45 -0
- package/dist/v3/http.js.map +1 -0
- package/dist/v3/httpClient.d.ts.map +1 -0
- package/dist/v3/httpClient.js.map +1 -0
- package/dist/v3/index.d.ts +40 -0
- package/dist/v3/index.d.ts.map +1 -0
- package/dist/v3/index.js +41 -0
- package/dist/v3/index.js.map +1 -0
- package/dist/v3/rankedLocator.d.ts.map +1 -0
- package/dist/v3/rankedLocator.js +85 -0
- package/dist/v3/rankedLocator.js.map +1 -0
- package/dist/v3/relayProxy.d.ts.map +1 -0
- package/dist/v3/relayProxy.js +485 -0
- package/dist/v3/relayProxy.js.map +1 -0
- package/dist/v3/reporters/index.d.ts.map +1 -0
- package/dist/v3/reporters/index.js +7 -0
- package/dist/v3/reporters/index.js.map +1 -0
- package/dist/v3/reporters/local.d.ts.map +1 -0
- package/dist/v3/reporters/local.js +40 -0
- package/dist/v3/reporters/local.js.map +1 -0
- package/dist/v3/reporters/lt.d.ts.map +1 -0
- package/dist/v3/reporters/lt.js +122 -0
- package/dist/v3/reporters/lt.js.map +1 -0
- package/dist/v3/reporters/null.d.ts.map +1 -0
- package/dist/v3/reporters/null.js.map +1 -0
- package/dist/v3/routeFailure.d.ts.map +1 -0
- package/dist/v3/routeFailure.js +34 -0
- package/dist/v3/routeFailure.js.map +1 -0
- package/dist/v3/session.d.ts.map +1 -0
- package/dist/v3/session.js +312 -0
- package/dist/v3/session.js.map +1 -0
- package/dist/v3/step.d.ts.map +1 -0
- package/dist/v3/step.js +112 -0
- package/dist/v3/step.js.map +1 -0
- package/dist/v3/stepVariables.d.ts.map +1 -0
- package/dist/v3/stepVariables.js +61 -0
- package/dist/v3/stepVariables.js.map +1 -0
- package/dist/v3/test.d.ts.map +1 -0
- package/dist/v3/test.js.map +1 -0
- package/dist/v3/testConfig.d.ts.map +1 -0
- package/dist/v3/testConfig.js.map +1 -0
- package/dist/v3/testState.d.ts.map +1 -0
- package/dist/v3/testState.js.map +1 -0
- package/dist/v3/vars.d.ts +84 -0
- package/dist/v3/vars.d.ts.map +1 -0
- package/dist/v3/vars.js +913 -0
- package/dist/v3/vars.js.map +1 -0
- package/dist/v3/visionLocator.d.ts.map +1 -0
- package/dist/v3/visionLocator.js +117 -0
- package/dist/v3/visionLocator.js.map +1 -0
- package/dist/v4/actionEngine.d.ts +37 -0
- package/dist/v4/actionEngine.d.ts.map +1 -0
- package/dist/v4/actionEngine.js +194 -0
- package/dist/v4/actionEngine.js.map +1 -0
- package/dist/v4/actionSpecs.d.ts +35 -0
- package/dist/v4/actionSpecs.d.ts.map +1 -0
- package/dist/v4/actionSpecs.js +354 -0
- package/dist/v4/actionSpecs.js.map +1 -0
- package/dist/v4/capability.d.ts +81 -0
- package/dist/v4/capability.d.ts.map +1 -0
- package/dist/v4/capability.js +346 -0
- package/dist/v4/capability.js.map +1 -0
- package/dist/v4/downloadsPath.d.ts +17 -0
- package/dist/v4/downloadsPath.d.ts.map +1 -0
- package/dist/v4/downloadsPath.js +26 -0
- package/dist/v4/downloadsPath.js.map +1 -0
- package/dist/v4/healCache.d.ts +28 -0
- package/dist/v4/healCache.d.ts.map +1 -0
- package/dist/v4/healCache.js +17 -0
- package/dist/v4/healCache.js.map +1 -0
- package/dist/v4/healPatch.d.ts +22 -0
- package/dist/v4/healPatch.d.ts.map +1 -0
- package/dist/v4/healPatch.js +415 -0
- package/dist/v4/healPatch.js.map +1 -0
- package/dist/v4/helpers/a11yFlatten.d.ts +37 -0
- package/dist/v4/helpers/a11yFlatten.d.ts.map +1 -0
- package/dist/v4/helpers/a11yFlatten.js +569 -0
- package/dist/v4/helpers/a11yFlatten.js.map +1 -0
- package/dist/v4/helpers/apiCalls.d.ts +26 -0
- package/dist/v4/helpers/apiCalls.d.ts.map +1 -0
- package/dist/v4/helpers/apiCalls.js +59 -0
- package/dist/v4/helpers/apiCalls.js.map +1 -0
- package/dist/v4/helpers/assertion.d.ts +26 -0
- package/dist/v4/helpers/assertion.d.ts.map +1 -0
- package/dist/v4/helpers/assertion.js +134 -0
- package/dist/v4/helpers/assertion.js.map +1 -0
- package/dist/v4/helpers/assertionV3.d.ts +70 -0
- package/dist/v4/helpers/assertionV3.d.ts.map +1 -0
- package/dist/v4/helpers/assertionV3.js +400 -0
- package/dist/v4/helpers/assertionV3.js.map +1 -0
- package/dist/v4/helpers/autohealAx.d.ts +41 -0
- package/dist/v4/helpers/autohealAx.d.ts.map +1 -0
- package/dist/v4/helpers/autohealAx.js +148 -0
- package/dist/v4/helpers/autohealAx.js.map +1 -0
- package/dist/v4/helpers/axTree/actionable.d.ts +143 -0
- package/dist/v4/helpers/axTree/actionable.d.ts.map +1 -0
- package/dist/v4/helpers/axTree/actionable.js +404 -0
- package/dist/v4/helpers/axTree/actionable.js.map +1 -0
- package/dist/v4/helpers/axTree/captureAxTree.d.ts +21 -0
- package/dist/v4/helpers/axTree/captureAxTree.d.ts.map +1 -0
- package/dist/v4/helpers/axTree/captureAxTree.js +15 -0
- package/dist/v4/helpers/axTree/captureAxTree.js.map +1 -0
- package/dist/v4/helpers/axTree/captureFrameForest.d.ts +52 -0
- package/dist/v4/helpers/axTree/captureFrameForest.d.ts.map +1 -0
- package/dist/v4/helpers/axTree/captureFrameForest.js +475 -0
- package/dist/v4/helpers/axTree/captureFrameForest.js.map +1 -0
- package/dist/v4/helpers/axTree/index.d.ts +10 -0
- package/dist/v4/helpers/axTree/index.d.ts.map +1 -0
- package/dist/v4/helpers/axTree/index.js +8 -0
- package/dist/v4/helpers/axTree/index.js.map +1 -0
- package/dist/v4/helpers/axTree/serializeAxTree.d.ts +106 -0
- package/dist/v4/helpers/axTree/serializeAxTree.d.ts.map +1 -0
- package/dist/v4/helpers/axTree/serializeAxTree.js +238 -0
- package/dist/v4/helpers/axTree/serializeAxTree.js.map +1 -0
- package/dist/v4/helpers/clipboard-intercept.d.ts +5 -0
- package/dist/v4/helpers/clipboard-intercept.d.ts.map +1 -0
- package/dist/v4/helpers/clipboard-intercept.js +149 -0
- package/dist/v4/helpers/clipboard-intercept.js.map +1 -0
- package/dist/v4/helpers/clipboard.d.ts +27 -0
- package/dist/v4/helpers/clipboard.d.ts.map +1 -0
- package/dist/v4/helpers/clipboard.js +70 -0
- package/dist/v4/helpers/clipboard.js.map +1 -0
- package/dist/v4/helpers/condition.d.ts +100 -0
- package/dist/v4/helpers/condition.d.ts.map +1 -0
- package/dist/v4/helpers/condition.js +356 -0
- package/dist/v4/helpers/condition.js.map +1 -0
- package/dist/v4/helpers/cookies.d.ts +12 -0
- package/dist/v4/helpers/cookies.d.ts.map +1 -0
- package/dist/v4/helpers/cookies.js +66 -0
- package/dist/v4/helpers/cookies.js.map +1 -0
- package/dist/v4/helpers/coordinateResolver.d.ts +29 -0
- package/dist/v4/helpers/coordinateResolver.d.ts.map +1 -0
- package/dist/v4/helpers/coordinateResolver.js +118 -0
- package/dist/v4/helpers/coordinateResolver.js.map +1 -0
- package/dist/v4/helpers/credits.d.ts +19 -0
- package/dist/v4/helpers/credits.d.ts.map +1 -0
- package/dist/v4/helpers/credits.js +52 -0
- package/dist/v4/helpers/credits.js.map +1 -0
- package/dist/v4/helpers/derive.d.ts +27 -0
- package/dist/v4/helpers/derive.d.ts.map +1 -0
- package/dist/v4/helpers/derive.js +87 -0
- package/dist/v4/helpers/derive.js.map +1 -0
- package/dist/v4/helpers/devtools.d.ts +39 -0
- package/dist/v4/helpers/devtools.d.ts.map +1 -0
- package/dist/v4/helpers/devtools.js +1215 -0
- package/dist/v4/helpers/devtools.js.map +1 -0
- package/dist/v4/helpers/dialog.d.ts +29 -0
- package/dist/v4/helpers/dialog.d.ts.map +1 -0
- package/dist/v4/helpers/dialog.js +35 -0
- package/dist/v4/helpers/dialog.js.map +1 -0
- package/dist/v4/helpers/drag.d.ts +38 -0
- package/dist/v4/helpers/drag.d.ts.map +1 -0
- package/dist/v4/helpers/drag.js +245 -0
- package/dist/v4/helpers/drag.js.map +1 -0
- package/dist/v4/helpers/evaluation/colors.d.ts +2 -0
- package/dist/v4/helpers/evaluation/colors.d.ts.map +1 -0
- package/dist/v4/helpers/evaluation/colors.js +151 -0
- package/dist/v4/helpers/evaluation/colors.js.map +1 -0
- package/dist/v4/helpers/evaluation/evaluate.d.ts +10 -0
- package/dist/v4/helpers/evaluation/evaluate.d.ts.map +1 -0
- package/dist/v4/helpers/evaluation/evaluate.js +423 -0
- package/dist/v4/helpers/evaluation/evaluate.js.map +1 -0
- package/dist/v4/helpers/executeApi.d.ts +63 -0
- package/dist/v4/helpers/executeApi.d.ts.map +1 -0
- package/dist/v4/helpers/executeApi.js +363 -0
- package/dist/v4/helpers/executeApi.js.map +1 -0
- package/dist/v4/helpers/executeDb.d.ts +11 -0
- package/dist/v4/helpers/executeDb.d.ts.map +1 -0
- package/dist/v4/helpers/executeDb.js +54 -0
- package/dist/v4/helpers/executeDb.js.map +1 -0
- package/dist/v4/helpers/executeJs.d.ts +16 -0
- package/dist/v4/helpers/executeJs.d.ts.map +1 -0
- package/dist/v4/helpers/executeJs.js +86 -0
- package/dist/v4/helpers/executeJs.js.map +1 -0
- package/dist/v4/helpers/gesture.d.ts +45 -0
- package/dist/v4/helpers/gesture.d.ts.map +1 -0
- package/dist/v4/helpers/gesture.js +131 -0
- package/dist/v4/helpers/gesture.js.map +1 -0
- package/dist/v4/helpers/healCascade.d.ts +39 -0
- package/dist/v4/helpers/healCascade.d.ts.map +1 -0
- package/dist/v4/helpers/healCascade.js +418 -0
- package/dist/v4/helpers/healCascade.js.map +1 -0
- package/dist/v4/helpers/kaneCli.d.ts +18 -0
- package/dist/v4/helpers/kaneCli.d.ts.map +1 -0
- package/dist/v4/helpers/kaneCli.js +319 -0
- package/dist/v4/helpers/kaneCli.js.map +1 -0
- package/dist/v4/helpers/loop.d.ts +4 -0
- package/dist/v4/helpers/loop.d.ts.map +1 -0
- package/dist/v4/helpers/loop.js +4 -0
- package/dist/v4/helpers/loop.js.map +1 -0
- package/dist/v4/helpers/math.d.ts +19 -0
- package/dist/v4/helpers/math.d.ts.map +1 -0
- package/dist/v4/helpers/math.js +117 -0
- package/dist/v4/helpers/math.js.map +1 -0
- package/dist/v4/helpers/network.d.ts +27 -0
- package/dist/v4/helpers/network.d.ts.map +1 -0
- package/dist/v4/helpers/network.js +185 -0
- package/dist/v4/helpers/network.js.map +1 -0
- package/dist/v4/helpers/pageReady.d.ts +27 -0
- package/dist/v4/helpers/pageReady.d.ts.map +1 -0
- package/dist/v4/helpers/pageReady.js +69 -0
- package/dist/v4/helpers/pageReady.js.map +1 -0
- package/dist/v4/helpers/png.d.ts +3 -0
- package/dist/v4/helpers/png.d.ts.map +1 -0
- package/dist/v4/helpers/png.js +18 -0
- package/dist/v4/helpers/png.js.map +1 -0
- package/dist/v4/helpers/queryResult.d.ts +13 -0
- package/dist/v4/helpers/queryResult.d.ts.map +1 -0
- package/dist/v4/helpers/queryResult.js +27 -0
- package/dist/v4/helpers/queryResult.js.map +1 -0
- package/dist/v4/helpers/runtimeSnapshot.d.ts +37 -0
- package/dist/v4/helpers/runtimeSnapshot.d.ts.map +1 -0
- package/dist/v4/helpers/runtimeSnapshot.js +101 -0
- package/dist/v4/helpers/runtimeSnapshot.js.map +1 -0
- package/dist/v4/helpers/schemaAssertion.d.ts +12 -0
- package/dist/v4/helpers/schemaAssertion.d.ts.map +1 -0
- package/dist/v4/helpers/schemaAssertion.js +117 -0
- package/dist/v4/helpers/schemaAssertion.js.map +1 -0
- package/dist/v4/helpers/screenshot.d.ts +40 -0
- package/dist/v4/helpers/screenshot.d.ts.map +1 -0
- package/dist/v4/helpers/screenshot.js +82 -0
- package/dist/v4/helpers/screenshot.js.map +1 -0
- package/dist/v4/helpers/scrollUntil.d.ts +13 -0
- package/dist/v4/helpers/scrollUntil.d.ts.map +1 -0
- package/dist/v4/helpers/scrollUntil.js +90 -0
- package/dist/v4/helpers/scrollUntil.js.map +1 -0
- package/dist/v4/helpers/smartui.d.ts +9 -0
- package/dist/v4/helpers/smartui.d.ts.map +1 -0
- package/dist/v4/helpers/smartui.js +77 -0
- package/dist/v4/helpers/smartui.js.map +1 -0
- package/dist/v4/helpers/sseParser.d.ts +34 -0
- package/dist/v4/helpers/sseParser.d.ts.map +1 -0
- package/dist/v4/helpers/sseParser.js +128 -0
- package/dist/v4/helpers/sseParser.js.map +1 -0
- package/dist/v4/helpers/tabs.d.ts +32 -0
- package/dist/v4/helpers/tabs.d.ts.map +1 -0
- package/dist/v4/helpers/tabs.js +89 -0
- package/dist/v4/helpers/tabs.js.map +1 -0
- package/dist/v4/helpers/text.d.ts +15 -0
- package/dist/v4/helpers/text.d.ts.map +1 -0
- package/dist/v4/helpers/text.js +24 -0
- package/dist/v4/helpers/text.js.map +1 -0
- package/dist/v4/helpers/textNormalize.d.ts +18 -0
- package/dist/v4/helpers/textNormalize.d.ts.map +1 -0
- package/dist/v4/helpers/textNormalize.js +39 -0
- package/dist/v4/helpers/textNormalize.js.map +1 -0
- package/dist/v4/helpers/textualAnalyzer/domStructured.d.ts +44 -0
- package/dist/v4/helpers/textualAnalyzer/domStructured.d.ts.map +1 -0
- package/dist/v4/helpers/textualAnalyzer/domStructured.js +242 -0
- package/dist/v4/helpers/textualAnalyzer/domStructured.js.map +1 -0
- package/dist/v4/helpers/textualAnalyzer/evaluate.d.ts +14 -0
- package/dist/v4/helpers/textualAnalyzer/evaluate.d.ts.map +1 -0
- package/dist/v4/helpers/textualAnalyzer/evaluate.js +5 -0
- package/dist/v4/helpers/textualAnalyzer/evaluate.js.map +1 -0
- package/dist/v4/helpers/textualAnalyzer/extractor.d.ts +21 -0
- package/dist/v4/helpers/textualAnalyzer/extractor.d.ts.map +1 -0
- package/dist/v4/helpers/textualAnalyzer/extractor.js +38 -0
- package/dist/v4/helpers/textualAnalyzer/extractor.js.map +1 -0
- package/dist/v4/helpers/textualAnalyzer/heal.d.ts +25 -0
- package/dist/v4/helpers/textualAnalyzer/heal.d.ts.map +1 -0
- package/dist/v4/helpers/textualAnalyzer/heal.js +120 -0
- package/dist/v4/helpers/textualAnalyzer/heal.js.map +1 -0
- package/dist/v4/helpers/textualAnalyzer/index.d.ts +29 -0
- package/dist/v4/helpers/textualAnalyzer/index.d.ts.map +1 -0
- package/dist/v4/helpers/textualAnalyzer/index.js +60 -0
- package/dist/v4/helpers/textualAnalyzer/index.js.map +1 -0
- package/dist/v4/helpers/textualAnalyzer/locatorEnrichment.d.ts +47 -0
- package/dist/v4/helpers/textualAnalyzer/locatorEnrichment.d.ts.map +1 -0
- package/dist/v4/helpers/textualAnalyzer/locatorEnrichment.js +224 -0
- package/dist/v4/helpers/textualAnalyzer/locatorEnrichment.js.map +1 -0
- package/dist/v4/helpers/vision.d.ts.map +1 -0
- package/dist/v4/helpers/vision.js +487 -0
- package/dist/v4/helpers/vision.js.map +1 -0
- package/dist/v4/helpers/wait.d.ts +16 -0
- package/dist/v4/helpers/wait.d.ts.map +1 -0
- package/dist/v4/helpers/wait.js +48 -0
- package/dist/v4/helpers/wait.js.map +1 -0
- package/dist/v4/http.d.ts +14 -0
- package/dist/v4/http.d.ts.map +1 -0
- package/dist/v4/http.js +45 -0
- package/dist/v4/http.js.map +1 -0
- package/dist/v4/httpClient.d.ts +18 -0
- package/dist/v4/httpClient.d.ts.map +1 -0
- package/dist/v4/httpClient.js +140 -0
- package/dist/v4/httpClient.js.map +1 -0
- package/dist/v4/index.d.ts +40 -0
- package/dist/v4/index.d.ts.map +1 -0
- package/dist/v4/index.js +41 -0
- package/dist/v4/index.js.map +1 -0
- package/dist/v4/rankedLocator.d.ts +27 -0
- package/dist/v4/rankedLocator.d.ts.map +1 -0
- package/dist/v4/rankedLocator.js +85 -0
- package/dist/v4/rankedLocator.js.map +1 -0
- package/dist/v4/relayProxy.d.ts +46 -0
- package/dist/v4/relayProxy.d.ts.map +1 -0
- package/dist/v4/relayProxy.js +485 -0
- package/dist/v4/relayProxy.js.map +1 -0
- package/dist/v4/reporters/index.d.ts +33 -0
- package/dist/v4/reporters/index.d.ts.map +1 -0
- package/dist/v4/reporters/index.js +7 -0
- package/dist/v4/reporters/index.js.map +1 -0
- package/dist/v4/reporters/local.d.ts +13 -0
- package/dist/v4/reporters/local.d.ts.map +1 -0
- package/dist/v4/reporters/local.js +40 -0
- package/dist/v4/reporters/local.js.map +1 -0
- package/dist/v4/reporters/lt.d.ts +28 -0
- package/dist/v4/reporters/lt.d.ts.map +1 -0
- package/dist/v4/reporters/lt.js +110 -0
- package/dist/v4/reporters/lt.js.map +1 -0
- package/dist/v4/reporters/null.d.ts +11 -0
- package/dist/v4/reporters/null.d.ts.map +1 -0
- package/dist/v4/reporters/null.js +10 -0
- package/dist/v4/reporters/null.js.map +1 -0
- package/dist/v4/routeFailure.d.ts +9 -0
- package/dist/v4/routeFailure.d.ts.map +1 -0
- package/dist/v4/routeFailure.js +34 -0
- package/dist/v4/routeFailure.js.map +1 -0
- package/dist/v4/session.d.ts +22 -0
- package/dist/v4/session.d.ts.map +1 -0
- package/dist/v4/session.js +312 -0
- package/dist/v4/session.js.map +1 -0
- package/dist/v4/step.d.ts +53 -0
- package/dist/v4/step.d.ts.map +1 -0
- package/dist/v4/step.js +95 -0
- package/dist/v4/step.js.map +1 -0
- package/dist/v4/stepVariables.d.ts +15 -0
- package/dist/v4/stepVariables.d.ts.map +1 -0
- package/dist/v4/stepVariables.js +61 -0
- package/dist/v4/stepVariables.js.map +1 -0
- package/dist/v4/test.d.ts +10 -0
- package/dist/v4/test.d.ts.map +1 -0
- package/dist/v4/test.js +5 -0
- package/dist/v4/test.js.map +1 -0
- package/dist/v4/testConfig.d.ts +12 -0
- package/dist/v4/testConfig.d.ts.map +1 -0
- package/dist/v4/testConfig.js +89 -0
- package/dist/v4/testConfig.js.map +1 -0
- package/dist/v4/testState.d.ts +10 -0
- package/dist/v4/testState.d.ts.map +1 -0
- package/dist/v4/testState.js +16 -0
- package/dist/v4/testState.js.map +1 -0
- package/dist/v4/vars.d.ts +84 -0
- package/dist/v4/vars.d.ts.map +1 -0
- package/dist/v4/vars.js +912 -0
- package/dist/v4/vars.js.map +1 -0
- package/dist/v4/visionLocator.d.ts +53 -0
- package/dist/v4/visionLocator.d.ts.map +1 -0
- package/dist/v4/visionLocator.js +117 -0
- package/dist/v4/visionLocator.js.map +1 -0
- package/package.json +1 -1
- package/dist/actionEngine.d.ts.map +0 -1
- package/dist/actionEngine.js +0 -194
- package/dist/actionEngine.js.map +0 -1
- package/dist/actionSpecs.d.ts.map +0 -1
- package/dist/actionSpecs.js +0 -354
- package/dist/actionSpecs.js.map +0 -1
- package/dist/capability.d.ts.map +0 -1
- package/dist/capability.js +0 -346
- package/dist/capability.js.map +0 -1
- package/dist/downloadsPath.d.ts.map +0 -1
- package/dist/downloadsPath.js.map +0 -1
- package/dist/healCache.d.ts.map +0 -1
- package/dist/healCache.js.map +0 -1
- package/dist/healPatch.d.ts +0 -20
- package/dist/healPatch.d.ts.map +0 -1
- package/dist/healPatch.js +0 -429
- package/dist/healPatch.js.map +0 -1
- package/dist/helpers/a11yFlatten.d.ts.map +0 -1
- package/dist/helpers/a11yFlatten.js +0 -569
- package/dist/helpers/a11yFlatten.js.map +0 -1
- package/dist/helpers/apiCalls.d.ts.map +0 -1
- package/dist/helpers/apiCalls.js +0 -59
- package/dist/helpers/apiCalls.js.map +0 -1
- package/dist/helpers/assertion.d.ts.map +0 -1
- package/dist/helpers/assertion.js +0 -152
- package/dist/helpers/assertion.js.map +0 -1
- package/dist/helpers/assertionV3.d.ts.map +0 -1
- package/dist/helpers/assertionV3.js.map +0 -1
- package/dist/helpers/autohealAx.d.ts.map +0 -1
- package/dist/helpers/autohealAx.js +0 -148
- package/dist/helpers/autohealAx.js.map +0 -1
- package/dist/helpers/axTree/actionable.d.ts.map +0 -1
- package/dist/helpers/axTree/actionable.js +0 -404
- package/dist/helpers/axTree/actionable.js.map +0 -1
- package/dist/helpers/axTree/captureAxTree.d.ts.map +0 -1
- package/dist/helpers/axTree/captureAxTree.js.map +0 -1
- package/dist/helpers/axTree/captureFrameForest.d.ts.map +0 -1
- package/dist/helpers/axTree/captureFrameForest.js +0 -475
- package/dist/helpers/axTree/captureFrameForest.js.map +0 -1
- package/dist/helpers/axTree/index.d.ts.map +0 -1
- package/dist/helpers/axTree/index.js.map +0 -1
- package/dist/helpers/axTree/serializeAxTree.d.ts.map +0 -1
- package/dist/helpers/axTree/serializeAxTree.js.map +0 -1
- package/dist/helpers/clipboard-intercept.d.ts.map +0 -1
- package/dist/helpers/clipboard-intercept.js.map +0 -1
- package/dist/helpers/clipboard.d.ts.map +0 -1
- package/dist/helpers/clipboard.js.map +0 -1
- package/dist/helpers/condition.d.ts +0 -100
- package/dist/helpers/condition.d.ts.map +0 -1
- package/dist/helpers/condition.js +0 -357
- package/dist/helpers/condition.js.map +0 -1
- package/dist/helpers/cookies.d.ts.map +0 -1
- package/dist/helpers/cookies.js +0 -66
- package/dist/helpers/cookies.js.map +0 -1
- package/dist/helpers/coordinateResolver.d.ts.map +0 -1
- package/dist/helpers/coordinateResolver.js +0 -118
- package/dist/helpers/coordinateResolver.js.map +0 -1
- package/dist/helpers/coordinateResolverRead.d.ts.map +0 -1
- package/dist/helpers/coordinateResolverRead.js +0 -107
- package/dist/helpers/coordinateResolverRead.js.map +0 -1
- package/dist/helpers/credits.d.ts.map +0 -1
- package/dist/helpers/credits.js +0 -52
- package/dist/helpers/credits.js.map +0 -1
- package/dist/helpers/derive.d.ts.map +0 -1
- package/dist/helpers/derive.js +0 -87
- package/dist/helpers/derive.js.map +0 -1
- package/dist/helpers/devtools.d.ts.map +0 -1
- package/dist/helpers/devtools.js +0 -1215
- package/dist/helpers/devtools.js.map +0 -1
- package/dist/helpers/dialog.d.ts.map +0 -1
- package/dist/helpers/dialog.js.map +0 -1
- package/dist/helpers/drag.d.ts.map +0 -1
- package/dist/helpers/drag.js +0 -276
- package/dist/helpers/drag.js.map +0 -1
- package/dist/helpers/evaluation/colors.d.ts.map +0 -1
- package/dist/helpers/evaluation/colors.js.map +0 -1
- package/dist/helpers/evaluation/evaluate.d.ts.map +0 -1
- package/dist/helpers/evaluation/evaluate.js.map +0 -1
- package/dist/helpers/executeApi.d.ts.map +0 -1
- package/dist/helpers/executeApi.js +0 -377
- package/dist/helpers/executeApi.js.map +0 -1
- package/dist/helpers/executeDb.d.ts.map +0 -1
- package/dist/helpers/executeDb.js +0 -54
- package/dist/helpers/executeDb.js.map +0 -1
- package/dist/helpers/executeJs.d.ts.map +0 -1
- package/dist/helpers/executeJs.js +0 -117
- package/dist/helpers/executeJs.js.map +0 -1
- package/dist/helpers/gesture.d.ts.map +0 -1
- package/dist/helpers/gesture.js +0 -131
- package/dist/helpers/gesture.js.map +0 -1
- package/dist/helpers/healCascade.d.ts.map +0 -1
- package/dist/helpers/healCascade.js +0 -418
- package/dist/helpers/healCascade.js.map +0 -1
- package/dist/helpers/iframeA11y.d.ts.map +0 -1
- package/dist/helpers/iframeA11y.js +0 -128
- package/dist/helpers/iframeA11y.js.map +0 -1
- package/dist/helpers/kaneCli.d.ts.map +0 -1
- package/dist/helpers/kaneCli.js +0 -319
- package/dist/helpers/kaneCli.js.map +0 -1
- package/dist/helpers/loop.d.ts +0 -6
- package/dist/helpers/loop.d.ts.map +0 -1
- package/dist/helpers/loop.js +0 -9
- package/dist/helpers/loop.js.map +0 -1
- package/dist/helpers/math.d.ts.map +0 -1
- package/dist/helpers/math.js +0 -152
- package/dist/helpers/math.js.map +0 -1
- package/dist/helpers/network.d.ts.map +0 -1
- package/dist/helpers/network.js +0 -185
- package/dist/helpers/network.js.map +0 -1
- package/dist/helpers/pageReady.d.ts.map +0 -1
- package/dist/helpers/pageReady.js +0 -85
- package/dist/helpers/pageReady.js.map +0 -1
- package/dist/helpers/png.d.ts.map +0 -1
- package/dist/helpers/png.js.map +0 -1
- package/dist/helpers/queryResult.d.ts.map +0 -1
- package/dist/helpers/queryResult.js.map +0 -1
- package/dist/helpers/runtimeSnapshot.d.ts.map +0 -1
- package/dist/helpers/runtimeSnapshot.js +0 -204
- package/dist/helpers/runtimeSnapshot.js.map +0 -1
- package/dist/helpers/schemaAssertion.d.ts.map +0 -1
- package/dist/helpers/schemaAssertion.js +0 -117
- package/dist/helpers/schemaAssertion.js.map +0 -1
- package/dist/helpers/screenshot.d.ts +0 -45
- package/dist/helpers/screenshot.d.ts.map +0 -1
- package/dist/helpers/screenshot.js +0 -90
- package/dist/helpers/screenshot.js.map +0 -1
- package/dist/helpers/scrollUntil.d.ts.map +0 -1
- package/dist/helpers/scrollUntil.js +0 -90
- package/dist/helpers/scrollUntil.js.map +0 -1
- package/dist/helpers/smartui.d.ts.map +0 -1
- package/dist/helpers/smartui.js +0 -77
- package/dist/helpers/smartui.js.map +0 -1
- package/dist/helpers/sseParser.d.ts.map +0 -1
- package/dist/helpers/sseParser.js.map +0 -1
- package/dist/helpers/tabs.d.ts +0 -44
- package/dist/helpers/tabs.d.ts.map +0 -1
- package/dist/helpers/tabs.js +0 -270
- package/dist/helpers/tabs.js.map +0 -1
- package/dist/helpers/text.d.ts.map +0 -1
- package/dist/helpers/text.js.map +0 -1
- package/dist/helpers/textNormalize.d.ts.map +0 -1
- package/dist/helpers/textNormalize.js.map +0 -1
- package/dist/helpers/textualAnalyzer/domStructured.d.ts.map +0 -1
- package/dist/helpers/textualAnalyzer/domStructured.js +0 -242
- package/dist/helpers/textualAnalyzer/domStructured.js.map +0 -1
- package/dist/helpers/textualAnalyzer/evaluate.d.ts.map +0 -1
- package/dist/helpers/textualAnalyzer/evaluate.js.map +0 -1
- package/dist/helpers/textualAnalyzer/extractor.d.ts.map +0 -1
- package/dist/helpers/textualAnalyzer/extractor.js.map +0 -1
- package/dist/helpers/textualAnalyzer/heal.d.ts.map +0 -1
- package/dist/helpers/textualAnalyzer/heal.js +0 -120
- package/dist/helpers/textualAnalyzer/heal.js.map +0 -1
- package/dist/helpers/textualAnalyzer/index.d.ts.map +0 -1
- package/dist/helpers/textualAnalyzer/index.js +0 -60
- package/dist/helpers/textualAnalyzer/index.js.map +0 -1
- package/dist/helpers/textualAnalyzer/locatorEnrichment.d.ts.map +0 -1
- package/dist/helpers/textualAnalyzer/locatorEnrichment.js +0 -224
- package/dist/helpers/textualAnalyzer/locatorEnrichment.js.map +0 -1
- package/dist/helpers/textualRead.d.ts.map +0 -1
- package/dist/helpers/textualRead.js.map +0 -1
- package/dist/helpers/vision.d.ts.map +0 -1
- package/dist/helpers/vision.js +0 -498
- package/dist/helpers/vision.js.map +0 -1
- package/dist/helpers/visionFence.d.ts.map +0 -1
- package/dist/helpers/visionFence.js.map +0 -1
- package/dist/helpers/visionV3.d.ts +0 -52
- package/dist/helpers/visionV3.d.ts.map +0 -1
- package/dist/helpers/visionV3.js +0 -366
- package/dist/helpers/visionV3.js.map +0 -1
- package/dist/helpers/wait.d.ts.map +0 -1
- package/dist/helpers/wait.js +0 -48
- package/dist/helpers/wait.js.map +0 -1
- package/dist/http.d.ts.map +0 -1
- package/dist/http.js +0 -45
- package/dist/http.js.map +0 -1
- package/dist/httpClient.d.ts.map +0 -1
- package/dist/httpClient.js.map +0 -1
- package/dist/rankedLocator.d.ts.map +0 -1
- package/dist/rankedLocator.js +0 -85
- package/dist/rankedLocator.js.map +0 -1
- package/dist/relayProxy.d.ts.map +0 -1
- package/dist/relayProxy.js +0 -485
- package/dist/relayProxy.js.map +0 -1
- package/dist/reporters/index.d.ts.map +0 -1
- package/dist/reporters/index.js +0 -7
- package/dist/reporters/index.js.map +0 -1
- package/dist/reporters/local.d.ts.map +0 -1
- package/dist/reporters/local.js +0 -40
- package/dist/reporters/local.js.map +0 -1
- package/dist/reporters/lt.d.ts.map +0 -1
- package/dist/reporters/lt.js +0 -127
- package/dist/reporters/lt.js.map +0 -1
- package/dist/reporters/null.d.ts.map +0 -1
- package/dist/reporters/null.js.map +0 -1
- package/dist/routeFailure.d.ts.map +0 -1
- package/dist/routeFailure.js +0 -34
- package/dist/routeFailure.js.map +0 -1
- package/dist/session.d.ts.map +0 -1
- package/dist/session.js +0 -312
- package/dist/session.js.map +0 -1
- package/dist/step.d.ts.map +0 -1
- package/dist/step.js +0 -112
- package/dist/step.js.map +0 -1
- package/dist/stepVariables.d.ts.map +0 -1
- package/dist/stepVariables.js +0 -61
- package/dist/stepVariables.js.map +0 -1
- package/dist/test.d.ts.map +0 -1
- package/dist/test.js.map +0 -1
- package/dist/testConfig.d.ts.map +0 -1
- package/dist/testConfig.js.map +0 -1
- package/dist/testState.d.ts.map +0 -1
- package/dist/testState.js.map +0 -1
- package/dist/vars.d.ts +0 -78
- package/dist/vars.d.ts.map +0 -1
- package/dist/vars.js +0 -912
- package/dist/vars.js.map +0 -1
- package/dist/visionLocator.d.ts.map +0 -1
- package/dist/visionLocator.js +0 -117
- package/dist/visionLocator.js.map +0 -1
- /package/dist/{actionEngine.d.ts → v3/actionEngine.d.ts} +0 -0
- /package/dist/{actionSpecs.d.ts → v3/actionSpecs.d.ts} +0 -0
- /package/dist/{capability.d.ts → v3/capability.d.ts} +0 -0
- /package/dist/{downloadsPath.d.ts → v3/downloadsPath.d.ts} +0 -0
- /package/dist/{downloadsPath.js → v3/downloadsPath.js} +0 -0
- /package/dist/{healCache.d.ts → v3/healCache.d.ts} +0 -0
- /package/dist/{healCache.js → v3/healCache.js} +0 -0
- /package/dist/{helpers → v3/helpers}/a11yFlatten.d.ts +0 -0
- /package/dist/{helpers → v3/helpers}/apiCalls.d.ts +0 -0
- /package/dist/{helpers → v3/helpers}/assertion.d.ts +0 -0
- /package/dist/{helpers → v3/helpers}/assertionV3.d.ts +0 -0
- /package/dist/{helpers → v3/helpers}/assertionV3.js +0 -0
- /package/dist/{helpers → v3/helpers}/autohealAx.d.ts +0 -0
- /package/dist/{helpers → v3/helpers}/axTree/actionable.d.ts +0 -0
- /package/dist/{helpers → v3/helpers}/axTree/captureAxTree.d.ts +0 -0
- /package/dist/{helpers → v3/helpers}/axTree/captureAxTree.js +0 -0
- /package/dist/{helpers → v3/helpers}/axTree/captureFrameForest.d.ts +0 -0
- /package/dist/{helpers → v3/helpers}/axTree/index.d.ts +0 -0
- /package/dist/{helpers → v3/helpers}/axTree/index.js +0 -0
- /package/dist/{helpers → v3/helpers}/axTree/serializeAxTree.d.ts +0 -0
- /package/dist/{helpers → v3/helpers}/axTree/serializeAxTree.js +0 -0
- /package/dist/{helpers → v3/helpers}/clipboard-intercept.d.ts +0 -0
- /package/dist/{helpers → v3/helpers}/clipboard-intercept.js +0 -0
- /package/dist/{helpers → v3/helpers}/clipboard.d.ts +0 -0
- /package/dist/{helpers → v3/helpers}/clipboard.js +0 -0
- /package/dist/{helpers → v3/helpers}/cookies.d.ts +0 -0
- /package/dist/{helpers → v3/helpers}/coordinateResolver.d.ts +0 -0
- /package/dist/{helpers → v3/helpers}/coordinateResolverRead.d.ts +0 -0
- /package/dist/{helpers → v3/helpers}/credits.d.ts +0 -0
- /package/dist/{helpers → v3/helpers}/derive.d.ts +0 -0
- /package/dist/{helpers → v3/helpers}/devtools.d.ts +0 -0
- /package/dist/{helpers → v3/helpers}/dialog.d.ts +0 -0
- /package/dist/{helpers → v3/helpers}/dialog.js +0 -0
- /package/dist/{helpers → v3/helpers}/drag.d.ts +0 -0
- /package/dist/{helpers → v3/helpers}/evaluation/colors.d.ts +0 -0
- /package/dist/{helpers → v3/helpers}/evaluation/colors.js +0 -0
- /package/dist/{helpers → v3/helpers}/evaluation/evaluate.d.ts +0 -0
- /package/dist/{helpers → v3/helpers}/evaluation/evaluate.js +0 -0
- /package/dist/{helpers → v3/helpers}/executeApi.d.ts +0 -0
- /package/dist/{helpers → v3/helpers}/executeDb.d.ts +0 -0
- /package/dist/{helpers → v3/helpers}/executeJs.d.ts +0 -0
- /package/dist/{helpers → v3/helpers}/gesture.d.ts +0 -0
- /package/dist/{helpers → v3/helpers}/healCascade.d.ts +0 -0
- /package/dist/{helpers → v3/helpers}/iframeA11y.d.ts +0 -0
- /package/dist/{helpers → v3/helpers}/kaneCli.d.ts +0 -0
- /package/dist/{helpers → v3/helpers}/math.d.ts +0 -0
- /package/dist/{helpers → v3/helpers}/network.d.ts +0 -0
- /package/dist/{helpers → v3/helpers}/pageReady.d.ts +0 -0
- /package/dist/{helpers → v3/helpers}/png.d.ts +0 -0
- /package/dist/{helpers → v3/helpers}/png.js +0 -0
- /package/dist/{helpers → v3/helpers}/queryResult.d.ts +0 -0
- /package/dist/{helpers → v3/helpers}/queryResult.js +0 -0
- /package/dist/{helpers → v3/helpers}/runtimeSnapshot.d.ts +0 -0
- /package/dist/{helpers → v3/helpers}/schemaAssertion.d.ts +0 -0
- /package/dist/{helpers → v3/helpers}/scrollUntil.d.ts +0 -0
- /package/dist/{helpers → v3/helpers}/smartui.d.ts +0 -0
- /package/dist/{helpers → v3/helpers}/sseParser.d.ts +0 -0
- /package/dist/{helpers → v3/helpers}/sseParser.js +0 -0
- /package/dist/{helpers → v3/helpers}/text.d.ts +0 -0
- /package/dist/{helpers → v3/helpers}/text.js +0 -0
- /package/dist/{helpers → v3/helpers}/textNormalize.d.ts +0 -0
- /package/dist/{helpers → v3/helpers}/textNormalize.js +0 -0
- /package/dist/{helpers → v3/helpers}/textualAnalyzer/domStructured.d.ts +0 -0
- /package/dist/{helpers → v3/helpers}/textualAnalyzer/evaluate.d.ts +0 -0
- /package/dist/{helpers → v3/helpers}/textualAnalyzer/evaluate.js +0 -0
- /package/dist/{helpers → v3/helpers}/textualAnalyzer/extractor.d.ts +0 -0
- /package/dist/{helpers → v3/helpers}/textualAnalyzer/extractor.js +0 -0
- /package/dist/{helpers → v3/helpers}/textualAnalyzer/heal.d.ts +0 -0
- /package/dist/{helpers → v3/helpers}/textualAnalyzer/index.d.ts +0 -0
- /package/dist/{helpers → v3/helpers}/textualAnalyzer/locatorEnrichment.d.ts +0 -0
- /package/dist/{helpers → v3/helpers}/textualRead.d.ts +0 -0
- /package/dist/{helpers → v3/helpers}/textualRead.js +0 -0
- /package/dist/{helpers → v3/helpers}/visionFence.d.ts +0 -0
- /package/dist/{helpers → v3/helpers}/visionFence.js +0 -0
- /package/dist/{helpers → v3/helpers}/wait.d.ts +0 -0
- /package/dist/{http.d.ts → v3/http.d.ts} +0 -0
- /package/dist/{httpClient.d.ts → v3/httpClient.d.ts} +0 -0
- /package/dist/{httpClient.js → v3/httpClient.js} +0 -0
- /package/dist/{rankedLocator.d.ts → v3/rankedLocator.d.ts} +0 -0
- /package/dist/{relayProxy.d.ts → v3/relayProxy.d.ts} +0 -0
- /package/dist/{reporters → v3/reporters}/index.d.ts +0 -0
- /package/dist/{reporters → v3/reporters}/local.d.ts +0 -0
- /package/dist/{reporters → v3/reporters}/lt.d.ts +0 -0
- /package/dist/{reporters → v3/reporters}/null.d.ts +0 -0
- /package/dist/{reporters → v3/reporters}/null.js +0 -0
- /package/dist/{routeFailure.d.ts → v3/routeFailure.d.ts} +0 -0
- /package/dist/{session.d.ts → v3/session.d.ts} +0 -0
- /package/dist/{step.d.ts → v3/step.d.ts} +0 -0
- /package/dist/{stepVariables.d.ts → v3/stepVariables.d.ts} +0 -0
- /package/dist/{test.d.ts → v3/test.d.ts} +0 -0
- /package/dist/{test.js → v3/test.js} +0 -0
- /package/dist/{testConfig.d.ts → v3/testConfig.d.ts} +0 -0
- /package/dist/{testConfig.js → v3/testConfig.js} +0 -0
- /package/dist/{testState.d.ts → v3/testState.d.ts} +0 -0
- /package/dist/{testState.js → v3/testState.js} +0 -0
- /package/dist/{visionLocator.d.ts → v3/visionLocator.d.ts} +0 -0
- /package/dist/{helpers → v4/helpers}/vision.d.ts +0 -0
|
@@ -0,0 +1,487 @@
|
|
|
1
|
+
import { config } from '../../config.js';
|
|
2
|
+
import { fetchWithAuth } from '../http.js';
|
|
3
|
+
import { log, preview, repr } from '../../log.js';
|
|
4
|
+
import { _getReporter, currentStep } from '../step.js';
|
|
5
|
+
import { derive } from './derive.js';
|
|
6
|
+
import { takeScreenshot } from './screenshot.js';
|
|
7
|
+
import { resolveVar } from '../vars.js';
|
|
8
|
+
/**
|
|
9
|
+
* Ship a vision-heal click point via lambda-element-bounds. The Locator-
|
|
10
|
+
* wrapper bounds path is bypassed when vision heal performs the action via
|
|
11
|
+
* `page.mouse.click(x, y)` directly, so we publish the resolved point as a
|
|
12
|
+
* zero-W/H rect. The next command capture promotes this onto the step's
|
|
13
|
+
* coordinates field.
|
|
14
|
+
*/
|
|
15
|
+
async function shipVisionCoords(coords) {
|
|
16
|
+
try {
|
|
17
|
+
if (config.current.runTarget !== 'cloud')
|
|
18
|
+
return;
|
|
19
|
+
const r = _getReporter();
|
|
20
|
+
if (!r)
|
|
21
|
+
return;
|
|
22
|
+
const step = currentStep();
|
|
23
|
+
await r.sendElementBounds({ x: coords.x, y: coords.y, width: 0, height: 0 }, step?.instructionId);
|
|
24
|
+
}
|
|
25
|
+
catch (e) {
|
|
26
|
+
log.helper(`[vision] coord ship skipped: ${e instanceof Error ? e.message : String(e)}`);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
// CSS properties captured for DOM element snapshot — PY parity (vision.py:37-48)
|
|
30
|
+
const CSS_PROPERTIES = [
|
|
31
|
+
'color',
|
|
32
|
+
'background-color',
|
|
33
|
+
'border-color',
|
|
34
|
+
'font-size',
|
|
35
|
+
'font-family',
|
|
36
|
+
'font-weight',
|
|
37
|
+
'font-style',
|
|
38
|
+
'display',
|
|
39
|
+
'visibility',
|
|
40
|
+
'opacity',
|
|
41
|
+
];
|
|
42
|
+
// Accessibility roles to skip when building flat DOM — PY parity (vision.py:51)
|
|
43
|
+
const SKIP_ROLES = new Set(['none', 'generic', 'rootwebarea', 'webarea', 'inlinetextbox']);
|
|
44
|
+
// JS function injected via Runtime.callFunctionOn to snapshot a single DOM element.
|
|
45
|
+
// PY parity (vision.py:54-93). `${...}` for CSS property list substitution.
|
|
46
|
+
const SNAPSHOT_JS = `
|
|
47
|
+
function() {
|
|
48
|
+
let el = this;
|
|
49
|
+
if (el.nodeType === 3 || !el.tagName) {
|
|
50
|
+
el = el.parentElement || el.parentNode;
|
|
51
|
+
}
|
|
52
|
+
if (!el || !el.tagName) {
|
|
53
|
+
return { tag_name: '', text_content: '', attributes: {}, styles: {}, states: {} };
|
|
54
|
+
}
|
|
55
|
+
const attrs = {};
|
|
56
|
+
for (const attr of el.attributes || []) {
|
|
57
|
+
attrs[attr.name] = attr.value;
|
|
58
|
+
}
|
|
59
|
+
const states = {};
|
|
60
|
+
if ('disabled' in el) states.disabled = el.disabled;
|
|
61
|
+
if ('checked' in el) states.checked = el.checked;
|
|
62
|
+
if ('readOnly' in el) states.readOnly = el.readOnly;
|
|
63
|
+
if ('required' in el) states.required = el.required;
|
|
64
|
+
if ('hidden' in el) states.hidden = el.hidden;
|
|
65
|
+
if ('selected' in el) states.selected = el.selected;
|
|
66
|
+
if ('value' in el) states.value = el.value;
|
|
67
|
+
if ('type' in el) states.type = el.type;
|
|
68
|
+
const styles = {};
|
|
69
|
+
try {
|
|
70
|
+
const cs = window.getComputedStyle(el);
|
|
71
|
+
const props = ${JSON.stringify(CSS_PROPERTIES)};
|
|
72
|
+
for (const p of props) {
|
|
73
|
+
const v = cs.getPropertyValue(p);
|
|
74
|
+
if (v) styles[p] = v;
|
|
75
|
+
}
|
|
76
|
+
} catch(e) {}
|
|
77
|
+
return {
|
|
78
|
+
tag_name: el.tagName.toLowerCase(),
|
|
79
|
+
text_content: (el.textContent || '').trim().substring(0, 500),
|
|
80
|
+
attributes: attrs,
|
|
81
|
+
states: states,
|
|
82
|
+
styles: styles,
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
`;
|
|
86
|
+
/**
|
|
87
|
+
* Convert CDP Accessibility.getFullAXTree nodes to the flat-DOM format.
|
|
88
|
+
* 1-based indexing matches the recorder's flat-DOM format. PY parity.
|
|
89
|
+
*/
|
|
90
|
+
export function _buildFlatDom(a11yNodes) {
|
|
91
|
+
const result = [];
|
|
92
|
+
let index = 1;
|
|
93
|
+
for (const node of a11yNodes) {
|
|
94
|
+
if (node.ignored)
|
|
95
|
+
continue;
|
|
96
|
+
const roleObj = node.role;
|
|
97
|
+
const roleRaw = typeof roleObj === 'object' && roleObj !== null
|
|
98
|
+
? roleObj.value ?? ''
|
|
99
|
+
: String(roleObj ?? '');
|
|
100
|
+
const role = roleRaw.trim().toLowerCase();
|
|
101
|
+
if (SKIP_ROLES.has(role))
|
|
102
|
+
continue;
|
|
103
|
+
const nameObj = node.name;
|
|
104
|
+
const name = typeof nameObj === 'object' && nameObj !== null
|
|
105
|
+
? nameObj.value ?? ''
|
|
106
|
+
: String(nameObj ?? '');
|
|
107
|
+
const element = { index, role, name };
|
|
108
|
+
if (node.backendDOMNodeId !== undefined) {
|
|
109
|
+
element.backend_dom_node_id = node.backendDOMNodeId;
|
|
110
|
+
}
|
|
111
|
+
const props = {};
|
|
112
|
+
for (const prop of node.properties ?? []) {
|
|
113
|
+
const propName = prop.name ?? '';
|
|
114
|
+
const propVal = prop.value;
|
|
115
|
+
const val = typeof propVal === 'object' && propVal !== null
|
|
116
|
+
? propVal.value
|
|
117
|
+
: propVal;
|
|
118
|
+
if (val !== undefined && val !== null)
|
|
119
|
+
props[propName] = val;
|
|
120
|
+
}
|
|
121
|
+
if (props['disabled'])
|
|
122
|
+
element.disabled = true;
|
|
123
|
+
for (const key of ['checked', 'expanded', 'selected', 'pressed', 'focused', 'required', 'readonly']) {
|
|
124
|
+
if (key in props)
|
|
125
|
+
element[key] = props[key];
|
|
126
|
+
}
|
|
127
|
+
const valObj = node.value;
|
|
128
|
+
if (typeof valObj === 'object' && valObj !== null && valObj.value) {
|
|
129
|
+
element.value = valObj.value;
|
|
130
|
+
}
|
|
131
|
+
const descObj = node.description;
|
|
132
|
+
if (typeof descObj === 'object' && descObj !== null) {
|
|
133
|
+
const descVal = descObj.value;
|
|
134
|
+
if (descVal)
|
|
135
|
+
element.description = descVal;
|
|
136
|
+
}
|
|
137
|
+
result.push(element);
|
|
138
|
+
index += 1;
|
|
139
|
+
}
|
|
140
|
+
return result;
|
|
141
|
+
}
|
|
142
|
+
// PY parity: _QUERY_TIMEOUT = 60s (identify), _ANALYZER_TIMEOUT = 120s (extract)
|
|
143
|
+
const ANALYZER_QUERY_TIMEOUT_MS = 60_000;
|
|
144
|
+
const ANALYZER_EXTRACT_TIMEOUT_MS = 120_000;
|
|
145
|
+
// PY parity: vision.py:36-37 — visibility-poll cadence
|
|
146
|
+
const COORD_MAX_RETRIES = 10;
|
|
147
|
+
const COORD_RETRY_INTERVAL_MS = 1_000;
|
|
148
|
+
/**
|
|
149
|
+
* Poll /api/v1/visibility/check until element is visible; returns the last
|
|
150
|
+
* screenshot_b64.
|
|
151
|
+
*
|
|
152
|
+
* opts (all optional):
|
|
153
|
+
* maxRetries: defaults to COORD_MAX_RETRIES
|
|
154
|
+
* retryIntervalMs: defaults to COORD_RETRY_INTERVAL_MS
|
|
155
|
+
* shouldRaise: when false, returns the last screenshot_b64 instead of
|
|
156
|
+
* throwing on exhaustion. Defaults to true.
|
|
157
|
+
*
|
|
158
|
+
* PY parity: vision.py:_wait_for_visibility.
|
|
159
|
+
*/
|
|
160
|
+
async function _waitForVisibility(page, query, opts = {}) {
|
|
161
|
+
const maxRetries = opts.maxRetries ?? COORD_MAX_RETRIES;
|
|
162
|
+
const retryIntervalMs = opts.retryIntervalMs ?? COORD_RETRY_INTERVAL_MS;
|
|
163
|
+
const shouldRaise = opts.shouldRaise ?? true;
|
|
164
|
+
let lastReasoning = null;
|
|
165
|
+
let lastScreenshotB64 = null;
|
|
166
|
+
for (let attempt = 1; attempt <= maxRetries; attempt++) {
|
|
167
|
+
const screenshotB64 = (await takeScreenshot(page)).toString('base64');
|
|
168
|
+
lastScreenshotB64 = screenshotB64;
|
|
169
|
+
let visible = false;
|
|
170
|
+
try {
|
|
171
|
+
const resp = await fetchWithAuth(`${config.current.aiApiHost}/api/v1/visibility/check`, {
|
|
172
|
+
method: 'POST',
|
|
173
|
+
headers: { 'content-type': 'application/json' },
|
|
174
|
+
body: JSON.stringify({ screenshot_b64: screenshotB64, query }),
|
|
175
|
+
});
|
|
176
|
+
if (resp.status !== 200)
|
|
177
|
+
throw new Error(`Visibility API error: ${resp.status}`);
|
|
178
|
+
const body = (await resp.json());
|
|
179
|
+
visible = body.visible === true;
|
|
180
|
+
lastReasoning = body.reasoning ?? lastReasoning;
|
|
181
|
+
log.helper(`[visibility] attempt ${attempt}/${maxRetries} visible=${visible}`);
|
|
182
|
+
}
|
|
183
|
+
catch (e) {
|
|
184
|
+
lastReasoning = String(e);
|
|
185
|
+
log.helper(`[visibility] attempt ${attempt}/${maxRetries} error=${lastReasoning}`);
|
|
186
|
+
}
|
|
187
|
+
if (visible)
|
|
188
|
+
return screenshotB64;
|
|
189
|
+
if (attempt < maxRetries)
|
|
190
|
+
await new Promise(r => setTimeout(r, retryIntervalMs));
|
|
191
|
+
}
|
|
192
|
+
if (!shouldRaise) {
|
|
193
|
+
log.helper(`[visibility] not visible after ${maxRetries} attempts (shouldRaise=false); returning last screenshot. reasoning=${lastReasoning ?? 'unknown'}`);
|
|
194
|
+
return lastScreenshotB64 ?? '';
|
|
195
|
+
}
|
|
196
|
+
throw new Error(`Element not visible after ${maxRetries} attempts. Last reasoning: ${lastReasoning ?? 'unknown'}`);
|
|
197
|
+
}
|
|
198
|
+
/** POST to the analyzer endpoint and return parsed JSON. Strict 200-only check + timeout. PY parity. */
|
|
199
|
+
async function _postAnalyzer(body, timeoutMs) {
|
|
200
|
+
const ac = new AbortController();
|
|
201
|
+
const timer = setTimeout(() => ac.abort(), timeoutMs);
|
|
202
|
+
let resp;
|
|
203
|
+
try {
|
|
204
|
+
resp = await fetchWithAuth(`${config.current.aiApiHost}/api/v1/analyzer`, {
|
|
205
|
+
method: 'POST',
|
|
206
|
+
headers: { 'content-type': 'application/json' },
|
|
207
|
+
body: JSON.stringify(body),
|
|
208
|
+
signal: ac.signal,
|
|
209
|
+
});
|
|
210
|
+
}
|
|
211
|
+
finally {
|
|
212
|
+
clearTimeout(timer);
|
|
213
|
+
}
|
|
214
|
+
// Strict 200 — PY checks `resp.status != 200` (vision.py:107). 201-299 must NOT pass.
|
|
215
|
+
if (resp.status !== 200) {
|
|
216
|
+
const text = await resp.text().catch(() => '');
|
|
217
|
+
throw new Error(`Analyzer API error ${resp.status}: ${text}`);
|
|
218
|
+
}
|
|
219
|
+
return (await resp.json());
|
|
220
|
+
}
|
|
221
|
+
/** Get a CDP snapshot of a single element matching the recorder's format. PY parity. */
|
|
222
|
+
async function _getElementSnapshot(cdp, backendDomNodeId) {
|
|
223
|
+
const empty = {
|
|
224
|
+
tag_name: '', text_content: '', attributes: {}, styles: {}, states: {},
|
|
225
|
+
};
|
|
226
|
+
const resolveResp = await cdp.send('DOM.resolveNode', { backendNodeId: backendDomNodeId });
|
|
227
|
+
const objectId = resolveResp.object?.objectId;
|
|
228
|
+
if (!objectId)
|
|
229
|
+
return empty;
|
|
230
|
+
try {
|
|
231
|
+
const callResp = await cdp.send('Runtime.callFunctionOn', {
|
|
232
|
+
objectId,
|
|
233
|
+
functionDeclaration: SNAPSHOT_JS,
|
|
234
|
+
returnByValue: true,
|
|
235
|
+
});
|
|
236
|
+
const result = callResp.result?.value ?? {};
|
|
237
|
+
return {
|
|
238
|
+
tag_name: result.tag_name ?? '',
|
|
239
|
+
text_content: result.text_content ?? '',
|
|
240
|
+
attributes: result.attributes ?? {},
|
|
241
|
+
styles: result.styles ?? {},
|
|
242
|
+
states: result.states ?? {},
|
|
243
|
+
};
|
|
244
|
+
}
|
|
245
|
+
catch (e) {
|
|
246
|
+
log.helper(`[vision] Snapshot failed for backendNodeId=${backendDomNodeId}: ${String(e)}`);
|
|
247
|
+
return empty;
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
/**
|
|
251
|
+
* Query the live viewport via window.innerWidth/innerHeight.
|
|
252
|
+
*
|
|
253
|
+
* page.viewportSize() is null when Playwright connects over CDP
|
|
254
|
+
* (grid / real-device) since Playwright never set the viewport. Reading
|
|
255
|
+
* the page directly works regardless of how the browser was launched or
|
|
256
|
+
* connected. Returns null so the caller applies its own default.
|
|
257
|
+
* PY parity (vision.py `_query_viewport_size`).
|
|
258
|
+
*/
|
|
259
|
+
async function queryViewportSize(page) {
|
|
260
|
+
try {
|
|
261
|
+
const dims = await page.evaluate(() => ({
|
|
262
|
+
width: window.innerWidth,
|
|
263
|
+
height: window.innerHeight,
|
|
264
|
+
}));
|
|
265
|
+
if (dims && dims.width && dims.height)
|
|
266
|
+
return dims;
|
|
267
|
+
}
|
|
268
|
+
catch {
|
|
269
|
+
// keep null — caller applies its own default
|
|
270
|
+
}
|
|
271
|
+
return null;
|
|
272
|
+
}
|
|
273
|
+
/**
|
|
274
|
+
* Get coordinates for a described element via vision API.
|
|
275
|
+
*
|
|
276
|
+
* When smart is ON: always uses vision API. No fallback to (x, y) — if the
|
|
277
|
+
* API can't find the element or errors, raises instead of silently using
|
|
278
|
+
* stale coordinates that may click the wrong thing. Matches Python
|
|
279
|
+
* `get_vision_coordinates` behavior (commit 13d9f6b).
|
|
280
|
+
*
|
|
281
|
+
* When smart is OFF: returns the passed-in coordinates directly, or null
|
|
282
|
+
* if neither provided.
|
|
283
|
+
*/
|
|
284
|
+
export async function getVisionCoordinates(page, description, actionType, x, y) {
|
|
285
|
+
if (!config.current.smart) {
|
|
286
|
+
if (x !== undefined && y !== undefined)
|
|
287
|
+
return { x, y };
|
|
288
|
+
return null;
|
|
289
|
+
}
|
|
290
|
+
log.helper(`[get_vision_coordinates] query=${preview(description, 60)}`);
|
|
291
|
+
// Gate on visibility, then locate on a FRESH frame (PY parity). The
|
|
292
|
+
// visibility call takes seconds, and its screenshot was captured right after
|
|
293
|
+
// the previous action — a checkbox ticked by that action may not have
|
|
294
|
+
// rendered yet. Locating on the stale frame can pick an element whose state
|
|
295
|
+
// has since changed (e.g. click an already-ticked box, unticking it).
|
|
296
|
+
// The gate must not block the action on exhaustion — fall through and let
|
|
297
|
+
// the coordinates API's `found` flag decide (PY parity).
|
|
298
|
+
await _waitForVisibility(page, description, { shouldRaise: false });
|
|
299
|
+
const shotB64 = (await takeScreenshot(page)).toString('base64');
|
|
300
|
+
const viewport = (await queryViewportSize(page)) ?? { width: 1920, height: 1080 };
|
|
301
|
+
const resp = await fetchWithAuth(`${config.current.aiApiHost}/api/v1/vision/coordinates`, {
|
|
302
|
+
method: 'POST',
|
|
303
|
+
headers: { 'content-type': 'application/json' },
|
|
304
|
+
body: JSON.stringify({
|
|
305
|
+
screenshot_b64: shotB64,
|
|
306
|
+
action_instruction: description,
|
|
307
|
+
width: viewport.width,
|
|
308
|
+
height: viewport.height,
|
|
309
|
+
}),
|
|
310
|
+
});
|
|
311
|
+
if (!resp.ok)
|
|
312
|
+
throw new Error(`Vision API error: ${resp.status}`);
|
|
313
|
+
const body = (await resp.json());
|
|
314
|
+
if (!body.found || body.x === undefined || body.y === undefined) {
|
|
315
|
+
throw new Error(`Vision API: element not found for query=${JSON.stringify(description)}`);
|
|
316
|
+
}
|
|
317
|
+
log.helper(`[get_vision_coordinates] found (${body.x}, ${body.y})`);
|
|
318
|
+
const coords = { x: body.x, y: body.y };
|
|
319
|
+
// Ship the resolved point so the per-step record picks up coordinates
|
|
320
|
+
// on the vision-heal path that bypasses the Locator wrapper.
|
|
321
|
+
await shipVisionCoords(coords);
|
|
322
|
+
return coords;
|
|
323
|
+
}
|
|
324
|
+
export async function visionQuery(page, description, optsOrReturnType) {
|
|
325
|
+
if (!config.current.smart)
|
|
326
|
+
return null;
|
|
327
|
+
log.helper(`[vision_query] query=${preview(description, 80)}`);
|
|
328
|
+
// Back-compat: old call sites passed `returnType` as a positional string.
|
|
329
|
+
const opts = typeof optsOrReturnType === 'string'
|
|
330
|
+
? { returnType: optsOrReturnType }
|
|
331
|
+
: optsOrReturnType ?? {};
|
|
332
|
+
// Resolve {{vars}}/${params} before the query leaves the binding; the
|
|
333
|
+
// analyzer would otherwise read the literal placeholder text.
|
|
334
|
+
description = String((await resolveVar(description)) ?? '');
|
|
335
|
+
// VQ must not throw on invisibility — fall through with the last screenshot
|
|
336
|
+
// so the analyzer still gets a chance to extract.
|
|
337
|
+
const shot = await _waitForVisibility(page, description, {
|
|
338
|
+
maxRetries: 2,
|
|
339
|
+
retryIntervalMs: 2_000,
|
|
340
|
+
shouldRaise: false,
|
|
341
|
+
});
|
|
342
|
+
let raw;
|
|
343
|
+
try {
|
|
344
|
+
const body = {
|
|
345
|
+
type: 'visual',
|
|
346
|
+
query: description,
|
|
347
|
+
screenshot_b64: shot,
|
|
348
|
+
return_type: opts.returnType ?? 'string',
|
|
349
|
+
};
|
|
350
|
+
if (opts.expectedValue !== undefined) {
|
|
351
|
+
body.expected_value = opts.expectedValue;
|
|
352
|
+
}
|
|
353
|
+
if (opts.codeJs !== undefined) {
|
|
354
|
+
body.code_js = opts.codeJs;
|
|
355
|
+
}
|
|
356
|
+
const resp = await fetchWithAuth(`${config.current.aiApiHost}/api/v1/analyzer`, {
|
|
357
|
+
method: 'POST',
|
|
358
|
+
headers: { 'content-type': 'application/json' },
|
|
359
|
+
body: JSON.stringify(body),
|
|
360
|
+
});
|
|
361
|
+
if (!resp.ok)
|
|
362
|
+
return null;
|
|
363
|
+
const respBody = (await resp.json());
|
|
364
|
+
raw = respBody.extracted_value ?? null;
|
|
365
|
+
}
|
|
366
|
+
catch {
|
|
367
|
+
return null;
|
|
368
|
+
}
|
|
369
|
+
log.helper(`[vision_query] result=${repr(raw)}`);
|
|
370
|
+
// Derivation runs OUTSIDE the catch above: an extraction miss is a null the
|
|
371
|
+
// caller can handle, but a derivation that cannot be recomputed is a step
|
|
372
|
+
// failure — comparing an underived value is never correct.
|
|
373
|
+
if (raw === null || !opts.codeJs)
|
|
374
|
+
return raw;
|
|
375
|
+
return await derive(page, opts.codeJs, raw);
|
|
376
|
+
}
|
|
377
|
+
export async function textualQuery(page, description, optsOrReturnType) {
|
|
378
|
+
if (!config.current.smart)
|
|
379
|
+
return null;
|
|
380
|
+
log.helper(`[textual_query] query=${preview(description, 80)}`);
|
|
381
|
+
// Back-compat: old call sites passed `returnType` as a positional string.
|
|
382
|
+
const opts = typeof optsOrReturnType === 'string'
|
|
383
|
+
? { returnType: optsOrReturnType }
|
|
384
|
+
: optsOrReturnType ?? {};
|
|
385
|
+
// Resolve {{vars}}/${params} before the query leaves the binding.
|
|
386
|
+
description = String((await resolveVar(description)) ?? '');
|
|
387
|
+
const cdp = await page.context().newCDPSession(page);
|
|
388
|
+
try {
|
|
389
|
+
await cdp.send('DOM.enable');
|
|
390
|
+
const a11yResp = await cdp.send('Accessibility.getFullAXTree');
|
|
391
|
+
const flatDom = _buildFlatDom(a11yResp.nodes ?? []);
|
|
392
|
+
const screenshotBytes = await takeScreenshot(page);
|
|
393
|
+
const screenshotB64 = screenshotBytes.toString('base64');
|
|
394
|
+
const identifyResp = await _postAnalyzer({
|
|
395
|
+
type: 'dom',
|
|
396
|
+
query: description,
|
|
397
|
+
full_dom_list: flatDom,
|
|
398
|
+
screenshot_b64: screenshotB64,
|
|
399
|
+
}, ANALYZER_QUERY_TIMEOUT_MS);
|
|
400
|
+
const domIndexRaw = identifyResp['dom_index'];
|
|
401
|
+
if (domIndexRaw === undefined || domIndexRaw === null) {
|
|
402
|
+
throw new Error(`DOM identify step returned no dom_index: ${JSON.stringify(identifyResp)}`);
|
|
403
|
+
}
|
|
404
|
+
const domIndex = Number(domIndexRaw);
|
|
405
|
+
const target = flatDom.find((el) => el.index === domIndex);
|
|
406
|
+
if (!target || target.backend_dom_node_id === undefined) {
|
|
407
|
+
throw new Error(`Element at dom_index=${domIndex} not found or missing backend_dom_node_id`);
|
|
408
|
+
}
|
|
409
|
+
const snapshot = await _getElementSnapshot(cdp, target.backend_dom_node_id);
|
|
410
|
+
const extractBody = {
|
|
411
|
+
type: 'dom',
|
|
412
|
+
query: description,
|
|
413
|
+
element_snapshot: snapshot,
|
|
414
|
+
};
|
|
415
|
+
if (opts.expectedValue !== undefined) {
|
|
416
|
+
extractBody.expected_value = opts.expectedValue;
|
|
417
|
+
}
|
|
418
|
+
const extractResp = await _postAnalyzer(extractBody, ANALYZER_EXTRACT_TIMEOUT_MS);
|
|
419
|
+
const extracted = extractResp['extracted_value'] ?? '';
|
|
420
|
+
log.helper(`[textual_query] result=${repr(extracted)}`);
|
|
421
|
+
return extracted;
|
|
422
|
+
}
|
|
423
|
+
finally {
|
|
424
|
+
try {
|
|
425
|
+
await cdp.detach();
|
|
426
|
+
}
|
|
427
|
+
catch { /* ignore */ }
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
/**
|
|
431
|
+
* Poll the vision wait API until the described condition is met.
|
|
432
|
+
*
|
|
433
|
+
* Smart-gated: returns false immediately when smart is OFF.
|
|
434
|
+
* Returns true when condition met, false when max retries exhausted.
|
|
435
|
+
*/
|
|
436
|
+
export async function visionWait(page, description, timeoutMs = 30_000) {
|
|
437
|
+
if (!config.current.smart)
|
|
438
|
+
return false;
|
|
439
|
+
log.helper(`[vision_wait] query=${preview(description, 80)}`);
|
|
440
|
+
const retries = 5;
|
|
441
|
+
const interval = Math.max(1000, Math.floor(timeoutMs / retries));
|
|
442
|
+
for (let i = 0; i < retries; i++) {
|
|
443
|
+
const shot = (await takeScreenshot(page)).toString('base64');
|
|
444
|
+
try {
|
|
445
|
+
const resp = await fetchWithAuth(`${config.current.aiApiHost}/api/v1/wait/check`, {
|
|
446
|
+
method: 'POST',
|
|
447
|
+
headers: { 'content-type': 'application/json' },
|
|
448
|
+
body: JSON.stringify({ screenshot_b64: shot, query: description }),
|
|
449
|
+
});
|
|
450
|
+
if (resp.ok) {
|
|
451
|
+
const body = (await resp.json());
|
|
452
|
+
log.helper(`[vision_wait] attempt ${i + 1}/${retries} waiting=${body.waiting}`);
|
|
453
|
+
if (body.waiting === false)
|
|
454
|
+
return true;
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
catch {
|
|
458
|
+
// continue polling on transient error
|
|
459
|
+
}
|
|
460
|
+
if (i < retries - 1)
|
|
461
|
+
await new Promise(r => setTimeout(r, interval));
|
|
462
|
+
}
|
|
463
|
+
log.helper(`[vision_wait] max retries exhausted, continuing`);
|
|
464
|
+
return false;
|
|
465
|
+
}
|
|
466
|
+
/**
|
|
467
|
+
* Get vision coordinates and execute click or scroll at those coordinates.
|
|
468
|
+
*
|
|
469
|
+
* Smart-gated via getVisionCoordinates: no-ops when smart is OFF or element not found.
|
|
470
|
+
*/
|
|
471
|
+
export async function visionAction(page, description, actionType, direction = 'down', amount = 300) {
|
|
472
|
+
log.helper(`[vision_action] action=${actionType} query=${preview(description, 60)}`);
|
|
473
|
+
const coords = await getVisionCoordinates(page, description, actionType);
|
|
474
|
+
if (!coords)
|
|
475
|
+
return;
|
|
476
|
+
log.helper(`[vision_action] executing ${actionType} at (${coords.x}, ${coords.y})`);
|
|
477
|
+
if (actionType === 'click') {
|
|
478
|
+
await page.mouse.click(coords.x, coords.y);
|
|
479
|
+
}
|
|
480
|
+
else if (actionType === 'scroll') {
|
|
481
|
+
const dx = direction === 'left' ? -amount : direction === 'right' ? amount : 0;
|
|
482
|
+
const dy = direction === 'up' ? -amount : direction === 'down' ? amount : 0;
|
|
483
|
+
await page.mouse.move(coords.x, coords.y);
|
|
484
|
+
await page.mouse.wheel(dx, dy);
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
//# sourceMappingURL=vision.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vision.js","sourceRoot":"","sources":["../../../src/v4/helpers/vision.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACvD,OAAO,EAAE,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CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC;QAC1C,MAAM,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;IACjC,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Page } from 'playwright';
|
|
2
|
+
import type { Condition } from './condition.js';
|
|
3
|
+
/**
|
|
4
|
+
* Until-loop condition check — TWO forms, selected by argument type (the V3
|
|
5
|
+
* contract's deliberate divergence: a Condition crosses the boundary as a
|
|
6
|
+
* LIVE OBJECT, never a stringified repr the binding evals):
|
|
7
|
+
*
|
|
8
|
+
* - `Condition` instance → LOCAL evaluation against the variable store. No
|
|
9
|
+
* screenshot, no vision endpoint. Unevaluable throws
|
|
10
|
+
* ConditionEvaluationError — an authoring/generation error, never a
|
|
11
|
+
* "condition not met" result (Top-15 #5: a silent false lets the retry
|
|
12
|
+
* loop exhaust its budget while masking the real problem).
|
|
13
|
+
* - `string` → the V4 vision path, byte-identical to the previous behavior.
|
|
14
|
+
*/
|
|
15
|
+
export declare function checkUntilCondition(page: Page, condition: string | Condition): Promise<boolean>;
|
|
16
|
+
//# sourceMappingURL=wait.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wait.d.ts","sourceRoot":"","sources":["../../../src/v4/helpers/wait.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAMvC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEhD;;;;;;;;;;;GAWG;AACH,wBAAsB,mBAAmB,CACvC,IAAI,EAAE,IAAI,EACV,SAAS,EAAE,MAAM,GAAG,SAAS,GAC5B,OAAO,CAAC,OAAO,CAAC,CA0BlB"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { config } from '../../config.js';
|
|
2
|
+
import { fetchWithAuth } from '../http.js';
|
|
3
|
+
import { log, preview } from '../../log.js';
|
|
4
|
+
import { takeScreenshot } from './screenshot.js';
|
|
5
|
+
import { ConditionEvaluationError } from '../../errors.js';
|
|
6
|
+
/**
|
|
7
|
+
* Until-loop condition check — TWO forms, selected by argument type (the V3
|
|
8
|
+
* contract's deliberate divergence: a Condition crosses the boundary as a
|
|
9
|
+
* LIVE OBJECT, never a stringified repr the binding evals):
|
|
10
|
+
*
|
|
11
|
+
* - `Condition` instance → LOCAL evaluation against the variable store. No
|
|
12
|
+
* screenshot, no vision endpoint. Unevaluable throws
|
|
13
|
+
* ConditionEvaluationError — an authoring/generation error, never a
|
|
14
|
+
* "condition not met" result (Top-15 #5: a silent false lets the retry
|
|
15
|
+
* loop exhaust its budget while masking the real problem).
|
|
16
|
+
* - `string` → the V4 vision path, byte-identical to the previous behavior.
|
|
17
|
+
*/
|
|
18
|
+
export async function checkUntilCondition(page, condition) {
|
|
19
|
+
if (typeof condition !== 'string') {
|
|
20
|
+
try {
|
|
21
|
+
const [ok] = await condition.evaluate();
|
|
22
|
+
log.helper(`[check_until_condition] local eval -> ${ok}`);
|
|
23
|
+
return ok;
|
|
24
|
+
}
|
|
25
|
+
catch (e) {
|
|
26
|
+
if (e?.name === 'ConditionEvaluationError')
|
|
27
|
+
throw e;
|
|
28
|
+
throw new ConditionEvaluationError(JSON.stringify(condition.toDict()), e);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
if (!config.current.smart) {
|
|
32
|
+
log.helper(`[check_until_condition] smart is OFF — returning False (condition skipped)`);
|
|
33
|
+
return false;
|
|
34
|
+
}
|
|
35
|
+
log.helper(`[check_until_condition] condition=${preview(condition, 80)}`);
|
|
36
|
+
const shot = (await takeScreenshot(page)).toString('base64');
|
|
37
|
+
const resp = await fetchWithAuth(`${config.current.aiApiHost}/api/v1/visibility/check`, {
|
|
38
|
+
method: 'POST', headers: { 'content-type': 'application/json' },
|
|
39
|
+
body: JSON.stringify({ screenshot_b64: shot, query: condition }),
|
|
40
|
+
});
|
|
41
|
+
if (!resp.ok)
|
|
42
|
+
return false;
|
|
43
|
+
const body = (await resp.json());
|
|
44
|
+
log.helper(`[check_until_condition] condition check: visible=${body.visible}, confidence=${body.confidence}`);
|
|
45
|
+
// Parity with the m-hps UntilBlock evaluator: missing "visible" defaults to condition-met.
|
|
46
|
+
return body.visible ?? true;
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=wait.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wait.js","sourceRoot":"","sources":["../../../src/v4/helpers/wait.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAG3D;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,KAAK,UAAU,mBAAmB,CACvC,IAAU,EACV,SAA6B;IAE7B,IAAI,OAAO,SAAS,KAAK,QAAQ,EAAE,CAAC;QAClC,IAAI,CAAC;YACH,MAAM,CAAC,EAAE,CAAC,GAAG,MAAM,SAAS,CAAC,QAAQ,EAAE,CAAC;YACxC,GAAG,CAAC,MAAM,CAAC,yCAAyC,EAAE,EAAE,CAAC,CAAC;YAC1D,OAAO,EAAE,CAAC;QACZ,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,IAAK,CAAW,EAAE,IAAI,KAAK,0BAA0B;gBAAE,MAAM,CAAC,CAAC;YAC/D,MAAM,IAAI,wBAAwB,CAAC,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,MAAM,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;QAC5E,CAAC;IACH,CAAC;IACD,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;QAC1B,GAAG,CAAC,MAAM,CAAC,4EAA4E,CAAC,CAAC;QACzF,OAAO,KAAK,CAAC;IACf,CAAC;IACD,GAAG,CAAC,MAAM,CAAC,qCAAqC,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC;IAC1E,MAAM,IAAI,GAAG,CAAC,MAAM,cAAc,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAC7D,MAAM,IAAI,GAAG,MAAM,aAAa,CAAC,GAAG,MAAM,CAAC,OAAO,CAAC,SAAS,0BAA0B,EAAE;QACtF,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,cAAc,EAAE,kBAAkB,EAAE;QAC/D,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,cAAc,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC;KACjE,CAAC,CAAC;IACH,IAAI,CAAC,IAAI,CAAC,EAAE;QAAE,OAAO,KAAK,CAAC;IAC3B,MAAM,IAAI,GAAG,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,CAA+C,CAAC;IAC/E,GAAG,CAAC,MAAM,CAAC,oDAAoD,IAAI,CAAC,OAAO,gBAAgB,IAAI,CAAC,UAAU,EAAE,CAAC,CAAC;IAC9G,2FAA2F;IAC3F,OAAO,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC;AAC9B,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared fetch wrapper with LT Basic auth + session tracking headers.
|
|
3
|
+
*
|
|
4
|
+
* All ATMS/vision/automind HTTP calls go through fetchWithAuth.
|
|
5
|
+
* - Adds Authorization: Basic base64(LT_USERNAME:LT_ACCESS_KEY) when env vars present.
|
|
6
|
+
* - Adds x-session-id when TESTMUAI_SESSION_ID is set.
|
|
7
|
+
* - Adds x-source (defaults to "local"; forge sets TESTMUAI_SOURCE=hyperexecute
|
|
8
|
+
* in all cloud YAML paths).
|
|
9
|
+
* - Adds x-test-id (configure() then env).
|
|
10
|
+
*/
|
|
11
|
+
export declare function attributionHeaders(): Record<string, string>;
|
|
12
|
+
export declare function ltAuthHeader(): string | null;
|
|
13
|
+
export declare function fetchWithAuth(url: string, init?: RequestInit): Promise<Response>;
|
|
14
|
+
//# sourceMappingURL=http.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../../src/v4/http.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAKH,wBAAgB,kBAAkB,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAY3D;AAED,wBAAgB,YAAY,IAAI,MAAM,GAAG,IAAI,CAM5C;AAED,wBAAsB,aAAa,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,GAAE,WAAgB,GAAG,OAAO,CAAC,QAAQ,CAAC,CAS1F"}
|
package/dist/v4/http.js
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared fetch wrapper with LT Basic auth + session tracking headers.
|
|
3
|
+
*
|
|
4
|
+
* All ATMS/vision/automind HTTP calls go through fetchWithAuth.
|
|
5
|
+
* - Adds Authorization: Basic base64(LT_USERNAME:LT_ACCESS_KEY) when env vars present.
|
|
6
|
+
* - Adds x-session-id when TESTMUAI_SESSION_ID is set.
|
|
7
|
+
* - Adds x-source (defaults to "local"; forge sets TESTMUAI_SOURCE=hyperexecute
|
|
8
|
+
* in all cloud YAML paths).
|
|
9
|
+
* - Adds x-test-id (configure() then env).
|
|
10
|
+
*/
|
|
11
|
+
import { get as getConfigValue } from '../configure.js';
|
|
12
|
+
import { getInstructionId } from './step.js';
|
|
13
|
+
export function attributionHeaders() {
|
|
14
|
+
const headers = {};
|
|
15
|
+
const sessionId = process.env['TESTMUAI_SESSION_ID'];
|
|
16
|
+
if (sessionId)
|
|
17
|
+
headers['x-session-id'] = sessionId;
|
|
18
|
+
headers['x-source'] = process.env['TESTMUAI_SOURCE'] ?? 'local';
|
|
19
|
+
const testId = getConfigValue('testId')
|
|
20
|
+
|| process.env['TESTMUAI_TEST_ID']
|
|
21
|
+
|| process.env['TEST_ID'];
|
|
22
|
+
if (testId)
|
|
23
|
+
headers['x-test-id'] = testId;
|
|
24
|
+
const instructionId = getInstructionId();
|
|
25
|
+
if (instructionId)
|
|
26
|
+
headers['x-instruction-id'] = instructionId;
|
|
27
|
+
return headers;
|
|
28
|
+
}
|
|
29
|
+
export function ltAuthHeader() {
|
|
30
|
+
const user = process.env['LT_USERNAME'];
|
|
31
|
+
const key = process.env['LT_ACCESS_KEY'];
|
|
32
|
+
if (!user || !key)
|
|
33
|
+
return null;
|
|
34
|
+
const encoded = Buffer.from(`${user}:${key}`).toString('base64');
|
|
35
|
+
return `Basic ${encoded}`;
|
|
36
|
+
}
|
|
37
|
+
export async function fetchWithAuth(url, init = {}) {
|
|
38
|
+
const auth = ltAuthHeader();
|
|
39
|
+
const headers = { ...(init.headers ?? {}) };
|
|
40
|
+
if (auth)
|
|
41
|
+
headers['Authorization'] = auth;
|
|
42
|
+
Object.assign(headers, attributionHeaders());
|
|
43
|
+
return fetch(url, { ...init, headers });
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=http.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http.js","sourceRoot":"","sources":["../../src/v4/http.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,GAAG,IAAI,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAE7C,MAAM,UAAU,kBAAkB;IAChC,MAAM,OAAO,GAA2B,EAAE,CAAC;IAC3C,MAAM,SAAS,GAAG,OAAO,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC;IACrD,IAAI,SAAS;QAAE,OAA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