@midscene/core 1.12.10-beta-20260920031616.0 → 1.13.0
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/es/agent/agent.mjs +103 -6
- package/dist/es/agent/agent.mjs.map +1 -1
- package/dist/es/agent/index.mjs +4 -3
- package/dist/es/agent/tasks.mjs +2 -2
- package/dist/es/agent/tasks.mjs.map +1 -1
- package/dist/es/agent/test-runner-nodes.mjs +291 -40
- package/dist/es/agent/test-runner-nodes.mjs.map +1 -1
- package/dist/es/agent/utils.mjs +1 -1
- package/dist/es/device/index.mjs +15 -2
- package/dist/es/device/index.mjs.map +1 -1
- package/dist/es/dump/html-utils.mjs +37 -4
- package/dist/es/dump/html-utils.mjs.map +1 -1
- package/dist/es/dump/screenshot-store.mjs +8 -1
- package/dist/es/dump/screenshot-store.mjs.map +1 -1
- package/dist/es/report-cli.mjs +9 -4
- package/dist/es/report-cli.mjs.map +1 -1
- package/dist/es/report-generator.mjs +117 -4
- package/dist/es/report-generator.mjs.map +1 -1
- package/dist/es/report-html-template.mjs +1 -1
- package/dist/es/report.mjs +190 -41
- package/dist/es/report.mjs.map +1 -1
- package/dist/es/test-run-report.mjs.map +1 -1
- package/dist/es/test-runner/engine/case-runner.mjs +52 -0
- package/dist/es/test-runner/engine/case-runner.mjs.map +1 -0
- package/dist/es/test-runner/engine/document-runtime.mjs +273 -0
- package/dist/es/test-runner/engine/document-runtime.mjs.map +1 -0
- package/dist/es/test-runner/engine/execute-step.mjs +177 -0
- package/dist/es/test-runner/engine/execute-step.mjs.map +1 -0
- package/dist/es/test-runner/engine/execution-failure.mjs +39 -0
- package/dist/es/test-runner/engine/execution-failure.mjs.map +1 -0
- package/dist/es/test-runner/engine/index.mjs +12 -0
- package/dist/es/test-runner/engine/project-runtime.mjs +142 -0
- package/dist/es/test-runner/engine/project-runtime.mjs.map +1 -0
- package/dist/es/test-runner/engine/registry.mjs +61 -0
- package/dist/es/test-runner/engine/registry.mjs.map +1 -0
- package/dist/es/test-runner/engine/resource-operations.mjs +211 -0
- package/dist/es/test-runner/engine/resource-operations.mjs.map +1 -0
- package/dist/es/test-runner/engine/run-collected-case.mjs +193 -0
- package/dist/es/test-runner/engine/run-collected-case.mjs.map +1 -0
- package/dist/es/test-runner/engine/run-workflow-document.mjs +155 -0
- package/dist/es/test-runner/engine/run-workflow-document.mjs.map +1 -0
- package/dist/es/test-runner/engine/scheduler.mjs +27 -0
- package/dist/es/test-runner/engine/scheduler.mjs.map +1 -0
- package/dist/es/test-runner/engine/scope-teardown.mjs +16 -0
- package/dist/es/test-runner/engine/scope-teardown.mjs.map +1 -0
- package/dist/es/test-runner/engine/types.mjs +0 -0
- package/dist/es/test-runner/errors.mjs +201 -0
- package/dist/es/test-runner/errors.mjs.map +1 -0
- package/dist/es/test-runner/execution-record.mjs +83 -0
- package/dist/es/test-runner/execution-record.mjs.map +1 -0
- package/dist/es/test-runner/index.mjs +12 -0
- package/dist/es/test-runner/node/define-node.mjs +44 -0
- package/dist/es/test-runner/node/define-node.mjs.map +1 -0
- package/dist/es/test-runner/node/index.mjs +2 -0
- package/dist/es/test-runner/node/types.mjs +0 -0
- package/dist/es/test-runner/parser/document-format.mjs +21 -0
- package/dist/es/test-runner/parser/document-format.mjs.map +1 -0
- package/dist/es/test-runner/parser/normalize.mjs +87 -0
- package/dist/es/test-runner/parser/normalize.mjs.map +1 -0
- package/dist/es/test-runner/parser/types.mjs +0 -0
- package/dist/es/test-runner/project.mjs +0 -0
- package/dist/es/test-runner/reporting/agent-report.mjs +23 -0
- package/dist/es/test-runner/reporting/agent-report.mjs.map +1 -0
- package/dist/es/test-runner/reporting/execution-record.mjs +73 -0
- package/dist/es/test-runner/reporting/execution-record.mjs.map +1 -0
- package/dist/es/test-runner/reporting/merge-report.mjs +231 -0
- package/dist/es/test-runner/reporting/merge-report.mjs.map +1 -0
- package/dist/es/test-runner/reporting/sanitize.mjs +162 -0
- package/dist/es/test-runner/reporting/sanitize.mjs.map +1 -0
- package/dist/es/test-runner/reporting/test-run-report.mjs +327 -0
- package/dist/es/test-runner/reporting/test-run-report.mjs.map +1 -0
- package/dist/es/test-runner/reporting/types.mjs +0 -0
- package/dist/es/utils.mjs +1 -1
- package/dist/es/yaml/execution-context.node.mjs +6 -0
- package/dist/es/yaml/execution-context.node.mjs.map +1 -0
- package/dist/es/yaml/execution-context.stub.mjs +8 -0
- package/dist/es/yaml/execution-context.stub.mjs.map +1 -0
- package/dist/es/yaml/execution-session.mjs +90 -0
- package/dist/es/yaml/execution-session.mjs.map +1 -0
- package/dist/es/yaml/index.mjs +2 -1
- package/dist/es/yaml/legacy-yaml-execution-record.mjs +47 -0
- package/dist/es/yaml/legacy-yaml-execution-record.mjs.map +1 -0
- package/dist/es/yaml/legacy-yaml-report.mjs +52 -0
- package/dist/es/yaml/legacy-yaml-report.mjs.map +1 -0
- package/dist/es/yaml/legacy-yaml-runtime.mjs +119 -0
- package/dist/es/yaml/legacy-yaml-runtime.mjs.map +1 -0
- package/dist/es/yaml/player-state.mjs +15 -0
- package/dist/es/yaml/player-state.mjs.map +1 -0
- package/dist/es/yaml/player.mjs +214 -348
- package/dist/es/yaml/player.mjs.map +1 -1
- package/dist/es/yaml/report-policy.mjs +7 -0
- package/dist/es/yaml/report-policy.mjs.map +1 -0
- package/dist/es/yaml/test-runner-compat.mjs +301 -0
- package/dist/es/yaml/test-runner-compat.mjs.map +1 -0
- package/dist/es/yaml/test-runner-nodes.mjs +147 -0
- package/dist/es/yaml/test-runner-nodes.mjs.map +1 -0
- package/dist/es/yaml/utils.mjs +12 -1
- package/dist/es/yaml/utils.mjs.map +1 -1
- package/dist/es/yaml-runtime.mjs +7 -0
- package/dist/es/yaml.mjs.map +1 -1
- package/dist/lib/agent/agent.js +103 -6
- package/dist/lib/agent/agent.js.map +1 -1
- package/dist/lib/agent/index.js +37 -3
- package/dist/lib/agent/tasks.js +2 -2
- package/dist/lib/agent/tasks.js.map +1 -1
- package/dist/lib/agent/test-runner-nodes.js +329 -45
- package/dist/lib/agent/test-runner-nodes.js.map +1 -1
- package/dist/lib/agent/utils.js +1 -1
- package/dist/lib/device/index.js +15 -2
- package/dist/lib/device/index.js.map +1 -1
- package/dist/lib/dump/html-utils.js +43 -4
- package/dist/lib/dump/html-utils.js.map +1 -1
- package/dist/lib/dump/screenshot-store.js +8 -1
- package/dist/lib/dump/screenshot-store.js.map +1 -1
- package/dist/lib/report-cli.js +8 -3
- package/dist/lib/report-cli.js.map +1 -1
- package/dist/lib/report-generator.js +114 -1
- package/dist/lib/report-generator.js.map +1 -1
- package/dist/lib/report-html-template.js +1 -1
- package/dist/lib/report.js +187 -38
- package/dist/lib/report.js.map +1 -1
- package/dist/lib/test-run-report.js.map +1 -1
- package/dist/lib/test-runner/engine/case-runner.js +89 -0
- package/dist/lib/test-runner/engine/case-runner.js.map +1 -0
- package/dist/lib/test-runner/engine/document-runtime.js +307 -0
- package/dist/lib/test-runner/engine/document-runtime.js.map +1 -0
- package/dist/lib/test-runner/engine/execute-step.js +211 -0
- package/dist/lib/test-runner/engine/execute-step.js.map +1 -0
- package/dist/lib/test-runner/engine/execution-failure.js +79 -0
- package/dist/lib/test-runner/engine/execution-failure.js.map +1 -0
- package/dist/lib/test-runner/engine/index.js +137 -0
- package/dist/lib/test-runner/engine/index.js.map +1 -0
- package/dist/lib/test-runner/engine/project-runtime.js +176 -0
- package/dist/lib/test-runner/engine/project-runtime.js.map +1 -0
- package/dist/lib/test-runner/engine/registry.js +95 -0
- package/dist/lib/test-runner/engine/registry.js.map +1 -0
- package/dist/lib/test-runner/engine/resource-operations.js +272 -0
- package/dist/lib/test-runner/engine/resource-operations.js.map +1 -0
- package/dist/lib/test-runner/engine/run-collected-case.js +227 -0
- package/dist/lib/test-runner/engine/run-collected-case.js.map +1 -0
- package/dist/lib/test-runner/engine/run-workflow-document.js +189 -0
- package/dist/lib/test-runner/engine/run-workflow-document.js.map +1 -0
- package/dist/lib/test-runner/engine/scheduler.js +64 -0
- package/dist/lib/test-runner/engine/scheduler.js.map +1 -0
- package/dist/lib/test-runner/engine/scope-teardown.js +50 -0
- package/dist/lib/test-runner/engine/scope-teardown.js.map +1 -0
- package/dist/lib/test-runner/engine/types.js +20 -0
- package/dist/lib/test-runner/engine/types.js.map +1 -0
- package/dist/lib/test-runner/errors.js +283 -0
- package/dist/lib/test-runner/errors.js.map +1 -0
- package/dist/lib/test-runner/execution-record.js +123 -0
- package/dist/lib/test-runner/execution-record.js.map +1 -0
- package/dist/lib/test-runner/index.js +137 -0
- package/dist/lib/test-runner/index.js.map +1 -0
- package/dist/lib/test-runner/node/define-node.js +78 -0
- package/dist/lib/test-runner/node/define-node.js.map +1 -0
- package/dist/lib/test-runner/node/index.js +67 -0
- package/dist/lib/test-runner/node/index.js.map +1 -0
- package/dist/lib/test-runner/node/types.js +20 -0
- package/dist/lib/test-runner/node/types.js.map +1 -0
- package/dist/lib/test-runner/parser/document-format.js +58 -0
- package/dist/lib/test-runner/parser/document-format.js.map +1 -0
- package/dist/lib/test-runner/parser/normalize.js +124 -0
- package/dist/lib/test-runner/parser/normalize.js.map +1 -0
- package/dist/lib/test-runner/parser/types.js +20 -0
- package/dist/lib/test-runner/parser/types.js.map +1 -0
- package/dist/lib/test-runner/project.js +20 -0
- package/dist/lib/test-runner/project.js.map +1 -0
- package/dist/lib/test-runner/reporting/agent-report.js +57 -0
- package/dist/lib/test-runner/reporting/agent-report.js.map +1 -0
- package/dist/lib/test-runner/reporting/execution-record.js +107 -0
- package/dist/lib/test-runner/reporting/execution-record.js.map +1 -0
- package/dist/lib/test-runner/reporting/merge-report.js +265 -0
- package/dist/lib/test-runner/reporting/merge-report.js.map +1 -0
- package/dist/lib/test-runner/reporting/sanitize.js +202 -0
- package/dist/lib/test-runner/reporting/sanitize.js.map +1 -0
- package/dist/lib/test-runner/reporting/test-run-report.js +364 -0
- package/dist/lib/test-runner/reporting/test-run-report.js.map +1 -0
- package/dist/lib/test-runner/reporting/types.js +20 -0
- package/dist/lib/test-runner/reporting/types.js.map +1 -0
- package/dist/lib/utils.js +1 -1
- package/dist/lib/yaml/execution-context.node.js +43 -0
- package/dist/lib/yaml/execution-context.node.js.map +1 -0
- package/dist/lib/yaml/execution-context.stub.js +45 -0
- package/dist/lib/yaml/execution-context.stub.js.map +1 -0
- package/dist/lib/yaml/execution-session.js +136 -0
- package/dist/lib/yaml/execution-session.js.map +1 -0
- package/dist/lib/yaml/index.js +49 -7
- package/dist/lib/yaml/legacy-yaml-execution-record.js +81 -0
- package/dist/lib/yaml/legacy-yaml-execution-record.js.map +1 -0
- package/dist/lib/yaml/legacy-yaml-report.js +86 -0
- package/dist/lib/yaml/legacy-yaml-report.js.map +1 -0
- package/dist/lib/yaml/legacy-yaml-runtime.js +156 -0
- package/dist/lib/yaml/legacy-yaml-runtime.js.map +1 -0
- package/dist/lib/yaml/player-state.js +52 -0
- package/dist/lib/yaml/player-state.js.map +1 -0
- package/dist/lib/yaml/player.js +213 -347
- package/dist/lib/yaml/player.js.map +1 -1
- package/dist/lib/yaml/report-policy.js +41 -0
- package/dist/lib/yaml/report-policy.js.map +1 -0
- package/dist/lib/yaml/test-runner-compat.js +344 -0
- package/dist/lib/yaml/test-runner-compat.js.map +1 -0
- package/dist/lib/yaml/test-runner-nodes.js +184 -0
- package/dist/lib/yaml/test-runner-nodes.js.map +1 -0
- package/dist/lib/yaml/utils.js +18 -1
- package/dist/lib/yaml/utils.js.map +1 -1
- package/dist/lib/yaml-runtime.js +67 -0
- package/dist/lib/yaml-runtime.js.map +1 -0
- package/dist/lib/yaml.js.map +1 -1
- package/dist/types/agent/agent.d.ts +14 -1
- package/dist/types/agent/agent.d.ts.map +1 -1
- package/dist/types/agent/index.d.ts +4 -3
- package/dist/types/agent/index.d.ts.map +1 -1
- package/dist/types/agent/tasks.d.ts +1 -1
- package/dist/types/agent/tasks.d.ts.map +1 -1
- package/dist/types/agent/test-runner-nodes.d.ts +226 -0
- package/dist/types/agent/test-runner-nodes.d.ts.map +1 -1
- package/dist/types/device/index.d.ts +1 -1
- package/dist/types/device/index.d.ts.map +1 -1
- package/dist/types/dump/html-utils.d.ts +4 -0
- package/dist/types/dump/html-utils.d.ts.map +1 -1
- package/dist/types/dump/screenshot-store.d.ts +2 -1
- package/dist/types/dump/screenshot-store.d.ts.map +1 -1
- package/dist/types/report-cli.d.ts.map +1 -1
- package/dist/types/report-generator.d.ts +10 -0
- package/dist/types/report-generator.d.ts.map +1 -1
- package/dist/types/report.d.ts +3 -1
- package/dist/types/report.d.ts.map +1 -1
- package/dist/types/test-run-report.d.ts +18 -2
- package/dist/types/test-run-report.d.ts.map +1 -1
- package/dist/types/test-runner/engine/case-runner.d.ts +13 -0
- package/dist/types/test-runner/engine/case-runner.d.ts.map +1 -0
- package/dist/types/test-runner/engine/document-runtime.d.ts +4 -0
- package/dist/types/test-runner/engine/document-runtime.d.ts.map +1 -0
- package/dist/types/test-runner/engine/execute-step.d.ts +17 -0
- package/dist/types/test-runner/engine/execute-step.d.ts.map +1 -0
- package/dist/types/test-runner/engine/execution-failure.d.ts +13 -0
- package/dist/types/test-runner/engine/execution-failure.d.ts.map +1 -0
- package/dist/types/test-runner/engine/index.d.ts +13 -0
- package/dist/types/test-runner/engine/index.d.ts.map +1 -0
- package/dist/types/test-runner/engine/project-runtime.d.ts +3 -0
- package/dist/types/test-runner/engine/project-runtime.d.ts.map +1 -0
- package/dist/types/test-runner/engine/registry.d.ts +12 -0
- package/dist/types/test-runner/engine/registry.d.ts.map +1 -0
- package/dist/types/test-runner/engine/resource-operations.d.ts +32 -0
- package/dist/types/test-runner/engine/resource-operations.d.ts.map +1 -0
- package/dist/types/test-runner/engine/run-collected-case.d.ts +4 -0
- package/dist/types/test-runner/engine/run-collected-case.d.ts.map +1 -0
- package/dist/types/test-runner/engine/run-workflow-document.d.ts +4 -0
- package/dist/types/test-runner/engine/run-workflow-document.d.ts.map +1 -0
- package/dist/types/test-runner/engine/scheduler.d.ts +12 -0
- package/dist/types/test-runner/engine/scheduler.d.ts.map +1 -0
- package/dist/types/test-runner/engine/scope-teardown.d.ts +3 -0
- package/dist/types/test-runner/engine/scope-teardown.d.ts.map +1 -0
- package/dist/types/test-runner/engine/types.d.ts +226 -0
- package/dist/types/test-runner/engine/types.d.ts.map +1 -0
- package/dist/types/test-runner/errors.d.ts +79 -0
- package/dist/types/test-runner/errors.d.ts.map +1 -0
- package/dist/types/test-runner/execution-record.d.ts +43 -0
- package/dist/types/test-runner/execution-record.d.ts.map +1 -0
- package/dist/types/test-runner/index.d.ts +20 -0
- package/dist/types/test-runner/index.d.ts.map +1 -0
- package/dist/types/test-runner/node/define-node.d.ts +4 -0
- package/dist/types/test-runner/node/define-node.d.ts.map +1 -0
- package/dist/types/test-runner/node/index.d.ts +3 -0
- package/dist/types/test-runner/node/index.d.ts.map +1 -0
- package/dist/types/test-runner/node/types.d.ts +66 -0
- package/dist/types/test-runner/node/types.d.ts.map +1 -0
- package/dist/types/test-runner/parser/document-format.d.ts +8 -0
- package/dist/types/test-runner/parser/document-format.d.ts.map +1 -0
- package/dist/types/test-runner/parser/normalize.d.ts +9 -0
- package/dist/types/test-runner/parser/normalize.d.ts.map +1 -0
- package/dist/types/test-runner/parser/types.d.ts +69 -0
- package/dist/types/test-runner/parser/types.d.ts.map +1 -0
- package/dist/types/test-runner/project.d.ts +75 -0
- package/dist/types/test-runner/project.d.ts.map +1 -0
- package/dist/types/test-runner/reporting/agent-report.d.ts +9 -0
- package/dist/types/test-runner/reporting/agent-report.d.ts.map +1 -0
- package/dist/types/test-runner/reporting/execution-record.d.ts +9 -0
- package/dist/types/test-runner/reporting/execution-record.d.ts.map +1 -0
- package/dist/types/test-runner/reporting/merge-report.d.ts +15 -0
- package/dist/types/test-runner/reporting/merge-report.d.ts.map +1 -0
- package/dist/types/test-runner/reporting/sanitize.d.ts +6 -0
- package/dist/types/test-runner/reporting/sanitize.d.ts.map +1 -0
- package/dist/types/test-runner/reporting/test-run-report.d.ts +5 -0
- package/dist/types/test-runner/reporting/test-run-report.d.ts.map +1 -0
- package/dist/types/test-runner/reporting/types.d.ts +34 -0
- package/dist/types/test-runner/reporting/types.d.ts.map +1 -0
- package/dist/types/yaml/execution-context.node.d.ts +4 -0
- package/dist/types/yaml/execution-context.node.d.ts.map +1 -0
- package/dist/types/yaml/execution-context.stub.d.ts +6 -0
- package/dist/types/yaml/execution-context.stub.d.ts.map +1 -0
- package/dist/types/yaml/execution-session.d.ts +17 -0
- package/dist/types/yaml/execution-session.d.ts.map +1 -0
- package/dist/types/yaml/index.d.ts +1 -1
- package/dist/types/yaml/index.d.ts.map +1 -1
- package/dist/types/yaml/legacy-yaml-execution-record.d.ts +24 -0
- package/dist/types/yaml/legacy-yaml-execution-record.d.ts.map +1 -0
- package/dist/types/yaml/legacy-yaml-report.d.ts +19 -0
- package/dist/types/yaml/legacy-yaml-report.d.ts.map +1 -0
- package/dist/types/yaml/legacy-yaml-runtime.d.ts +23 -0
- package/dist/types/yaml/legacy-yaml-runtime.d.ts.map +1 -0
- package/dist/types/yaml/player-state.d.ts +11 -0
- package/dist/types/yaml/player-state.d.ts.map +1 -0
- package/dist/types/yaml/player.d.ts +11 -3
- package/dist/types/yaml/player.d.ts.map +1 -1
- package/dist/types/yaml/report-policy.d.ts +4 -0
- package/dist/types/yaml/report-policy.d.ts.map +1 -0
- package/dist/types/yaml/test-runner-compat.d.ts +17 -0
- package/dist/types/yaml/test-runner-compat.d.ts.map +1 -0
- package/dist/types/yaml/test-runner-nodes.d.ts +6 -0
- package/dist/types/yaml/test-runner-nodes.d.ts.map +1 -0
- package/dist/types/yaml/utils.d.ts +9 -0
- package/dist/types/yaml/utils.d.ts.map +1 -1
- package/dist/types/yaml-runtime.d.ts +13 -0
- package/dist/types/yaml-runtime.d.ts.map +1 -0
- package/dist/types/yaml.d.ts +25 -7
- package/dist/types/yaml.d.ts.map +1 -1
- package/package.json +28 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"test-runner/reporting/test-run-report.js","sources":["webpack/runtime/define_property_getters","webpack/runtime/has_own_property","webpack/runtime/make_namespace_object","../../../../src/test-runner/reporting/test-run-report.ts"],"sourcesContent":["__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n }\n }\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import type {\n IndexedTestRunReportSource,\n TestRunReportAgentDetail,\n TestRunReportAttempt,\n TestRunReportCase,\n TestRunReportDiagnostic,\n TestRunReportDocument,\n TestRunReportDump,\n TestRunReportProject,\n TestRunReportSource,\n TestRunReportSourceIndex,\n TestRunReportStep,\n} from '../../test-run-report';\nimport type {\n CaseRunResult,\n StepRunResult,\n WorkflowDocumentRunResult,\n} from '../engine/types';\nimport {\n sanitizeReportError,\n sanitizeReportText,\n sanitizeReportValue,\n} from './sanitize';\nimport type { RunReportCaseInput, RunReportInput } from './types';\n\nconst exactMidsceneDetailNodes = new Set([\n 'aiAct',\n 'aiAssert',\n 'recordToReport',\n]);\n\ninterface ManifestBuildContext {\n diagnostics: TestRunReportDiagnostic[];\n sourcesByScope: Map<string, IndexedTestRunReportSource[]>;\n detailsByScopeAndExecution: Map<string, TestRunReportAgentDetail>;\n tracedScopeByExecution: Map<string, string>;\n}\n\nconst scopedExecutionKey = (scopeId: string, executionId: string): string =>\n `${scopeId}\\u0000${executionId}`;\n\nconst reportSourcesForScope = (\n context: ManifestBuildContext,\n scopeId: string,\n): IndexedTestRunReportSource[] => context.sourcesByScope.get(scopeId) ?? [];\n\nconst addDiagnostic = (\n context: ManifestBuildContext,\n diagnostic: TestRunReportDiagnostic,\n): void => {\n context.diagnostics.push(diagnostic);\n};\n\nconst buildStep = (\n step: StepRunResult,\n scopeId: string,\n context: ManifestBuildContext,\n executionId: string,\n): TestRunReportStep => {\n const details: TestRunReportAgentDetail[] = [];\n const unresolvedExecutionIds: string[] = [];\n for (const trace of step.report?.traces ?? []) {\n const previousScope = context.tracedScopeByExecution.get(trace.executionId);\n if (previousScope && previousScope !== scopeId) {\n throw new Error(\n `Agent execution ${trace.executionId} was traced by multiple test scopes (${previousScope}, ${scopeId}).`,\n );\n }\n context.tracedScopeByExecution.set(trace.executionId, scopeId);\n const detail = context.detailsByScopeAndExecution.get(\n scopedExecutionKey(scopeId, trace.executionId),\n );\n if (detail) details.push(detail);\n else unresolvedExecutionIds.push(trace.executionId);\n }\n\n let agentDetailDiagnostic: string | undefined;\n if (unresolvedExecutionIds.length > 0) {\n agentDetailDiagnostic = `Agent detail could not be resolved for ${unresolvedExecutionIds.join(', ')}.`;\n const sources = reportSourcesForScope(context, scopeId);\n for (const executionId of unresolvedExecutionIds) {\n addDiagnostic(context, {\n level: 'warning',\n code: 'agent-detail-unresolved',\n message: `Agent detail could not be resolved for execution ${executionId} in test scope ${scopeId}.`,\n scopeId,\n executionId,\n ...(sources.length > 0\n ? { sourcePaths: sources.map((source) => source.sourcePath) }\n : {}),\n });\n }\n } else if (details.length === 0 && exactMidsceneDetailNodes.has(step.node)) {\n agentDetailDiagnostic =\n 'This Agent did not expose a stable execution reference for the Step.';\n addDiagnostic(context, {\n level: 'warning',\n code: 'agent-detail-unavailable',\n message: `No stable Agent execution reference was captured for ${step.node} in test scope ${scopeId}.`,\n scopeId,\n ...(reportSourcesForScope(context, scopeId).length > 0\n ? {\n sourcePaths: reportSourcesForScope(context, scopeId).map(\n (source) => source.sourcePath,\n ),\n }\n : {}),\n });\n }\n\n const input = step.input as Record<string, unknown> | undefined;\n const candidateTitle =\n input?.prompt ?? input?.script ?? input?.scenario ?? input?.title;\n const prompt =\n typeof candidateTitle === 'string'\n ? candidateTitle\n : typeof candidateTitle === 'object' &&\n candidateTitle !== null &&\n 'prompt' in candidateTitle &&\n typeof candidateTitle.prompt === 'string'\n ? candidateTitle.prompt\n : undefined;\n return {\n id: `${executionId}:${step.phase}:${step.stepIndex}`,\n phase: step.phase,\n stepIndex: step.stepIndex,\n node: step.node,\n ...(prompt ? { title: sanitizeReportText(prompt, 240) } : {}),\n status: step.status,\n continuedAfterError: step.continuedAfterError,\n startedAt: step.startedAt,\n endedAt: step.endedAt,\n durationMs: step.durationMs,\n input: sanitizeReportValue(step.input),\n ...(step.output\n ? {\n output: {\n ...(step.output.summary === undefined\n ? {}\n : { summary: sanitizeReportText(step.output.summary) }),\n ...(step.output.data === undefined\n ? {}\n : { data: sanitizeReportValue(step.output.data) }),\n },\n }\n : {}),\n ...(step.error ? { error: sanitizeReportError(step.error) } : {}),\n ...(details.length > 0 ? { agentDetails: details } : {}),\n ...(agentDetailDiagnostic ? { agentDetailDiagnostic } : {}),\n };\n};\n\nconst attemptReportScope = (attempt: CaseRunResult): string =>\n attempt.reportScopeId ?? attempt.runId;\n\nconst buildAttempt = (\n attempt: CaseRunResult,\n context: ManifestBuildContext,\n): TestRunReportAttempt => {\n const scopeId = attemptReportScope(attempt);\n return {\n attemptId: attempt.runId,\n attemptIndex: attempt.attemptIndex,\n status: attempt.status,\n startedAt: attempt.startedAt,\n endedAt: attempt.endedAt,\n durationMs: attempt.durationMs,\n beforeEach: attempt.beforeEach.map((step) =>\n buildStep(step, scopeId, context, attempt.runId),\n ),\n steps: attempt.steps.map((step) =>\n buildStep(step, scopeId, context, attempt.runId),\n ),\n afterEach: attempt.afterEach.map((step) =>\n buildStep(step, scopeId, context, attempt.runId),\n ),\n ...(attempt.executionErrors?.length\n ? {\n hostErrors: attempt.executionErrors.map((error) => ({\n phase: 'execution' as const,\n error: sanitizeReportError(error),\n })),\n }\n : {}),\n ...(attempt.teardownErrors?.length\n ? { teardownErrors: attempt.teardownErrors.map(sanitizeReportError) }\n : {}),\n ...(reportSourcesForScope(context, scopeId).length > 0\n ? {\n scopeReportIds: reportSourcesForScope(context, scopeId).map(\n (source) => source.reportId,\n ),\n }\n : {}),\n };\n};\n\nconst buildCase = (\n outcome: RunReportCaseInput,\n context: ManifestBuildContext,\n): TestRunReportCase => ({\n caseId: outcome.caseId,\n name: outcome.name,\n caseIndex: outcome.caseIndex,\n status: outcome.status,\n ...(outcome.notRunReason ? { notRunReason: outcome.notRunReason } : {}),\n attempts: (outcome.attempts ?? (outcome.run ? [outcome.run] : [])).map(\n (attempt) => buildAttempt(attempt, context),\n ),\n});\n\nconst documentReportScope = (document: WorkflowDocumentRunResult): string =>\n document.reportScopeId ?? document.documentRunId;\n\nconst buildDocument = (\n documentId: string,\n document: WorkflowDocumentRunResult | undefined,\n cases: readonly RunReportCaseInput[],\n context: ManifestBuildContext,\n): TestRunReportDocument => {\n const sourcePath =\n document?.sourcePath ?? cases[0]?.sourcePath ?? '<unknown>';\n const status =\n document?.status ??\n (cases.some((item) => item.status !== 'success') ? 'failed' : 'success');\n const scopeId = document ? documentReportScope(document) : undefined;\n return {\n documentId,\n ...(document\n ? {\n logicalDocumentId: document.documentId,\n documentRunId: document.documentRunId,\n ...(document.attemptIndex === undefined\n ? {}\n : { attemptIndex: document.attemptIndex }),\n }\n : {}),\n sourcePath,\n status,\n ...(document\n ? {\n startedAt: document.startedAt,\n endedAt: document.endedAt,\n durationMs: document.durationMs,\n }\n : {}),\n beforeAll: (document?.beforeAll ?? []).map((step) =>\n buildStep(step, scopeId!, context, document!.documentRunId),\n ),\n cases: cases.map((outcome) => buildCase(outcome, context)),\n afterAll: (document?.afterAll ?? []).map((step) =>\n buildStep(step, scopeId!, context, document!.documentRunId),\n ),\n ...(document?.hostErrors?.length || document?.executionErrors?.length\n ? {\n hostErrors: [\n ...(document?.hostErrors ?? []),\n ...(document?.executionErrors ?? []).map((error) => ({\n phase: 'execution' as const,\n error,\n })),\n ].map(({ phase, error }) => ({\n phase,\n error: sanitizeReportError(error),\n })),\n }\n : {}),\n ...(document?.teardownErrors?.length\n ? { teardownErrors: document.teardownErrors.map(sanitizeReportError) }\n : {}),\n ...(scopeId && reportSourcesForScope(context, scopeId).length > 0\n ? {\n scopeReportIds: reportSourcesForScope(context, scopeId).map(\n (source) => source.reportId,\n ),\n }\n : {}),\n };\n};\n\nconst buildProject = (\n project: RunReportInput['projects'][number],\n context: ManifestBuildContext,\n): TestRunReportProject => {\n const documentCount = new Map<string, number>();\n for (const document of project.documents) {\n documentCount.set(\n document.documentId,\n (documentCount.get(document.documentId) ?? 0) + 1,\n );\n }\n for (const outcome of project.cases) {\n if (\n (documentCount.get(outcome.documentId) ?? 0) > 1 &&\n !outcome.documentRunId\n ) {\n throw new Error(\n `Case ${outcome.caseId} must identify its documentRunId when a document has multiple attempts.`,\n );\n }\n }\n // A new attemptIndex 0 begins a distinct invocation of the same file. Only\n // whole-file retries belong to one logical document and its Case history.\n const groups: WorkflowDocumentRunResult[][] = [];\n const currentGroup = new Map<string, WorkflowDocumentRunResult[]>();\n for (const document of project.documents) {\n let group = currentGroup.get(document.documentId);\n if (!group || !document.attemptIndex) {\n group = [];\n groups.push(group);\n currentGroup.set(document.documentId, group);\n }\n group.push(document);\n }\n const documents = groups.map((group) => {\n const first = group[0];\n const last = group.at(-1)!;\n const documentId =\n groups.filter((item) => item[0].documentId === first.documentId).length >\n 1\n ? `${first.documentId}:${first.documentRunId}`\n : first.documentId;\n const outcomes = new Map<string, RunReportCaseInput>();\n for (const document of group) {\n for (const outcome of project.cases.filter(\n (item) =>\n item.documentId === document.documentId &&\n (!item.documentRunId ||\n item.documentRunId === document.documentRunId),\n )) {\n const previous = outcomes.get(outcome.caseId);\n outcomes.set(outcome.caseId, {\n ...outcome,\n attempts: [\n ...(previous?.attempts ?? []),\n ...(outcome.attempts ?? (outcome.run ? [outcome.run] : [])).map(\n (attempt) => ({\n ...attempt,\n attemptIndex: document.attemptIndex ?? attempt.attemptIndex,\n }),\n ),\n ],\n });\n }\n }\n const result = buildDocument(\n documentId,\n last,\n [...outcomes.values()],\n context,\n );\n if (group.length > 1) {\n result.startedAt = first.startedAt;\n result.durationMs = Math.max(\n 0,\n Date.parse(last.endedAt) - Date.parse(first.startedAt),\n );\n result.attempts = group.map((document) => {\n const { cases: _cases, ...attempt } = buildDocument(\n documentId,\n document,\n [],\n context,\n );\n return attempt;\n });\n }\n return result;\n });\n // Collection/setup failures can have Cases but no started document runtime.\n for (const documentId of new Set(\n project.cases.map((outcome) => outcome.documentId),\n )) {\n if (!documentCount.has(documentId)) {\n documents.push(\n buildDocument(\n documentId,\n undefined,\n project.cases.filter((outcome) => outcome.documentId === documentId),\n context,\n ),\n );\n }\n }\n\n return {\n projectId: project.projectId,\n name: project.name,\n platform: project.platform,\n status: project.status,\n retry: project.retry,\n ...(project.lifecycle\n ? {\n lifecycle: {\n status: project.lifecycle.status,\n startedAt: project.lifecycle.startedAt,\n endedAt: project.lifecycle.endedAt,\n durationMs: project.lifecycle.durationMs,\n ...(project.lifecycle.setupError\n ? {\n setupError: sanitizeReportError(project.lifecycle.setupError),\n }\n : {}),\n ...(project.lifecycle.teardownErrors?.length\n ? {\n teardownErrors:\n project.lifecycle.teardownErrors.map(sanitizeReportError),\n }\n : {}),\n },\n }\n : {}),\n documents,\n collectionErrors: project.collectionErrors.map((collectionError) => ({\n sourcePath: collectionError.sourcePath,\n error: sanitizeReportError(collectionError.error),\n })),\n };\n};\n\nexport function collectTestRunReportSources(\n result: RunReportInput,\n): TestRunReportSource[] {\n const sources: TestRunReportSource[] = [];\n for (const project of result.projects) {\n for (const document of project.documents) {\n for (const source of document.reportSources ?? [])\n sources.push({ ...source, scopeId: documentReportScope(document) });\n for (const sourcePath of (document.reportPaths ?? []).filter(\n (path) =>\n !document.reportSources?.some((source) => source.sourcePath === path),\n )) {\n sources.push({\n scopeId: documentReportScope(document),\n sourcePath,\n });\n }\n }\n for (const outcome of project.cases) {\n for (const attempt of outcome.attempts ??\n (outcome.run ? [outcome.run] : [])) {\n for (const source of attempt.reportSources ?? [])\n sources.push({ ...source, scopeId: attemptReportScope(attempt) });\n for (const sourcePath of (attempt.reportPaths ?? []).filter(\n (path) =>\n !attempt.reportSources?.some(\n (source) => source.sourcePath === path,\n ),\n )) {\n sources.push({ scopeId: attemptReportScope(attempt), sourcePath });\n }\n }\n }\n }\n return sources;\n}\n\nexport function buildTestRunReportDump(\n result: RunReportInput,\n index: TestRunReportSourceIndex,\n): TestRunReportDump {\n const sourcesByScope = new Map<string, IndexedTestRunReportSource[]>();\n const detailsByScopeAndExecution = new Map<\n string,\n TestRunReportAgentDetail\n >();\n for (const source of index.sources) {\n const scopeSources = sourcesByScope.get(source.scopeId) ?? [];\n scopeSources.push(source);\n sourcesByScope.set(source.scopeId, scopeSources);\n for (const executionId of source.executionIds) {\n detailsByScopeAndExecution.set(\n scopedExecutionKey(source.scopeId, executionId),\n { reportId: source.reportId, executionId },\n );\n }\n }\n const context: ManifestBuildContext = {\n diagnostics: [],\n sourcesByScope,\n detailsByScopeAndExecution,\n tracedScopeByExecution: new Map(),\n };\n for (const error of result.errors ?? []) {\n addDiagnostic(context, {\n level: 'error',\n code: 'run-infrastructure-error',\n message: sanitizeReportError(error).message,\n });\n }\n for (const source of index.sources) {\n if (source.executionIds.length === 0) {\n addDiagnostic(context, {\n level: 'warning',\n code: 'source-without-executions',\n message: `Agent report contains no executions: ${source.sourcePath}`,\n scopeId: source.scopeId,\n sourcePaths: [source.sourcePath],\n });\n }\n }\n\n const projects = result.projects.map((project) =>\n buildProject(project, context),\n );\n return {\n schemaVersion: 1,\n kind: 'test-runner',\n runId: result.runId,\n status: result.status,\n startedAt: result.startedAt,\n endedAt: result.endedAt,\n durationMs: result.durationMs,\n summary: { ...result.summary },\n metrics: index.metrics,\n projects,\n ...(context.diagnostics.length > 0\n ? { diagnostics: context.diagnostics }\n : {}),\n };\n}\n"],"names":["__webpack_require__","definition","key","Object","obj","prop","Symbol","exactMidsceneDetailNodes","Set","scopedExecutionKey","scopeId","executionId","reportSourcesForScope","context","addDiagnostic","diagnostic","buildStep","step","details","unresolvedExecutionIds","trace","previousScope","Error","detail","agentDetailDiagnostic","sources","source","input","candidateTitle","prompt","undefined","sanitizeReportText","sanitizeReportValue","sanitizeReportError","attemptReportScope","attempt","buildAttempt","error","buildCase","outcome","documentReportScope","document","buildDocument","documentId","cases","sourcePath","status","item","phase","buildProject","project","documentCount","Map","groups","currentGroup","group","documents","first","last","outcomes","previous","result","Math","Date","_cases","collectionError","collectTestRunReportSources","path","buildTestRunReportDump","index","sourcesByScope","detailsByScopeAndExecution","scopeSources","projects"],"mappings":";;;IAAAA,oBAAoB,CAAC,GAAG,CAAC,UAASC;QACjC,IAAI,IAAIC,OAAOD,WACR,IAAGD,oBAAoB,CAAC,CAACC,YAAYC,QAAQ,CAACF,oBAAoB,CAAC,CAAC,UAASE,MACzEC,OAAO,cAAc,CAAC,UAASD,KAAK;YAAE,YAAY;YAAM,KAAKD,UAAU,CAACC,IAAI;QAAC;IAGzF;;;ICNAF,oBAAoB,CAAC,GAAG,CAACI,KAAKC,OAAUF,OAAO,SAAS,CAAC,cAAc,CAAC,IAAI,CAACC,KAAKC;;;ICClFL,oBAAoB,CAAC,GAAG,CAAC;QACxB,IAAG,AAAkB,eAAlB,OAAOM,UAA0BA,OAAO,WAAW,EACrDH,OAAO,cAAc,CAAC,UAASG,OAAO,WAAW,EAAE;YAAE,OAAO;QAAS;QAEtEH,OAAO,cAAc,CAAC,UAAS,cAAc;YAAE,OAAO;QAAK;IAC5D;;;;;;;;;ACmBA,MAAMI,2BAA2B,IAAIC,IAAI;IACvC;IACA;IACA;CACD;AASD,MAAMC,qBAAqB,CAACC,SAAiBC,cAC3C,GAAGD,QAAQ,MAAM,EAAEC,aAAa;AAElC,MAAMC,wBAAwB,CAC5BC,SACAH,UACiCG,QAAQ,cAAc,CAAC,GAAG,CAACH,YAAY,EAAE;AAE5E,MAAMI,gBAAgB,CACpBD,SACAE;IAEAF,QAAQ,WAAW,CAAC,IAAI,CAACE;AAC3B;A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;IAEF,KAAK,MAAMX,UAAU2C,MAAM,OAAO,CAChC,IAAI3C,AAA+B,MAA/BA,OAAO,YAAY,CAAC,MAAM,EAC5BZ,cAAcD,SAAS;QACrB,OAAO;QACP,MAAM;QACN,SAAS,CAAC,qCAAqC,EAAEa,OAAO,UAAU,EAAE;QACpE,SAASA,OAAO,OAAO;QACvB,aAAa;YAACA,OAAO,UAAU;SAAC;IAClC;IAIJ,MAAM+C,WAAWZ,OAAO,QAAQ,CAAC,GAAG,CAAC,CAACX,UACpCD,aAAaC,SAASrC;IAExB,OAAO;QACL,eAAe;QACf,MAAM;QACN,OAAOgD,OAAO,KAAK;QACnB,QAAQA,OAAO,MAAM;QACrB,WAAWA,OAAO,SAAS;QAC3B,SAASA,OAAO,OAAO;QACvB,YAAYA,OAAO,UAAU;QAC7B,SAAS;YAAE,GAAGA,OAAO,OAAO;QAAC;QAC7B,SAASQ,MAAM,OAAO;QACtBI;QACA,GAAI5D,QAAQ,WAAW,CAAC,MAAM,GAAG,IAC7B;YAAE,aAAaA,QAAQ,WAAW;QAAC,IACnC,CAAC,CAAC;IACR;AACF"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.r = (exports1)=>{
|
|
5
|
+
if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
6
|
+
value: 'Module'
|
|
7
|
+
});
|
|
8
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
9
|
+
value: true
|
|
10
|
+
});
|
|
11
|
+
};
|
|
12
|
+
})();
|
|
13
|
+
var __webpack_exports__ = {};
|
|
14
|
+
__webpack_require__.r(__webpack_exports__);
|
|
15
|
+
for(var __rspack_i in __webpack_exports__)exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
16
|
+
Object.defineProperty(exports, '__esModule', {
|
|
17
|
+
value: true
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"test-runner/reporting/types.js","sources":["webpack/runtime/make_namespace_object"],"sourcesContent":["// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};"],"names":["__webpack_require__","Symbol","Object"],"mappings":";;;IACAA,oBAAoB,CAAC,GAAG,CAAC;QACxB,IAAG,AAAkB,eAAlB,OAAOC,UAA0BA,OAAO,WAAW,EACrDC,OAAO,cAAc,CAAC,UAASD,OAAO,WAAW,EAAE;YAAE,OAAO;QAAS;QAEtEC,OAAO,cAAc,CAAC,UAAS,cAAc;YAAE,OAAO;QAAK;IAC5D"}
|
package/dist/lib/utils.js
CHANGED
|
@@ -228,7 +228,7 @@ function stringifyDumpData(data, indents) {
|
|
|
228
228
|
return JSON.stringify(data, replacerForPageObject, indents);
|
|
229
229
|
}
|
|
230
230
|
function getVersion() {
|
|
231
|
-
return "1.
|
|
231
|
+
return "1.13.0";
|
|
232
232
|
}
|
|
233
233
|
function debugLog(...message) {
|
|
234
234
|
const debugMode = process.env[env_namespaceObject.MIDSCENE_DEBUG_MODE];
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
5
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: definition[key]
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
})();
|
|
11
|
+
(()=>{
|
|
12
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
13
|
+
})();
|
|
14
|
+
(()=>{
|
|
15
|
+
__webpack_require__.r = (exports1)=>{
|
|
16
|
+
if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
17
|
+
value: 'Module'
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
20
|
+
value: true
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
})();
|
|
24
|
+
var __webpack_exports__ = {};
|
|
25
|
+
__webpack_require__.r(__webpack_exports__);
|
|
26
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
+
supportsAsyncContext: ()=>supportsAsyncContext,
|
|
28
|
+
createExecutionContext: ()=>createExecutionContext
|
|
29
|
+
});
|
|
30
|
+
const external_node_async_hooks_namespaceObject = require("node:async_hooks");
|
|
31
|
+
const supportsAsyncContext = true;
|
|
32
|
+
const createExecutionContext = ()=>new external_node_async_hooks_namespaceObject.AsyncLocalStorage();
|
|
33
|
+
exports.createExecutionContext = __webpack_exports__.createExecutionContext;
|
|
34
|
+
exports.supportsAsyncContext = __webpack_exports__.supportsAsyncContext;
|
|
35
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
36
|
+
"createExecutionContext",
|
|
37
|
+
"supportsAsyncContext"
|
|
38
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
39
|
+
Object.defineProperty(exports, '__esModule', {
|
|
40
|
+
value: true
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
//# sourceMappingURL=execution-context.node.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"yaml/execution-context.node.js","sources":["webpack/runtime/define_property_getters","webpack/runtime/has_own_property","webpack/runtime/make_namespace_object","../../../src/yaml/execution-context.node.ts"],"sourcesContent":["__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n }\n }\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import { AsyncLocalStorage } from 'node:async_hooks';\n\nexport const supportsAsyncContext = true;\nexport const createExecutionContext = <T>() => new AsyncLocalStorage<T>();\n"],"names":["__webpack_require__","definition","key","Object","obj","prop","Symbol","supportsAsyncContext","createExecutionContext","AsyncLocalStorage"],"mappings":";;;IAAAA,oBAAoB,CAAC,GAAG,CAAC,UAASC;QACjC,IAAI,IAAIC,OAAOD,WACR,IAAGD,oBAAoB,CAAC,CAACC,YAAYC,QAAQ,CAACF,oBAAoB,CAAC,CAAC,UAASE,MACzEC,OAAO,cAAc,CAAC,UAASD,KAAK;YAAE,YAAY;YAAM,KAAKD,UAAU,CAACC,IAAI;QAAC;IAGzF;;;ICNAF,oBAAoB,CAAC,GAAG,CAACI,KAAKC,OAAUF,OAAO,SAAS,CAAC,cAAc,CAAC,IAAI,CAACC,KAAKC;;;ICClFL,oBAAoB,CAAC,GAAG,CAAC;QACxB,IAAG,AAAkB,eAAlB,OAAOM,UAA0BA,OAAO,WAAW,EACrDH,OAAO,cAAc,CAAC,UAASG,OAAO,WAAW,EAAE;YAAE,OAAO;QAAS;QAEtEH,OAAO,cAAc,CAAC,UAAS,cAAc;YAAE,OAAO;QAAK;IAC5D;;;;;;;;;ACJO,MAAMI,uBAAuB;AAC7B,MAAMC,yBAAyB,IAAS,IAAIC,0CAAAA,iBAAiBA"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
5
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: definition[key]
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
})();
|
|
11
|
+
(()=>{
|
|
12
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
13
|
+
})();
|
|
14
|
+
(()=>{
|
|
15
|
+
__webpack_require__.r = (exports1)=>{
|
|
16
|
+
if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
17
|
+
value: 'Module'
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
20
|
+
value: true
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
})();
|
|
24
|
+
var __webpack_exports__ = {};
|
|
25
|
+
__webpack_require__.r(__webpack_exports__);
|
|
26
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
+
createExecutionContext: ()=>createExecutionContext,
|
|
28
|
+
supportsAsyncContext: ()=>supportsAsyncContext
|
|
29
|
+
});
|
|
30
|
+
const supportsAsyncContext = false;
|
|
31
|
+
const createExecutionContext = ()=>({
|
|
32
|
+
getStore: ()=>void 0,
|
|
33
|
+
run: (_store, callback)=>callback()
|
|
34
|
+
});
|
|
35
|
+
exports.createExecutionContext = __webpack_exports__.createExecutionContext;
|
|
36
|
+
exports.supportsAsyncContext = __webpack_exports__.supportsAsyncContext;
|
|
37
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
38
|
+
"createExecutionContext",
|
|
39
|
+
"supportsAsyncContext"
|
|
40
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
41
|
+
Object.defineProperty(exports, '__esModule', {
|
|
42
|
+
value: true
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
//# sourceMappingURL=execution-context.stub.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"yaml/execution-context.stub.js","sources":["webpack/runtime/define_property_getters","webpack/runtime/has_own_property","webpack/runtime/make_namespace_object","../../../src/yaml/execution-context.stub.ts"],"sourcesContent":["__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n }\n }\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","// Browsers retain the existing single-Agent stack behavior. Never bundle Node\n// async_hooks into the public Agent/browser entry point.\nexport const supportsAsyncContext = false;\nexport const createExecutionContext = <T>() => ({\n getStore: (): T | undefined => undefined,\n run: <R>(_store: T, callback: () => R): R => callback(),\n});\n"],"names":["__webpack_require__","definition","key","Object","obj","prop","Symbol","supportsAsyncContext","createExecutionContext","undefined","_store","callback"],"mappings":";;;IAAAA,oBAAoB,CAAC,GAAG,CAAC,UAASC;QACjC,IAAI,IAAIC,OAAOD,WACR,IAAGD,oBAAoB,CAAC,CAACC,YAAYC,QAAQ,CAACF,oBAAoB,CAAC,CAAC,UAASE,MACzEC,OAAO,cAAc,CAAC,UAASD,KAAK;YAAE,YAAY;YAAM,KAAKD,UAAU,CAACC,IAAI;QAAC;IAGzF;;;ICNAF,oBAAoB,CAAC,GAAG,CAACI,KAAKC,OAAUF,OAAO,SAAS,CAAC,cAAc,CAAC,IAAI,CAACC,KAAKC;;;ICClFL,oBAAoB,CAAC,GAAG,CAAC;QACxB,IAAG,AAAkB,eAAlB,OAAOM,UAA0BA,OAAO,WAAW,EACrDH,OAAO,cAAc,CAAC,UAASG,OAAO,WAAW,EAAE;YAAE,OAAO;QAAS;QAEtEH,OAAO,cAAc,CAAC,UAAS,cAAc;YAAE,OAAO;QAAK;IAC5D;;;;;;;;ACJO,MAAMI,uBAAuB;AAC7B,MAAMC,yBAAyB,IAAU;QAC9C,UAAU,IAAqBC;QAC/B,KAAK,CAAIC,QAAWC,WAAyBA;IAC/C"}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
5
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: definition[key]
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
})();
|
|
11
|
+
(()=>{
|
|
12
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
13
|
+
})();
|
|
14
|
+
(()=>{
|
|
15
|
+
__webpack_require__.r = (exports1)=>{
|
|
16
|
+
if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
17
|
+
value: 'Module'
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
20
|
+
value: true
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
})();
|
|
24
|
+
var __webpack_exports__ = {};
|
|
25
|
+
__webpack_require__.r(__webpack_exports__);
|
|
26
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
+
YamlExecutionOwnershipError: ()=>YamlExecutionOwnershipError,
|
|
28
|
+
enterYamlExecution: ()=>enterYamlExecution,
|
|
29
|
+
runInYamlExecutionContext: ()=>runInYamlExecutionContext,
|
|
30
|
+
enterYamlAction: ()=>enterYamlAction,
|
|
31
|
+
currentYamlSignal: ()=>currentYamlSignal
|
|
32
|
+
});
|
|
33
|
+
const external_yaml_execution_context_namespaceObject = require("#yaml-execution-context");
|
|
34
|
+
const errors_js_namespaceObject = require("../test-runner/errors.js");
|
|
35
|
+
const stateKey = Symbol.for('@midscene/core/yaml-execution-session/v2');
|
|
36
|
+
const host = globalThis;
|
|
37
|
+
host[stateKey] ??= {
|
|
38
|
+
sessions: new WeakMap(),
|
|
39
|
+
signals: new WeakMap(),
|
|
40
|
+
context: (0, external_yaml_execution_context_namespaceObject.createExecutionContext)()
|
|
41
|
+
};
|
|
42
|
+
const { sessions, signals, context } = host[stateKey];
|
|
43
|
+
function runInYamlExecutionContext(callback) {
|
|
44
|
+
const frame = {
|
|
45
|
+
parent: context.getStore(),
|
|
46
|
+
signals: new WeakMap()
|
|
47
|
+
};
|
|
48
|
+
return context.run(frame, async ()=>{
|
|
49
|
+
try {
|
|
50
|
+
return await callback();
|
|
51
|
+
} finally{
|
|
52
|
+
frame.session?.finish();
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
const currentYamlSignal = (agent)=>{
|
|
57
|
+
if (!external_yaml_execution_context_namespaceObject.supportsAsyncContext) return signals.get(agent)?.at(-1)?.signal;
|
|
58
|
+
for(let frame = context.getStore(); frame; frame = frame.parent){
|
|
59
|
+
const signal = frame.signals.get(agent)?.at(-1)?.signal;
|
|
60
|
+
if (signal) return signal;
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
function enterYamlAction(agent, signal) {
|
|
64
|
+
const scopeSignals = external_yaml_execution_context_namespaceObject.supportsAsyncContext ? context.getStore()?.signals : signals;
|
|
65
|
+
if (!scopeSignals) throw new Error('YAML action requires an execution context.');
|
|
66
|
+
const stack = scopeSignals.get(agent) ?? [];
|
|
67
|
+
scopeSignals.set(agent, stack);
|
|
68
|
+
const entry = {
|
|
69
|
+
signal
|
|
70
|
+
};
|
|
71
|
+
stack.push(entry);
|
|
72
|
+
return ()=>{
|
|
73
|
+
const index = stack.indexOf(entry);
|
|
74
|
+
if (index >= 0) stack.splice(index, 1);
|
|
75
|
+
if (!stack.length) scopeSignals.delete(agent);
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
class YamlExecutionOwnershipError extends errors_js_namespaceObject.WorkflowError {
|
|
79
|
+
}
|
|
80
|
+
function enterYamlExecution(agent, options = {}) {
|
|
81
|
+
const stack = sessions.get(agent) ?? [];
|
|
82
|
+
const frame = context.getStore();
|
|
83
|
+
let parent = external_yaml_execution_context_namespaceObject.supportsAsyncContext ? void 0 : stack.at(-1);
|
|
84
|
+
if (external_yaml_execution_context_namespaceObject.supportsAsyncContext) {
|
|
85
|
+
if (!frame || frame.session) throw new Error('YAML execution requires a fresh execution context.');
|
|
86
|
+
for(let owner = frame.parent; owner; owner = owner.parent)if (owner.session?.agent === agent) {
|
|
87
|
+
parent = owner.session;
|
|
88
|
+
break;
|
|
89
|
+
}
|
|
90
|
+
if (parent?.finished) throw new YamlExecutionOwnershipError('Cannot start nested YAML after its owning execution has finished.', {
|
|
91
|
+
code: 'YAML_EXECUTION_SCOPE_CLOSED'
|
|
92
|
+
});
|
|
93
|
+
if (stack.at(-1) !== parent && !options.allowIndependentOverlap) throw new YamlExecutionOwnershipError('The same Agent cannot run independent overlapping YAML executions. Await the active run before starting another.', {
|
|
94
|
+
code: 'YAML_EXECUTION_OVERLAP'
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
const session = {
|
|
98
|
+
agent,
|
|
99
|
+
children: [],
|
|
100
|
+
finished: false,
|
|
101
|
+
finish (record) {
|
|
102
|
+
if (session.finished) return;
|
|
103
|
+
session.finished = true;
|
|
104
|
+
const index = stack.indexOf(session);
|
|
105
|
+
if (index >= 0) stack.splice(index, 1);
|
|
106
|
+
if (!stack.length) sessions.delete(agent);
|
|
107
|
+
if (record) parent?.children.push(record);
|
|
108
|
+
else parent?.children.push(...session.children);
|
|
109
|
+
}
|
|
110
|
+
};
|
|
111
|
+
stack.push(session);
|
|
112
|
+
sessions.set(agent, stack);
|
|
113
|
+
if (frame) frame.session = session;
|
|
114
|
+
return {
|
|
115
|
+
isRoot: !parent,
|
|
116
|
+
children: session.children,
|
|
117
|
+
finish: session.finish
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
exports.YamlExecutionOwnershipError = __webpack_exports__.YamlExecutionOwnershipError;
|
|
121
|
+
exports.currentYamlSignal = __webpack_exports__.currentYamlSignal;
|
|
122
|
+
exports.enterYamlAction = __webpack_exports__.enterYamlAction;
|
|
123
|
+
exports.enterYamlExecution = __webpack_exports__.enterYamlExecution;
|
|
124
|
+
exports.runInYamlExecutionContext = __webpack_exports__.runInYamlExecutionContext;
|
|
125
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
126
|
+
"YamlExecutionOwnershipError",
|
|
127
|
+
"currentYamlSignal",
|
|
128
|
+
"enterYamlAction",
|
|
129
|
+
"enterYamlExecution",
|
|
130
|
+
"runInYamlExecutionContext"
|
|
131
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
132
|
+
Object.defineProperty(exports, '__esModule', {
|
|
133
|
+
value: true
|
|
134
|
+
});
|
|
135
|
+
|
|
136
|
+
//# sourceMappingURL=execution-session.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"yaml/execution-session.js","sources":["webpack/runtime/define_property_getters","webpack/runtime/has_own_property","webpack/runtime/make_namespace_object","../../../src/yaml/execution-session.ts"],"sourcesContent":["__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n }\n }\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import {\n createExecutionContext,\n supportsAsyncContext,\n} from '#yaml-execution-context';\nimport { WorkflowError } from '../test-runner/errors';\nimport type { WorkflowExecutionRecord } from '../test-runner/execution-record';\n\ninterface YamlExecutionSession {\n agent: object;\n children: WorkflowExecutionRecord[];\n finished: boolean;\n finish(record?: WorkflowExecutionRecord): void;\n}\n\ninterface ExecutionFrame {\n parent?: ExecutionFrame;\n session?: YamlExecutionSession;\n signals: WeakMap<object, { signal: AbortSignal }[]>;\n}\n\nconst stateKey = Symbol.for('@midscene/core/yaml-execution-session/v2');\nconst host = globalThis as typeof globalThis & {\n [stateKey]?: {\n sessions: WeakMap<object, YamlExecutionSession[]>;\n signals: WeakMap<object, { signal: AbortSignal }[]>;\n context: ReturnType<typeof createExecutionContext<ExecutionFrame>>;\n };\n};\nhost[stateKey] ??= {\n sessions: new WeakMap(),\n signals: new WeakMap(),\n context: createExecutionContext<ExecutionFrame>(),\n};\nconst { sessions, signals, context } = host[stateKey];\n\n/** Every entry gets its own async frame, shared across CJS and ESM copies. */\nexport function runInYamlExecutionContext<T>(\n callback: () => Promise<T>,\n): Promise<T> {\n const frame: ExecutionFrame = {\n parent: context.getStore(),\n signals: new WeakMap(),\n };\n return context.run(frame, async () => {\n try {\n return await callback();\n } finally {\n frame.session?.finish();\n }\n });\n}\n\nexport const currentYamlSignal = (agent: object): AbortSignal | undefined => {\n if (!supportsAsyncContext) return signals.get(agent)?.at(-1)?.signal;\n for (let frame = context.getStore(); frame; frame = frame.parent) {\n const signal = frame.signals.get(agent)?.at(-1)?.signal;\n if (signal) return signal;\n }\n return undefined;\n};\n\nexport function enterYamlAction(\n agent: object,\n signal: AbortSignal,\n): () => void {\n const scopeSignals = supportsAsyncContext\n ? context.getStore()?.signals\n : signals;\n if (!scopeSignals)\n throw new Error('YAML action requires an execution context.');\n const stack = scopeSignals.get(agent) ?? [];\n scopeSignals.set(agent, stack);\n const entry = { signal };\n stack.push(entry);\n return () => {\n const index = stack.indexOf(entry);\n if (index >= 0) stack.splice(index, 1);\n if (!stack.length) scopeSignals.delete(agent);\n };\n}\n\nexport class YamlExecutionOwnershipError extends WorkflowError {}\n\n/** Nested runs borrow ownership. They never finalize or drain their parent. */\nexport function enterYamlExecution(\n agent: object,\n options: { allowIndependentOverlap?: boolean } = {},\n) {\n const stack = sessions.get(agent) ?? [];\n const frame = context.getStore();\n let parent = supportsAsyncContext ? undefined : stack.at(-1);\n if (supportsAsyncContext) {\n if (!frame || frame.session)\n throw new Error('YAML execution requires a fresh execution context.');\n for (let owner = frame.parent; owner; owner = owner.parent) {\n if (owner.session?.agent === agent) {\n parent = owner.session;\n break;\n }\n }\n if (parent?.finished)\n throw new YamlExecutionOwnershipError(\n 'Cannot start nested YAML after its owning execution has finished.',\n { code: 'YAML_EXECUTION_SCOPE_CLOSED' },\n );\n if (stack.at(-1) !== parent && !options.allowIndependentOverlap)\n throw new YamlExecutionOwnershipError(\n 'The same Agent cannot run independent overlapping YAML executions. Await the active run before starting another.',\n { code: 'YAML_EXECUTION_OVERLAP' },\n );\n }\n const session: YamlExecutionSession = {\n agent,\n children: [],\n finished: false,\n finish(record?: WorkflowExecutionRecord) {\n if (session.finished) return;\n session.finished = true;\n const index = stack.indexOf(session);\n if (index >= 0) stack.splice(index, 1);\n if (!stack.length) sessions.delete(agent);\n if (record) parent?.children.push(record);\n else parent?.children.push(...session.children);\n },\n };\n stack.push(session);\n sessions.set(agent, stack);\n if (frame) frame.session = session;\n return {\n isRoot: !parent,\n children: session.children,\n finish: session.finish,\n };\n}\n"],"names":["__webpack_require__","definition","key","Object","obj","prop","Symbol","stateKey","host","globalThis","WeakMap","createExecutionContext","sessions","signals","context","runInYamlExecutionContext","callback","frame","currentYamlSignal","agent","supportsAsyncContext","signal","enterYamlAction","scopeSignals","Error","stack","entry","index","YamlExecutionOwnershipError","WorkflowError","enterYamlExecution","options","parent","undefined","owner","session","record"],"mappings":";;;IAAAA,oBAAoB,CAAC,GAAG,CAAC,UAASC;QACjC,IAA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A;YAAE,MAAM;QAAyB;IAEvC;IACA,MAAMO,UAAgC;QACpChB;QACA,UAAU,EAAE;QACZ,UAAU;QACV,QAAOiB,MAAgC;YACrC,IAAID,QAAQ,QAAQ,EAAE;YACtBA,QAAQ,QAAQ,GAAG;YACnB,MAAMR,QAAQF,MAAM,OAAO,CAACU;YAC5B,IAAIR,SAAS,GAAGF,MAAM,MAAM,CAACE,OAAO;YACpC,IAAI,CAACF,MAAM,MAAM,EAAEb,SAAS,MAAM,CAACO;YACnC,IAAIiB,QAAQJ,QAAQ,SAAS,KAAKI;iBAC7BJ,QAAQ,SAAS,QAAQG,QAAQ,QAAQ;QAChD;IACF;IACAV,MAAM,IAAI,CAACU;IACXvB,SAAS,GAAG,CAACO,OAAOM;IACpB,IAAIR,OAAOA,MAAM,OAAO,GAAGkB;IAC3B,OAAO;QACL,QAAQ,CAACH;QACT,UAAUG,QAAQ,QAAQ;QAC1B,QAAQA,QAAQ,MAAM;IACxB;AACF"}
|
package/dist/lib/yaml/index.js
CHANGED
|
@@ -56,24 +56,66 @@ function __webpack_require__(moduleId) {
|
|
|
56
56
|
var __webpack_exports__ = {};
|
|
57
57
|
(()=>{
|
|
58
58
|
__webpack_require__.r(__webpack_exports__);
|
|
59
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
60
|
+
buildDetailedLocateParam: ()=>_utils__rspack_import_3.buildDetailedLocateParam,
|
|
61
|
+
buildDetailedLocateParamAndRestParams: ()=>_utils__rspack_import_3.buildDetailedLocateParamAndRestParams,
|
|
62
|
+
interpolateEnvVars: ()=>_utils__rspack_import_3.interpolateEnvVars,
|
|
63
|
+
parseYamlScript: ()=>_utils__rspack_import_3.parseYamlScript,
|
|
64
|
+
resolveWebTarget: ()=>_utils__rspack_import_3.resolveWebTarget,
|
|
65
|
+
resolveYamlOutputConfig: ()=>_utils__rspack_import_3.resolveYamlOutputConfig
|
|
66
|
+
});
|
|
59
67
|
var _yaml__rspack_import_0 = __webpack_require__("../yaml");
|
|
60
68
|
var __rspack_reexport = {};
|
|
61
|
-
for(const __rspack_import_key in _yaml__rspack_import_0)if (
|
|
69
|
+
for(const __rspack_import_key in _yaml__rspack_import_0)if ([
|
|
70
|
+
"resolveYamlOutputConfig",
|
|
71
|
+
"buildDetailedLocateParam",
|
|
72
|
+
"buildDetailedLocateParamAndRestParams",
|
|
73
|
+
"resolveWebTarget",
|
|
74
|
+
"parseYamlScript",
|
|
75
|
+
"default",
|
|
76
|
+
"interpolateEnvVars"
|
|
77
|
+
].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_yaml__rspack_import_0[__rspack_import_key];
|
|
62
78
|
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
63
79
|
var _player__rspack_import_1 = __webpack_require__("./player");
|
|
64
80
|
var __rspack_reexport = {};
|
|
65
|
-
for(const __rspack_import_key in _player__rspack_import_1)if (
|
|
81
|
+
for(const __rspack_import_key in _player__rspack_import_1)if ([
|
|
82
|
+
"resolveYamlOutputConfig",
|
|
83
|
+
"buildDetailedLocateParam",
|
|
84
|
+
"buildDetailedLocateParamAndRestParams",
|
|
85
|
+
"resolveWebTarget",
|
|
86
|
+
"parseYamlScript",
|
|
87
|
+
"default",
|
|
88
|
+
"interpolateEnvVars"
|
|
89
|
+
].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_player__rspack_import_1[__rspack_import_key];
|
|
66
90
|
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
67
91
|
var _builder__rspack_import_2 = __webpack_require__("./builder");
|
|
68
92
|
var __rspack_reexport = {};
|
|
69
|
-
for(const __rspack_import_key in _builder__rspack_import_2)if (
|
|
93
|
+
for(const __rspack_import_key in _builder__rspack_import_2)if ([
|
|
94
|
+
"resolveYamlOutputConfig",
|
|
95
|
+
"buildDetailedLocateParam",
|
|
96
|
+
"buildDetailedLocateParamAndRestParams",
|
|
97
|
+
"resolveWebTarget",
|
|
98
|
+
"parseYamlScript",
|
|
99
|
+
"default",
|
|
100
|
+
"interpolateEnvVars"
|
|
101
|
+
].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_builder__rspack_import_2[__rspack_import_key];
|
|
70
102
|
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
71
103
|
var _utils__rspack_import_3 = __webpack_require__("./utils");
|
|
72
|
-
var __rspack_reexport = {};
|
|
73
|
-
for(const __rspack_import_key in _utils__rspack_import_3)if ("default" !== __rspack_import_key) __rspack_reexport[__rspack_import_key] = ()=>_utils__rspack_import_3[__rspack_import_key];
|
|
74
|
-
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
75
104
|
})();
|
|
76
|
-
|
|
105
|
+
exports.buildDetailedLocateParam = __webpack_exports__.buildDetailedLocateParam;
|
|
106
|
+
exports.buildDetailedLocateParamAndRestParams = __webpack_exports__.buildDetailedLocateParamAndRestParams;
|
|
107
|
+
exports.interpolateEnvVars = __webpack_exports__.interpolateEnvVars;
|
|
108
|
+
exports.parseYamlScript = __webpack_exports__.parseYamlScript;
|
|
109
|
+
exports.resolveWebTarget = __webpack_exports__.resolveWebTarget;
|
|
110
|
+
exports.resolveYamlOutputConfig = __webpack_exports__.resolveYamlOutputConfig;
|
|
111
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
112
|
+
"buildDetailedLocateParam",
|
|
113
|
+
"buildDetailedLocateParamAndRestParams",
|
|
114
|
+
"interpolateEnvVars",
|
|
115
|
+
"parseYamlScript",
|
|
116
|
+
"resolveWebTarget",
|
|
117
|
+
"resolveYamlOutputConfig"
|
|
118
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
77
119
|
Object.defineProperty(exports, '__esModule', {
|
|
78
120
|
value: true
|
|
79
121
|
});
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
5
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: definition[key]
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
})();
|
|
11
|
+
(()=>{
|
|
12
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
13
|
+
})();
|
|
14
|
+
(()=>{
|
|
15
|
+
__webpack_require__.r = (exports1)=>{
|
|
16
|
+
if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
17
|
+
value: 'Module'
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
20
|
+
value: true
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
})();
|
|
24
|
+
var __webpack_exports__ = {};
|
|
25
|
+
__webpack_require__.r(__webpack_exports__);
|
|
26
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
+
createLegacyYamlExecutionRecord: ()=>createLegacyYamlExecutionRecord
|
|
28
|
+
});
|
|
29
|
+
const yamlPlatform = (script)=>script.android ? 'android' : script.ios ? 'ios' : script.harmony ? 'harmony' : script.computer ? 'computer' : script.interface ? 'interface' : 'web';
|
|
30
|
+
function createLegacyYamlExecutionRecord(options) {
|
|
31
|
+
const failed = void 0 !== options.setupError || void 0 !== options.executionError || options.cleanupErrors.length > 0 || options.aborted || options.execution?.document.status === 'failed' || options.execution?.cases.some((outcome)=>'success' !== outcome.status);
|
|
32
|
+
return Object.freeze({
|
|
33
|
+
runId: options.runId,
|
|
34
|
+
attemptIndex: options.attemptIndex,
|
|
35
|
+
sourcePath: options.document.sourcePath,
|
|
36
|
+
projectName: options.projectName,
|
|
37
|
+
platform: yamlPlatform(options.script),
|
|
38
|
+
document: options.document,
|
|
39
|
+
status: failed ? 'failed' : 'success',
|
|
40
|
+
startedAt: options.startedAt.toISOString(),
|
|
41
|
+
endedAt: options.endedAt.toISOString(),
|
|
42
|
+
durationMs: Math.max(0, options.endedAt.getTime() - options.startedAt.getTime()),
|
|
43
|
+
...options.execution ? {
|
|
44
|
+
execution: options.execution
|
|
45
|
+
} : {},
|
|
46
|
+
...void 0 === options.setupError ? {} : {
|
|
47
|
+
setupError: options.setupError
|
|
48
|
+
},
|
|
49
|
+
...void 0 === options.executionError ? {} : {
|
|
50
|
+
executionError: options.executionError
|
|
51
|
+
},
|
|
52
|
+
cleanupErrors: Object.freeze([
|
|
53
|
+
...options.cleanupErrors
|
|
54
|
+
]),
|
|
55
|
+
...options.publicationErrors.length ? {
|
|
56
|
+
publicationErrors: Object.freeze([
|
|
57
|
+
...options.publicationErrors
|
|
58
|
+
])
|
|
59
|
+
} : {},
|
|
60
|
+
outputs: Object.freeze({
|
|
61
|
+
...options.outputs
|
|
62
|
+
}),
|
|
63
|
+
reportPaths: Object.freeze(options.reportFile ? [
|
|
64
|
+
options.reportFile
|
|
65
|
+
] : []),
|
|
66
|
+
...options.children?.length ? {
|
|
67
|
+
children: Object.freeze([
|
|
68
|
+
...options.children
|
|
69
|
+
])
|
|
70
|
+
} : {}
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
exports.createLegacyYamlExecutionRecord = __webpack_exports__.createLegacyYamlExecutionRecord;
|
|
74
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
75
|
+
"createLegacyYamlExecutionRecord"
|
|
76
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
77
|
+
Object.defineProperty(exports, '__esModule', {
|
|
78
|
+
value: true
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
//# sourceMappingURL=legacy-yaml-execution-record.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"yaml/legacy-yaml-execution-record.js","sources":["webpack/runtime/define_property_getters","webpack/runtime/has_own_property","webpack/runtime/make_namespace_object","../../../src/yaml/legacy-yaml-execution-record.ts"],"sourcesContent":["__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n }\n }\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import type { MidsceneYamlScript } from '@/types';\nimport type {\n CollectedWorkflowDocument,\n WorkflowDocumentExecutionResult,\n WorkflowExecutionRecord,\n} from '../test-runner';\n\ninterface CreateLegacyYamlExecutionRecordOptions {\n runId: string;\n attemptIndex: number;\n projectName?: string;\n script: MidsceneYamlScript;\n document: CollectedWorkflowDocument;\n startedAt: Date;\n endedAt: Date;\n execution?: WorkflowDocumentExecutionResult;\n setupError?: unknown;\n executionError?: unknown;\n cleanupErrors: readonly unknown[];\n aborted: boolean;\n publicationErrors: readonly unknown[];\n outputs: Readonly<Record<string, unknown>>;\n reportFile?: string | null;\n children?: readonly WorkflowExecutionRecord[];\n}\n\nconst yamlPlatform = (script: MidsceneYamlScript): string =>\n script.android\n ? 'android'\n : script.ios\n ? 'ios'\n : script.harmony\n ? 'harmony'\n : script.computer\n ? 'computer'\n : script.interface\n ? 'interface'\n : 'web';\n\n/** Convert compatibility-host state into the shared immutable run record. */\nexport function createLegacyYamlExecutionRecord(\n options: CreateLegacyYamlExecutionRecordOptions,\n): WorkflowExecutionRecord {\n const failed =\n options.setupError !== undefined ||\n options.executionError !== undefined ||\n options.cleanupErrors.length > 0 ||\n options.aborted ||\n options.execution?.document.status === 'failed' ||\n options.execution?.cases.some((outcome) => outcome.status !== 'success');\n return Object.freeze({\n runId: options.runId,\n attemptIndex: options.attemptIndex,\n sourcePath: options.document.sourcePath,\n projectName: options.projectName,\n platform: yamlPlatform(options.script),\n document: options.document,\n status: failed ? 'failed' : 'success',\n startedAt: options.startedAt.toISOString(),\n endedAt: options.endedAt.toISOString(),\n durationMs: Math.max(\n 0,\n options.endedAt.getTime() - options.startedAt.getTime(),\n ),\n ...(options.execution ? { execution: options.execution } : {}),\n ...(options.setupError === undefined\n ? {}\n : { setupError: options.setupError }),\n ...(options.executionError === undefined\n ? {}\n : { executionError: options.executionError }),\n cleanupErrors: Object.freeze([...options.cleanupErrors]),\n ...(options.publicationErrors.length\n ? {\n publicationErrors: Object.freeze([...options.publicationErrors]),\n }\n : {}),\n outputs: Object.freeze({ ...options.outputs }),\n reportPaths: Object.freeze(options.reportFile ? [options.reportFile] : []),\n ...(options.children?.length\n ? { children: Object.freeze([...options.children]) }\n : {}),\n });\n}\n"],"names":["__webpack_require__","definition","key","Object","obj","prop","Symbol","yamlPlatform","script","createLegacyYamlExecutionRecord","options","failed","undefined","outcome","Math"],"mappings":";;;IAAAA,oBAAoB,CAAC,GAAG,CAAC,UAASC;QACjC,IAAI,IAAIC,OAAOD,WACR,IAAGD,oBAAoB,CAAC,CAACC,YAAYC,QAAQ,CAACF,oBAAoB,CAAC,CAAC,UAASE,MACzEC,OAAO,cAAc,CAAC,UAASD,KAAK;YAAE,YAAY;YAAM,KAAKD,UAAU,CAACC,IAAI;QAAC;IAGzF;;;ICNAF,oBAAoB,CAAC,GAAG,CAACI,KAAKC,OAAUF,OAAO,SAAS,CAAC,cAAc,CAAC,IAAI,CAACC,KAAKC;;;ICClFL,oBAAoB,CAAC,GAAG,CAAC;QACxB,IAAG,AAAkB,eAAlB,OAAOM,UAA0BA,OAAO,WAAW,EACrDH,OAAO,cAAc,CAAC,UAASG,OAAO,WAAW,EAAE;YAAE,OAAO;QAAS;QAEtEH,OAAO,cAAc,CAAC,UAAS,cAAc;YAAE,OAAO;QAAK;IAC5D;;;;;;;ACoBA,MAAMI,eAAe,CAACC,SACpBA,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MAAM,CAAC;mBAAIO,QAAQ,iBAAiB;aAAC;QACjE,IACA,CAAC,CAAC;QACN,SAASP,OAAO,MAAM,CAAC;YAAE,GAAGO,QAAQ,OAAO;QAAC;QAC5C,aAAaP,OAAO,MAAM,CAACO,QAAQ,UAAU,GAAG;YAACA,QAAQ,UAAU;SAAC,GAAG,EAAE;QACzE,GAAIA,QAAQ,QAAQ,EAAE,SAClB;YAAE,UAAUP,OAAO,MAAM,CAAC;mBAAIO,QAAQ,QAAQ;aAAC;QAAE,IACjD,CAAC,CAAC;IACR;AACF"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
5
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: definition[key]
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
})();
|
|
11
|
+
(()=>{
|
|
12
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
13
|
+
})();
|
|
14
|
+
(()=>{
|
|
15
|
+
__webpack_require__.r = (exports1)=>{
|
|
16
|
+
if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
17
|
+
value: 'Module'
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
20
|
+
value: true
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
})();
|
|
24
|
+
var __webpack_exports__ = {};
|
|
25
|
+
__webpack_require__.r(__webpack_exports__);
|
|
26
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
+
publishLegacyYamlReport: ()=>publishLegacyYamlReport
|
|
28
|
+
});
|
|
29
|
+
const external_node_path_namespaceObject = require("node:path");
|
|
30
|
+
const utils_namespaceObject = require("@midscene/shared/utils");
|
|
31
|
+
const external_report_generator_js_namespaceObject = require("../report-generator.js");
|
|
32
|
+
const execution_record_js_namespaceObject = require("../test-runner/reporting/execution-record.js");
|
|
33
|
+
const external_utils_js_namespaceObject = require("../utils.js");
|
|
34
|
+
const external_report_policy_js_namespaceObject = require("./report-policy.js");
|
|
35
|
+
async function publishLegacyYamlReport(options) {
|
|
36
|
+
const { agent, runId } = options;
|
|
37
|
+
let record = options.record;
|
|
38
|
+
if (agent) {
|
|
39
|
+
const reportFile = await agent._writeYamlExecutionReport?.(record) ?? agent.reportFile;
|
|
40
|
+
const source = await agent._createReportSource?.(runId);
|
|
41
|
+
if (source) record = Object.freeze({
|
|
42
|
+
...record,
|
|
43
|
+
reportSources: [
|
|
44
|
+
source
|
|
45
|
+
]
|
|
46
|
+
});
|
|
47
|
+
return {
|
|
48
|
+
record,
|
|
49
|
+
reportFile
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
if (utils_namespaceObject.ifInBrowser || utils_namespaceObject.ifInWorker || !(0, external_report_policy_js_namespaceObject.isYamlReportEnabled)(options.script)) return {
|
|
53
|
+
record
|
|
54
|
+
};
|
|
55
|
+
const generator = external_report_generator_js_namespaceObject.ReportGenerator.create(options.fallbackReportFileName ?? options.script.agent?.reportFileName ?? options.script.agent?.testId ?? (options.scriptPath ? (0, external_node_path_namespaceObject.basename)(options.scriptPath).replace(/\.ya?ml$/i, '') : `script-${runId}`), options.script.agent ?? {});
|
|
56
|
+
const reportFile = await generator.writeRunnerReport?.((0, execution_record_js_namespaceObject.executionRecordsToReportInput)([
|
|
57
|
+
record
|
|
58
|
+
], {
|
|
59
|
+
runId
|
|
60
|
+
}), runId, {
|
|
61
|
+
groupName: 'YAML execution',
|
|
62
|
+
sdkVersion: (0, external_utils_js_namespaceObject.getVersion)(),
|
|
63
|
+
modelBriefs: []
|
|
64
|
+
});
|
|
65
|
+
await generator.finalize();
|
|
66
|
+
const source = await generator.createSourceSnapshot?.(runId);
|
|
67
|
+
if (source) record = Object.freeze({
|
|
68
|
+
...record,
|
|
69
|
+
reportSources: [
|
|
70
|
+
source
|
|
71
|
+
]
|
|
72
|
+
});
|
|
73
|
+
return {
|
|
74
|
+
record,
|
|
75
|
+
reportFile
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
exports.publishLegacyYamlReport = __webpack_exports__.publishLegacyYamlReport;
|
|
79
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
80
|
+
"publishLegacyYamlReport"
|
|
81
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
82
|
+
Object.defineProperty(exports, '__esModule', {
|
|
83
|
+
value: true
|
|
84
|
+
});
|
|
85
|
+
|
|
86
|
+
//# sourceMappingURL=legacy-yaml-report.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"yaml/legacy-yaml-report.js","sources":["webpack/runtime/define_property_getters","webpack/runtime/has_own_property","webpack/runtime/make_namespace_object","../../../src/yaml/legacy-yaml-report.ts"],"sourcesContent":["__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n }\n }\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import { basename } from 'node:path';\nimport type { Agent } from '@/agent/agent';\nimport type { MidsceneYamlScript } from '@/types';\nimport { ifInBrowser, ifInWorker } from '@midscene/shared/utils';\nimport { ReportGenerator } from '../report-generator';\nimport type { WorkflowExecutionRecord } from '../test-runner';\nimport { executionRecordsToReportInput } from '../test-runner/reporting/execution-record';\nimport { getVersion } from '../utils';\nimport { isYamlReportEnabled } from './report-policy';\n\ninterface PublishLegacyYamlReportOptions {\n agent: Agent | null;\n record: WorkflowExecutionRecord;\n runId: string;\n script: MidsceneYamlScript;\n scriptPath?: string;\n fallbackReportFileName?: string;\n}\n\nexport interface PublishedLegacyYamlReport {\n record: WorkflowExecutionRecord;\n reportFile?: string | null;\n}\n\n/** Report publication is a host projection, not a ScriptPlayer state concern. */\nexport async function publishLegacyYamlReport(\n options: PublishLegacyYamlReportOptions,\n): Promise<PublishedLegacyYamlReport> {\n const { agent, runId } = options;\n let record = options.record;\n if (agent) {\n const reportFile =\n (await agent._writeYamlExecutionReport?.(record)) ?? agent.reportFile;\n const source = await agent._createReportSource?.(runId);\n if (source) record = Object.freeze({ ...record, reportSources: [source] });\n return { record, reportFile };\n }\n if (ifInBrowser || ifInWorker || !isYamlReportEnabled(options.script))\n return { record };\n\n const generator = ReportGenerator.create(\n options.fallbackReportFileName ??\n options.script.agent?.reportFileName ??\n options.script.agent?.testId ??\n (options.scriptPath\n ? basename(options.scriptPath).replace(/\\.ya?ml$/i, '')\n : `script-${runId}`),\n options.script.agent ?? {},\n );\n const reportFile = await generator.writeRunnerReport?.(\n executionRecordsToReportInput([record], { runId }),\n runId,\n {\n groupName: 'YAML execution',\n sdkVersion: getVersion(),\n modelBriefs: [],\n },\n );\n await generator.finalize();\n const source = await generator.createSourceSnapshot?.(runId);\n if (source) record = Object.freeze({ ...record, reportSources: [source] });\n return { record, reportFile };\n}\n"],"names":["__webpack_require__","definition","key","Object","obj","prop","Symbol","publishLegacyYamlReport","options","agent","runId","record","reportFile","source","ifInBrowser","ifInWorker","isYamlReportEnabled","generator","ReportGenerator","basename","executionRecordsToReportInput","getVersion"],"mappings":";;;IAAAA,oBAAoB,CAAC,GAAG,CAAC,UAASC;QACjC,IAAI,IAAIC,OAAOD,WACR,IAAGD,oBAAoB,CAAC,CAACC,YAAYC,QAAQ,CAACF,oBAAoB,CAAC,CAAC,UAASE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