@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/errors.js","sources":["webpack/runtime/define_property_getters","webpack/runtime/has_own_property","webpack/runtime/make_namespace_object","../../../src/test-runner/errors.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 { z } from 'zod/v4';\n\nexport interface WorkflowErrorOptions {\n code?: string;\n details?: unknown;\n cause?: unknown;\n}\n\nexport class WorkflowError extends Error {\n readonly code: string;\n readonly details?: unknown;\n\n constructor(message: string, options: WorkflowErrorOptions = {}) {\n super(message, { cause: options.cause });\n this.name = new.target.name;\n this.code = options.code ?? 'WORKFLOW_ERROR';\n this.details = options.details;\n }\n\n toJSON(): Record<string, unknown> {\n return {\n name: this.name,\n message: this.message,\n code: this.code,\n ...(this.details === undefined ? {} : { details: this.details }),\n };\n }\n}\n\nexport class WorkflowParseError extends WorkflowError {\n constructor(message: string, details?: unknown, cause?: unknown) {\n super(message, { code: 'WORKFLOW_PARSE_ERROR', details, cause });\n }\n}\n\nexport class NodeDefinitionError extends WorkflowError {\n constructor(message: string, details?: unknown) {\n super(message, { code: 'NODE_DEFINITION_ERROR', details });\n }\n}\n\nexport class DuplicateNodeError extends WorkflowError {\n readonly node: string;\n\n constructor(node: string) {\n super(`Node \"${node}\" is already registered.`, {\n code: 'DUPLICATE_NODE',\n details: { node },\n });\n this.node = node;\n }\n}\n\nexport class NodeNotFoundError extends WorkflowError {\n readonly node: string;\n\n constructor(node: string) {\n super(`Node \"${node}\" is not registered.`, {\n code: 'NODE_NOT_FOUND',\n details: { node },\n });\n this.node = node;\n }\n}\n\nexport class NodeInputValidationError extends WorkflowError {\n constructor(message: string, details?: unknown) {\n super(message, { code: 'NODE_INPUT_VALIDATION_ERROR', details });\n }\n\n static fromZod(node: string, error: z.ZodError): NodeInputValidationError {\n const issues = error.issues.map((issue) => ({\n code: issue.code,\n path: issue.path.map(String).join('.'),\n message: issue.message,\n }));\n const firstIssue = issues[0];\n const path = firstIssue?.path || '<root>';\n const message = firstIssue?.message ?? 'invalid input';\n return new NodeInputValidationError(\n `Node \"${node}\" input validation failed at \"${path}\": ${message}`,\n { node, issues },\n );\n }\n}\n\nexport class StepTimeoutError extends WorkflowError {\n readonly timeoutMs: number;\n readonly node?: string;\n\n constructor(timeoutMs: number, node?: string) {\n super(\n node\n ? `Node \"${node}\" timed out after ${timeoutMs}ms.`\n : `Step timed out after ${timeoutMs}ms.`,\n {\n code: 'STEP_TIMEOUT',\n details: { timeoutMs, ...(node === undefined ? {} : { node }) },\n },\n );\n this.timeoutMs = timeoutMs;\n this.node = node;\n }\n}\n\nexport class NodeExecutionError extends WorkflowError {\n readonly node: string;\n\n constructor(\n node: string,\n cause: unknown,\n /** Failed actions can still produce useful, JSON-compatible diagnostic data. */\n readonly output?: import('./node/types').NodeResult,\n ) {\n const causeMessage =\n cause instanceof Error ? cause.message : String(cause ?? 'Unknown error');\n super(`Node \"${node}\" failed: ${causeMessage}`, {\n code: 'NODE_EXECUTION_ERROR',\n details: { node },\n cause,\n });\n this.node = node;\n }\n}\n\nexport class WorkflowLifecycleError extends WorkflowError {\n constructor(message: string, details?: unknown) {\n super(message, { code: 'WORKFLOW_LIFECYCLE_ERROR', details });\n }\n}\n\nexport class ProjectSetupError extends WorkflowError {\n constructor(cause: unknown, details: { projectName: string }) {\n const causeMessage =\n cause instanceof Error ? cause.message : String(cause ?? 'Unknown error');\n super(`Project \"${details.projectName}\" setup failed: ${causeMessage}`, {\n code: 'PROJECT_SETUP_ERROR',\n details,\n cause,\n });\n }\n}\n\nexport class ProjectTeardownError extends WorkflowError {\n constructor(\n cause: unknown,\n details: { projectName: string; registrationIndex: number },\n ) {\n const causeMessage =\n cause instanceof Error ? cause.message : String(cause ?? 'Unknown error');\n super(`Project \"${details.projectName}\" teardown failed: ${causeMessage}`, {\n code: 'PROJECT_TEARDOWN_ERROR',\n details,\n cause,\n });\n }\n}\n\nexport class NodeScopeTeardownError extends WorkflowError {\n constructor(\n cause: unknown,\n details: {\n scope: 'case' | 'document';\n scopeId: string;\n node: string;\n registrationIndex: number;\n },\n ) {\n const causeMessage =\n cause instanceof Error ? cause.message : String(cause ?? 'Unknown error');\n super(\n `${details.scope === 'case' ? 'Case attempt' : 'Workflow document'} node teardown failed for \"${details.node}\": ${causeMessage}`,\n { code: 'NODE_SCOPE_TEARDOWN_ERROR', details, cause },\n );\n }\n}\n\nexport class FatalDeviceError extends WorkflowError {\n constructor(message: string, cause?: unknown) {\n super(message, { code: 'FATAL_DEVICE_ERROR', cause });\n }\n}\n\nexport const isFatalDeviceError = (error: unknown): boolean => {\n if (error instanceof FatalDeviceError) return true;\n if (error instanceof WorkflowError && error.code === 'FATAL_DEVICE_ERROR') {\n return true;\n }\n if (\n error instanceof Error &&\n /device offline|device not found|(?:adb|bdc|device) connection (?:was )?closed/i.test(\n error.message,\n )\n ) {\n return true;\n }\n return error instanceof Error && error.cause !== undefined\n ? isFatalDeviceError(error.cause)\n : false;\n};\n\nexport class CaseExecutionError extends WorkflowError {\n readonly result: import('./engine/types').CaseRunResult;\n\n constructor(result: import('./engine/types').CaseRunResult) {\n super(`Case \"${result.name}\" failed.`, {\n code: 'CASE_EXECUTION_FAILED',\n details: { caseId: result.caseId, runId: result.runId },\n });\n this.result = result;\n }\n}\n\nexport class WorkflowDocumentExecutionError extends WorkflowError {\n readonly result: import('./engine/types').WorkflowDocumentRunResult;\n\n constructor(result: import('./engine/types').WorkflowDocumentRunResult) {\n super(`Workflow document \"${result.sourcePath}\" failed.`, {\n code: 'WORKFLOW_DOCUMENT_EXECUTION_FAILED',\n details: {\n documentId: result.documentId,\n documentRunId: result.documentRunId,\n },\n });\n this.result = result;\n }\n}\n\nexport function normalizeNodeExecutionError(\n error: unknown,\n node: string,\n): WorkflowError {\n return error instanceof WorkflowError\n ? error\n : new NodeExecutionError(node, error);\n}\n"],"names":["__webpack_require__","definition","key","Object","obj","prop","Symbol","WorkflowError","Error","undefined","message","options","WorkflowParseError","details","cause","NodeDefinitionError","DuplicateNodeError","node","NodeNotFoundError","NodeInputValidationError","error","issues","issue","String","firstIssue","path","StepTimeoutError","timeoutMs","NodeExecutionError","output","causeMessage","WorkflowLifecycleError","ProjectSetupError","ProjectTeardownError","NodeScopeTeardownError","FatalDeviceError","isFatalDeviceError","CaseExecutionError","result","WorkflowDocumentExecutionError","normalizeNodeExecutionError"],"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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACEO,MAAMI,sBAAsBC;IAWjC,SAAkC;QAChC,OAAO;YACL,MAAM,IAAI,CAAC,IAAI;YACf,SAAS,IAAI,CAAC,OAAO;YACrB,MAAM,IAAI,CAAC,IAAI;YACf,GAAI,AAAiBC,WAAjB,IA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iBAAiBZ,SACjB,iFAAiF,IAAI,CACnFY,MAAM,OAAO,GAGf,OAAO;IAET,OAAOA,iBAAiBZ,SAASY,AAAgBX,WAAhBW,MAAM,KAAK,GACxCgB,mBAAmBhB,MAAM,KAAK,IAC9B;AACN;AAEO,MAAMiB,2BAA2B9B;IAGtC,YAAY+B,MAA8C,CAAE;QAC1D,KAAK,CAAC,CAAC,MAAM,EAAEA,OAAO,IAAI,CAAC,SAAS,CAAC,EAAE;YACrC,MAAM;YACN,SAAS;gBAAE,QAAQA,OAAO,MAAM;gBAAE,OAAOA,OAAO,KAAK;YAAC;QACxD,IANF,uBAAS,UAAT;QAOE,IAAI,CAAC,MAAM,GAAGA;IAChB;AACF;AAEO,MAAMC,uCAAuChC;IAGlD,YAAY+B,MAA0D,CAAE;QACtE,KAAK,CAAC,CAAC,mBAAmB,EAAEA,OAAO,UAAU,CAAC,SAAS,CAAC,EAAE;YACxD,MAAM;YACN,SAAS;gBACP,YAAYA,OAAO,UAAU;gBAC7B,eAAeA,OAAO,aAAa;YACrC;QACF,IATF,uBAAS,UAAT;QAUE,IAAI,CAAC,MAAM,GAAGA;IAChB;AACF;AAEO,SAASE,4BACdpB,KAAc,EACdH,IAAY;IAEZ,OAAOG,iBAAiBb,gBACpBa,QACA,IAAIQ,mBAAmBX,MAAMG;AACnC"}
|
|
@@ -0,0 +1,123 @@
|
|
|
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
|
+
executionRecordToResult: ()=>executionRecordToResult,
|
|
28
|
+
serializeWorkflowExecutionRecord: ()=>serializeWorkflowExecutionRecord,
|
|
29
|
+
serializeWorkflowValue: ()=>serializeWorkflowValue
|
|
30
|
+
});
|
|
31
|
+
function executionRecordToResult(record) {
|
|
32
|
+
const execution = record.execution?.document;
|
|
33
|
+
const hostErrors = [
|
|
34
|
+
...execution?.hostErrors ?? []
|
|
35
|
+
];
|
|
36
|
+
const add = (phase, error)=>{
|
|
37
|
+
if (void 0 !== error) hostErrors.push({
|
|
38
|
+
phase,
|
|
39
|
+
error
|
|
40
|
+
});
|
|
41
|
+
};
|
|
42
|
+
add('setup', record.setupError);
|
|
43
|
+
add('execution', record.executionError);
|
|
44
|
+
for (const error of record.cleanupErrors)add('cleanup', error);
|
|
45
|
+
add('report', record.reportError);
|
|
46
|
+
for (const error of record.publicationErrors ?? [])add('publication', error);
|
|
47
|
+
for (const error of record.observerErrors ?? [])add('observer', error);
|
|
48
|
+
const projectName = record.projectName ?? execution?.projectName ?? record.platform;
|
|
49
|
+
return {
|
|
50
|
+
document: {
|
|
51
|
+
documentId: record.document.documentId,
|
|
52
|
+
documentRunId: record.runId,
|
|
53
|
+
attemptIndex: record.attemptIndex,
|
|
54
|
+
projectId: record.document.projectId,
|
|
55
|
+
projectName,
|
|
56
|
+
sourcePath: record.sourcePath,
|
|
57
|
+
status: hostErrors.length || execution?.status === 'failed' ? 'failed' : 'success',
|
|
58
|
+
startedAt: record.startedAt,
|
|
59
|
+
endedAt: record.endedAt,
|
|
60
|
+
durationMs: record.durationMs,
|
|
61
|
+
beforeAll: execution?.beforeAll ?? [],
|
|
62
|
+
afterAll: execution?.afterAll ?? [],
|
|
63
|
+
...hostErrors.length ? {
|
|
64
|
+
hostErrors
|
|
65
|
+
} : {},
|
|
66
|
+
...execution?.executionErrors?.length ? {
|
|
67
|
+
executionErrors: execution.executionErrors
|
|
68
|
+
} : {},
|
|
69
|
+
...execution?.teardownErrors?.length ? {
|
|
70
|
+
teardownErrors: execution.teardownErrors
|
|
71
|
+
} : {},
|
|
72
|
+
reportScopeId: execution?.reportScopeId ?? record.runId,
|
|
73
|
+
reportPaths: [
|
|
74
|
+
...record.reportPaths
|
|
75
|
+
],
|
|
76
|
+
...record.reportSources?.length ? {
|
|
77
|
+
reportSources: [
|
|
78
|
+
...record.reportSources
|
|
79
|
+
]
|
|
80
|
+
} : {}
|
|
81
|
+
},
|
|
82
|
+
cases: record.execution?.cases ?? record.document.cases.map((item)=>({
|
|
83
|
+
caseId: item.caseId,
|
|
84
|
+
projectName,
|
|
85
|
+
name: item.definition.name,
|
|
86
|
+
sourcePath: item.sourcePath,
|
|
87
|
+
caseIndex: item.caseIndex,
|
|
88
|
+
status: 'not-run',
|
|
89
|
+
notRunReason: 'document-start-failed'
|
|
90
|
+
}))
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
function serializeWorkflowExecutionRecord(record) {
|
|
94
|
+
return serializeWorkflowValue(record);
|
|
95
|
+
}
|
|
96
|
+
function serializeWorkflowValue(value) {
|
|
97
|
+
return JSON.stringify(value, (_key, value)=>value instanceof Error ? {
|
|
98
|
+
name: value.name,
|
|
99
|
+
message: value.message,
|
|
100
|
+
...'code' in value ? {
|
|
101
|
+
code: value.code
|
|
102
|
+
} : {},
|
|
103
|
+
...'details' in value ? {
|
|
104
|
+
details: value.details
|
|
105
|
+
} : {},
|
|
106
|
+
...value instanceof AggregateError ? {
|
|
107
|
+
errors: value.errors
|
|
108
|
+
} : {}
|
|
109
|
+
} : value, 2);
|
|
110
|
+
}
|
|
111
|
+
exports.executionRecordToResult = __webpack_exports__.executionRecordToResult;
|
|
112
|
+
exports.serializeWorkflowExecutionRecord = __webpack_exports__.serializeWorkflowExecutionRecord;
|
|
113
|
+
exports.serializeWorkflowValue = __webpack_exports__.serializeWorkflowValue;
|
|
114
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
115
|
+
"executionRecordToResult",
|
|
116
|
+
"serializeWorkflowExecutionRecord",
|
|
117
|
+
"serializeWorkflowValue"
|
|
118
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
119
|
+
Object.defineProperty(exports, '__esModule', {
|
|
120
|
+
value: true
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
//# sourceMappingURL=execution-record.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"test-runner/execution-record.js","sources":["webpack/runtime/define_property_getters","webpack/runtime/has_own_property","webpack/runtime/make_namespace_object","../../../src/test-runner/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 {\n WorkflowDocumentExecutionResult,\n WorkflowHostError,\n WorkflowReportSource,\n} from './engine/types';\nimport type { CollectedWorkflowDocument } from './parser/types';\n\n/**\n * One complete document invocation, including work outside the pure kernel.\n * The entry adapter owns resources and records their lifecycle here. A failed\n * setup has a record even though no document could be executed.\n *\n * runId identifies this invocation, not an Agent/report resource. File retries\n * create new records; they do not become per-Case retries. Report projection\n * must not mutate these records or redact the original API output.\n */\nexport interface WorkflowExecutionRecord {\n readonly runId: string;\n readonly attemptIndex: number;\n readonly sourcePath: string;\n readonly platform: string;\n readonly projectName?: string;\n readonly document: CollectedWorkflowDocument;\n readonly status: 'success' | 'failed';\n readonly startedAt: string;\n readonly endedAt: string;\n readonly durationMs: number;\n readonly execution?: WorkflowDocumentExecutionResult;\n readonly setupError?: unknown;\n readonly executionError?: unknown;\n readonly cleanupErrors: readonly unknown[];\n readonly outputs: Readonly<Record<string, unknown>>;\n readonly reportPaths: readonly string[];\n readonly reportSources?: readonly WorkflowReportSource[];\n readonly children?: readonly WorkflowExecutionRecord[];\n readonly reportError?: unknown;\n /** Entry-owned report copies or result files failed after execution finished. */\n readonly publicationErrors?: readonly unknown[];\n /** Entry progress/result observers failed, independently of action outcomes. */\n readonly observerErrors?: readonly unknown[];\n}\n\n/** Complete host facts as a kernel result. Report and summary consume this view. */\nexport function executionRecordToResult(\n record: WorkflowExecutionRecord,\n): WorkflowDocumentExecutionResult {\n const execution = record.execution?.document;\n const hostErrors: WorkflowHostError[] = [...(execution?.hostErrors ?? [])];\n const add = (phase: WorkflowHostError['phase'], error: unknown) => {\n if (error !== undefined) hostErrors.push({ phase, error });\n };\n add('setup', record.setupError);\n add('execution', record.executionError);\n for (const error of record.cleanupErrors) add('cleanup', error);\n add('report', record.reportError);\n for (const error of record.publicationErrors ?? []) add('publication', error);\n for (const error of record.observerErrors ?? []) add('observer', error);\n const projectName =\n record.projectName ?? execution?.projectName ?? record.platform;\n return {\n document: {\n documentId: record.document.documentId,\n documentRunId: record.runId,\n attemptIndex: record.attemptIndex,\n projectId: record.document.projectId,\n projectName,\n sourcePath: record.sourcePath,\n // Case failures are counted separately; host failures must not convert\n // successful Cases into retryable action failures.\n status:\n hostErrors.length || execution?.status === 'failed'\n ? 'failed'\n : 'success',\n startedAt: record.startedAt,\n endedAt: record.endedAt,\n durationMs: record.durationMs,\n beforeAll: execution?.beforeAll ?? [],\n afterAll: execution?.afterAll ?? [],\n ...(hostErrors.length ? { hostErrors } : {}),\n ...(execution?.executionErrors?.length\n ? { executionErrors: execution.executionErrors }\n : {}),\n ...(execution?.teardownErrors?.length\n ? { teardownErrors: execution.teardownErrors }\n : {}),\n reportScopeId: execution?.reportScopeId ?? record.runId,\n reportPaths: [...record.reportPaths],\n ...(record.reportSources?.length\n ? { reportSources: [...record.reportSources] }\n : {}),\n },\n cases:\n record.execution?.cases ??\n record.document.cases.map((item) => ({\n caseId: item.caseId,\n projectName,\n name: item.definition.name,\n sourcePath: item.sourcePath,\n caseIndex: item.caseIndex,\n status: 'not-run' as const,\n notRunReason: 'document-start-failed' as const,\n })),\n };\n}\n\n/** Persist execution facts across workers without dropping native Error fields. */\nexport function serializeWorkflowExecutionRecord(\n record: WorkflowExecutionRecord,\n): string {\n return serializeWorkflowValue(record);\n}\n\n/** The same error-preserving encoding for entry results and worker envelopes. */\nexport function serializeWorkflowValue(value: unknown): string {\n return JSON.stringify(\n value,\n (_key, value) =>\n value instanceof Error\n ? {\n name: value.name,\n message: value.message,\n ...('code' in value ? { code: value.code } : {}),\n ...('details' in value ? { details: value.details } : {}),\n ...(value instanceof AggregateError\n ? { errors: value.errors }\n : {}),\n }\n : value,\n 2,\n );\n}\n"],"names":["__webpack_require__","definition","key","Object","obj","prop","Symbol","executionRecordToResult","record","execution","hostErrors","add","phase","error","undefined","projectName","item","serializeWorkflowExecutionRecord","serializeWorkflowValue","value","JSON","_key","Error","AggregateError"],"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;YAA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CAAC;QACR,IACAA,OACN;AAEJ"}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_modules__ = {
|
|
3
|
+
"./engine" (module) {
|
|
4
|
+
module.exports = require("./engine/index.js");
|
|
5
|
+
},
|
|
6
|
+
"./errors" (module) {
|
|
7
|
+
module.exports = require("./errors.js");
|
|
8
|
+
},
|
|
9
|
+
"./execution-record" (module) {
|
|
10
|
+
module.exports = require("./execution-record.js");
|
|
11
|
+
},
|
|
12
|
+
"./node" (module) {
|
|
13
|
+
module.exports = require("./node/index.js");
|
|
14
|
+
},
|
|
15
|
+
"./parser/document-format" (module) {
|
|
16
|
+
module.exports = require("./parser/document-format.js");
|
|
17
|
+
},
|
|
18
|
+
"./parser/normalize" (module) {
|
|
19
|
+
module.exports = require("./parser/normalize.js");
|
|
20
|
+
},
|
|
21
|
+
"./parser/types" (module) {
|
|
22
|
+
module.exports = require("./parser/types.js");
|
|
23
|
+
},
|
|
24
|
+
"./project" (module) {
|
|
25
|
+
module.exports = require("./project.js");
|
|
26
|
+
},
|
|
27
|
+
"./reporting/execution-record" (module) {
|
|
28
|
+
module.exports = require("./reporting/execution-record.js");
|
|
29
|
+
},
|
|
30
|
+
"./reporting/sanitize" (module) {
|
|
31
|
+
module.exports = require("./reporting/sanitize.js");
|
|
32
|
+
},
|
|
33
|
+
"./reporting/test-run-report" (module) {
|
|
34
|
+
module.exports = require("./reporting/test-run-report.js");
|
|
35
|
+
},
|
|
36
|
+
"./reporting/types" (module) {
|
|
37
|
+
module.exports = require("./reporting/types.js");
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
var __webpack_module_cache__ = {};
|
|
41
|
+
function __webpack_require__(moduleId) {
|
|
42
|
+
var cachedModule = __webpack_module_cache__[moduleId];
|
|
43
|
+
if (void 0 !== cachedModule) return cachedModule.exports;
|
|
44
|
+
var module = __webpack_module_cache__[moduleId] = {
|
|
45
|
+
exports: {}
|
|
46
|
+
};
|
|
47
|
+
__webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
|
48
|
+
return module.exports;
|
|
49
|
+
}
|
|
50
|
+
(()=>{
|
|
51
|
+
__webpack_require__.n = (module)=>{
|
|
52
|
+
var getter = module && module.__esModule ? ()=>module['default'] : ()=>module;
|
|
53
|
+
__webpack_require__.d(getter, {
|
|
54
|
+
a: getter
|
|
55
|
+
});
|
|
56
|
+
return getter;
|
|
57
|
+
};
|
|
58
|
+
})();
|
|
59
|
+
(()=>{
|
|
60
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
61
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
62
|
+
enumerable: true,
|
|
63
|
+
get: definition[key]
|
|
64
|
+
});
|
|
65
|
+
};
|
|
66
|
+
})();
|
|
67
|
+
(()=>{
|
|
68
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
69
|
+
})();
|
|
70
|
+
(()=>{
|
|
71
|
+
__webpack_require__.r = (exports1)=>{
|
|
72
|
+
if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
73
|
+
value: 'Module'
|
|
74
|
+
});
|
|
75
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
76
|
+
value: true
|
|
77
|
+
});
|
|
78
|
+
};
|
|
79
|
+
})();
|
|
80
|
+
var __webpack_exports__ = {};
|
|
81
|
+
(()=>{
|
|
82
|
+
__webpack_require__.r(__webpack_exports__);
|
|
83
|
+
var _engine__rspack_import_0 = __webpack_require__("./engine");
|
|
84
|
+
var __rspack_reexport = {};
|
|
85
|
+
for(const __rspack_import_key in _engine__rspack_import_0)if ("default" !== __rspack_import_key) __rspack_reexport[__rspack_import_key] = ()=>_engine__rspack_import_0[__rspack_import_key];
|
|
86
|
+
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
87
|
+
var _errors__rspack_import_1 = __webpack_require__("./errors");
|
|
88
|
+
var __rspack_reexport = {};
|
|
89
|
+
for(const __rspack_import_key in _errors__rspack_import_1)if ("default" !== __rspack_import_key) __rspack_reexport[__rspack_import_key] = ()=>_errors__rspack_import_1[__rspack_import_key];
|
|
90
|
+
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
91
|
+
var _execution_record__rspack_import_2 = __webpack_require__("./execution-record");
|
|
92
|
+
var __rspack_reexport = {};
|
|
93
|
+
for(const __rspack_import_key in _execution_record__rspack_import_2)if ("default" !== __rspack_import_key) __rspack_reexport[__rspack_import_key] = ()=>_execution_record__rspack_import_2[__rspack_import_key];
|
|
94
|
+
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
95
|
+
var _node__rspack_import_3 = __webpack_require__("./node");
|
|
96
|
+
var __rspack_reexport = {};
|
|
97
|
+
for(const __rspack_import_key in _node__rspack_import_3)if ("default" !== __rspack_import_key) __rspack_reexport[__rspack_import_key] = ()=>_node__rspack_import_3[__rspack_import_key];
|
|
98
|
+
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
99
|
+
var _parser_normalize__rspack_import_4 = __webpack_require__("./parser/normalize");
|
|
100
|
+
var __rspack_reexport = {};
|
|
101
|
+
for(const __rspack_import_key in _parser_normalize__rspack_import_4)if ("default" !== __rspack_import_key) __rspack_reexport[__rspack_import_key] = ()=>_parser_normalize__rspack_import_4[__rspack_import_key];
|
|
102
|
+
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
103
|
+
var _parser_document_format__rspack_import_5 = __webpack_require__("./parser/document-format");
|
|
104
|
+
var __rspack_reexport = {};
|
|
105
|
+
for(const __rspack_import_key in _parser_document_format__rspack_import_5)if ("default" !== __rspack_import_key) __rspack_reexport[__rspack_import_key] = ()=>_parser_document_format__rspack_import_5[__rspack_import_key];
|
|
106
|
+
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
107
|
+
var _parser_types__rspack_import_6 = __webpack_require__("./parser/types");
|
|
108
|
+
var __rspack_reexport = {};
|
|
109
|
+
for(const __rspack_import_key in _parser_types__rspack_import_6)if ("default" !== __rspack_import_key) __rspack_reexport[__rspack_import_key] = ()=>_parser_types__rspack_import_6[__rspack_import_key];
|
|
110
|
+
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
111
|
+
var _project__rspack_import_7 = __webpack_require__("./project");
|
|
112
|
+
var __rspack_reexport = {};
|
|
113
|
+
for(const __rspack_import_key in _project__rspack_import_7)if ("default" !== __rspack_import_key) __rspack_reexport[__rspack_import_key] = ()=>_project__rspack_import_7[__rspack_import_key];
|
|
114
|
+
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
115
|
+
var _reporting_types__rspack_import_8 = __webpack_require__("./reporting/types");
|
|
116
|
+
var __rspack_reexport = {};
|
|
117
|
+
for(const __rspack_import_key in _reporting_types__rspack_import_8)if ("default" !== __rspack_import_key) __rspack_reexport[__rspack_import_key] = ()=>_reporting_types__rspack_import_8[__rspack_import_key];
|
|
118
|
+
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
119
|
+
var _reporting_sanitize__rspack_import_9 = __webpack_require__("./reporting/sanitize");
|
|
120
|
+
var __rspack_reexport = {};
|
|
121
|
+
for(const __rspack_import_key in _reporting_sanitize__rspack_import_9)if ("default" !== __rspack_import_key) __rspack_reexport[__rspack_import_key] = ()=>_reporting_sanitize__rspack_import_9[__rspack_import_key];
|
|
122
|
+
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
123
|
+
var _reporting_test_run_report__rspack_import_10 = __webpack_require__("./reporting/test-run-report");
|
|
124
|
+
var __rspack_reexport = {};
|
|
125
|
+
for(const __rspack_import_key in _reporting_test_run_report__rspack_import_10)if ("default" !== __rspack_import_key) __rspack_reexport[__rspack_import_key] = ()=>_reporting_test_run_report__rspack_import_10[__rspack_import_key];
|
|
126
|
+
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
127
|
+
var _reporting_execution_record__rspack_import_11 = __webpack_require__("./reporting/execution-record");
|
|
128
|
+
var __rspack_reexport = {};
|
|
129
|
+
for(const __rspack_import_key in _reporting_execution_record__rspack_import_11)if ("default" !== __rspack_import_key) __rspack_reexport[__rspack_import_key] = ()=>_reporting_execution_record__rspack_import_11[__rspack_import_key];
|
|
130
|
+
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
131
|
+
})();
|
|
132
|
+
for(var __rspack_i in __webpack_exports__)exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
133
|
+
Object.defineProperty(exports, '__esModule', {
|
|
134
|
+
value: true
|
|
135
|
+
});
|
|
136
|
+
|
|
137
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"test-runner/index.js","sources":["webpack/runtime/compat_get_default_export","webpack/runtime/define_property_getters","webpack/runtime/has_own_property","webpack/runtime/make_namespace_object"],"sourcesContent":["// getDefaultExport function for compatibility with non-ESM modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};\n","__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};"],"names":["__webpack_require__","module","getter","definition","key","Object","obj","prop","Symbol"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IACAA,oBAAoB,CAAC,GAAG,CAACC;QACxB,IAAIC,SAASD,UAAUA,OAAO,UAAU,GACvC,IAAOA,MAAM,CAAC,UAAU,GACxB,IAAOA;QACRD,oBAAoB,CAAC,CAACE,QAAQ;YAAE,GAAGA;QAAO;QAC1C,OAAOA;IACR;;;ICPAF,oBAAoB,CAAC,GAAG,CAAC,UAASG;QACjC,IAAI,IAAIC,OAAOD,WACR,IAAGH,oBAAoB,CAAC,CAACG,YAAYC,QAAQ,CAACJ,oBAAoB,CAAC,CAAC,UAASI,MACzEC,OAAO,cAAc,CAAC,UAASD,KAAK;YAAE,YAAY;YAAM,KAAKD,UAAU,CAACC,IAAI;QAAC;IAGzF;;;ICNAJ,oBAAoB,CAAC,GAAG,CAACM,KAAKC,OAAUF,OAAO,SAAS,CAAC,cAAc,CAAC,IAAI,CAACC,KAAKC;;;ICClFP,oBAAoB,CAAC,GAAG,CAAC;QACxB,IAAG,AAAkB,eAAlB,OAAOQ,UAA0BA,OAAO,WAAW,EACrDH,OAAO,cAAc,CAAC,UAASG,OAAO,WAAW,EAAE;YAAE,OAAO;QAAS;QAEtEH,OAAO,cAAc,CAAC,UAAS,cAAc;YAAE,OAAO;QAAK;IAC5D"}
|
|
@@ -0,0 +1,78 @@
|
|
|
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
|
+
defineNode: ()=>defineNode
|
|
28
|
+
});
|
|
29
|
+
const v4_namespaceObject = require("zod/v4");
|
|
30
|
+
const external_errors_js_namespaceObject = require("../errors.js");
|
|
31
|
+
const validateOptionalText = (value, field, node)=>{
|
|
32
|
+
if (void 0 !== value && ('string' != typeof value || 0 === value.trim().length)) throw new external_errors_js_namespaceObject.NodeDefinitionError(`Node "${node}" ${field} must be a non-empty string.`, {
|
|
33
|
+
node,
|
|
34
|
+
field
|
|
35
|
+
});
|
|
36
|
+
};
|
|
37
|
+
const validateInputSchema = (schema, node)=>{
|
|
38
|
+
if (void 0 === schema) return;
|
|
39
|
+
if (!(schema instanceof v4_namespaceObject.z.ZodObject)) throw new external_errors_js_namespaceObject.NodeDefinitionError(`Node "${node}" inputSchema must be a Zod object schema.`, {
|
|
40
|
+
node,
|
|
41
|
+
field: 'inputSchema'
|
|
42
|
+
});
|
|
43
|
+
if ('$' in schema.shape) throw new external_errors_js_namespaceObject.NodeDefinitionError(`Node "${node}" inputSchema must not declare "$" as an input property.`, {
|
|
44
|
+
node,
|
|
45
|
+
field: 'inputSchema.$'
|
|
46
|
+
});
|
|
47
|
+
};
|
|
48
|
+
const validateDefinition = (options)=>{
|
|
49
|
+
if (!options || 'object' != typeof options) throw new external_errors_js_namespaceObject.NodeDefinitionError('Node definition must be an object.');
|
|
50
|
+
if ('string' != typeof options.name || 0 === options.name.trim().length) throw new external_errors_js_namespaceObject.NodeDefinitionError('Node name must be a non-empty string.');
|
|
51
|
+
validateOptionalText(options.title, 'title', options.name);
|
|
52
|
+
validateOptionalText(options.description, "description", options.name);
|
|
53
|
+
if (void 0 !== options.stringInputKey && false !== options.stringInputKey && ('string' != typeof options.stringInputKey || 0 === options.stringInputKey.trim().length)) throw new external_errors_js_namespaceObject.NodeDefinitionError(`Node "${options.name}" stringInputKey must be a non-empty string or false.`, {
|
|
54
|
+
node: options.name,
|
|
55
|
+
field: 'stringInputKey'
|
|
56
|
+
});
|
|
57
|
+
validateInputSchema(options.inputSchema, options.name);
|
|
58
|
+
if ('string' == typeof options.stringInputKey && options.inputSchema instanceof v4_namespaceObject.z.ZodObject && !(options.stringInputKey in options.inputSchema.shape)) throw new external_errors_js_namespaceObject.NodeDefinitionError(`Node "${options.name}" stringInputKey must reference a field in inputSchema.`, {
|
|
59
|
+
node: options.name,
|
|
60
|
+
field: 'stringInputKey'
|
|
61
|
+
});
|
|
62
|
+
if ('function' != typeof options.execute) throw new external_errors_js_namespaceObject.NodeDefinitionError(`Node "${options.name}" must provide an execute function.`, {
|
|
63
|
+
node: options.name
|
|
64
|
+
});
|
|
65
|
+
};
|
|
66
|
+
function defineNode(options) {
|
|
67
|
+
validateDefinition(options);
|
|
68
|
+
return options;
|
|
69
|
+
}
|
|
70
|
+
exports.defineNode = __webpack_exports__.defineNode;
|
|
71
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
72
|
+
"defineNode"
|
|
73
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
74
|
+
Object.defineProperty(exports, '__esModule', {
|
|
75
|
+
value: true
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
//# sourceMappingURL=define-node.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"test-runner/node/define-node.js","sources":["webpack/runtime/define_property_getters","webpack/runtime/has_own_property","webpack/runtime/make_namespace_object","../../../../src/test-runner/node/define-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 { z } from 'zod/v4';\nimport { NodeDefinitionError } from '../errors';\nimport type {\n DefineNodeOptions,\n DefineNodeWithSchemaOptions,\n NodeDefinition,\n NodeDefinitionWithSchema,\n NodeInputSchema,\n} from './types';\n\nconst validateOptionalText = (\n value: unknown,\n field: 'title' | 'description',\n node: string,\n): void => {\n if (\n value !== undefined &&\n (typeof value !== 'string' || value.trim().length === 0)\n ) {\n throw new NodeDefinitionError(\n `Node \"${node}\" ${field} must be a non-empty string.`,\n { node, field },\n );\n }\n};\n\nconst validateInputSchema = (schema: unknown, node: string): void => {\n if (schema === undefined) return;\n if (!(schema instanceof z.ZodObject)) {\n throw new NodeDefinitionError(\n `Node \"${node}\" inputSchema must be a Zod object schema.`,\n { node, field: 'inputSchema' },\n );\n }\n if ('$' in schema.shape) {\n throw new NodeDefinitionError(\n `Node \"${node}\" inputSchema must not declare \"$\" as an input property.`,\n { node, field: 'inputSchema.$' },\n );\n }\n};\n\nconst validateDefinition = (options: {\n name: string;\n title?: unknown;\n description?: unknown;\n stringInputKey?: unknown;\n inputSchema?: unknown;\n execute: unknown;\n}): void => {\n if (!options || typeof options !== 'object') {\n throw new NodeDefinitionError('Node definition must be an object.');\n }\n\n if (typeof options.name !== 'string' || options.name.trim().length === 0) {\n throw new NodeDefinitionError('Node name must be a non-empty string.');\n }\n\n validateOptionalText(options.title, 'title', options.name);\n validateOptionalText(options.description, 'description', options.name);\n if (\n options.stringInputKey !== undefined &&\n options.stringInputKey !== false &&\n (typeof options.stringInputKey !== 'string' ||\n options.stringInputKey.trim().length === 0)\n ) {\n throw new NodeDefinitionError(\n `Node \"${options.name}\" stringInputKey must be a non-empty string or false.`,\n { node: options.name, field: 'stringInputKey' },\n );\n }\n validateInputSchema(options.inputSchema, options.name);\n\n if (\n typeof options.stringInputKey === 'string' &&\n options.inputSchema instanceof z.ZodObject &&\n !(options.stringInputKey in options.inputSchema.shape)\n ) {\n throw new NodeDefinitionError(\n `Node \"${options.name}\" stringInputKey must reference a field in inputSchema.`,\n { node: options.name, field: 'stringInputKey' },\n );\n }\n\n if (typeof options.execute !== 'function') {\n throw new NodeDefinitionError(\n `Node \"${options.name}\" must provide an execute function.`,\n { node: options.name },\n );\n }\n};\n\nexport function defineNode<\n TSchema extends NodeInputSchema,\n TData = unknown,\n TContext = unknown,\n>(\n options: DefineNodeWithSchemaOptions<TSchema, TData, TContext>,\n): NodeDefinitionWithSchema<TSchema, TData, TContext>;\n\nexport function defineNode<\n TInput = unknown,\n TData = unknown,\n TContext = unknown,\n>(\n options: DefineNodeOptions<TInput, TData, TContext>,\n): NodeDefinition<TInput, TData, TContext>;\n\nexport function defineNode(\n options: DefineNodeOptions<any, any, any>,\n): NodeDefinition<any, any, any> {\n validateDefinition(options);\n return options;\n}\n"],"names":["__webpack_require__","definition","key","Object","obj","prop","Symbol","validateOptionalText","value","field","node","undefined","NodeDefinitionError","validateInputSchema","schema","z","validateDefinition","options","defineNode"],"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,CAA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|
|
9
|
+
};
|
|
10
|
+
var __webpack_module_cache__ = {};
|
|
11
|
+
function __webpack_require__(moduleId) {
|
|
12
|
+
var cachedModule = __webpack_module_cache__[moduleId];
|
|
13
|
+
if (void 0 !== cachedModule) return cachedModule.exports;
|
|
14
|
+
var module = __webpack_module_cache__[moduleId] = {
|
|
15
|
+
exports: {}
|
|
16
|
+
};
|
|
17
|
+
__webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
|
18
|
+
return module.exports;
|
|
19
|
+
}
|
|
20
|
+
(()=>{
|
|
21
|
+
__webpack_require__.n = (module)=>{
|
|
22
|
+
var getter = module && module.__esModule ? ()=>module['default'] : ()=>module;
|
|
23
|
+
__webpack_require__.d(getter, {
|
|
24
|
+
a: getter
|
|
25
|
+
});
|
|
26
|
+
return getter;
|
|
27
|
+
};
|
|
28
|
+
})();
|
|
29
|
+
(()=>{
|
|
30
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
31
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
32
|
+
enumerable: true,
|
|
33
|
+
get: definition[key]
|
|
34
|
+
});
|
|
35
|
+
};
|
|
36
|
+
})();
|
|
37
|
+
(()=>{
|
|
38
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
39
|
+
})();
|
|
40
|
+
(()=>{
|
|
41
|
+
__webpack_require__.r = (exports1)=>{
|
|
42
|
+
if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
43
|
+
value: 'Module'
|
|
44
|
+
});
|
|
45
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
46
|
+
value: true
|
|
47
|
+
});
|
|
48
|
+
};
|
|
49
|
+
})();
|
|
50
|
+
var __webpack_exports__ = {};
|
|
51
|
+
(()=>{
|
|
52
|
+
__webpack_require__.r(__webpack_exports__);
|
|
53
|
+
var _define_node__rspack_import_0 = __webpack_require__("./define-node");
|
|
54
|
+
var __rspack_reexport = {};
|
|
55
|
+
for(const __rspack_import_key in _define_node__rspack_import_0)if ("default" !== __rspack_import_key) __rspack_reexport[__rspack_import_key] = ()=>_define_node__rspack_import_0[__rspack_import_key];
|
|
56
|
+
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
57
|
+
var _types__rspack_import_1 = __webpack_require__("./types");
|
|
58
|
+
var __rspack_reexport = {};
|
|
59
|
+
for(const __rspack_import_key in _types__rspack_import_1)if ("default" !== __rspack_import_key) __rspack_reexport[__rspack_import_key] = ()=>_types__rspack_import_1[__rspack_import_key];
|
|
60
|
+
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
61
|
+
})();
|
|
62
|
+
for(var __rspack_i in __webpack_exports__)exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
63
|
+
Object.defineProperty(exports, '__esModule', {
|
|
64
|
+
value: true
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"test-runner/node/index.js","sources":["webpack/runtime/compat_get_default_export","webpack/runtime/define_property_getters","webpack/runtime/has_own_property","webpack/runtime/make_namespace_object"],"sourcesContent":["// getDefaultExport function for compatibility with non-ESM modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};\n","__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};"],"names":["__webpack_require__","module","getter","definition","key","Object","obj","prop","Symbol"],"mappings":";;;;;;;;;;;;;;;;;;;;IACAA,oBAAoB,CAAC,GAAG,CAACC;QACxB,IAAIC,SAASD,UAAUA,OAAO,UAAU,GACvC,IAAOA,MAAM,CAAC,UAAU,GACxB,IAAOA;QACRD,oBAAoB,CAAC,CAACE,QAAQ;YAAE,GAAGA;QAAO;QAC1C,OAAOA;IACR;;;ICPAF,oBAAoB,CAAC,GAAG,CAAC,UAASG;QACjC,IAAI,IAAIC,OAAOD,WACR,IAAGH,oBAAoB,CAAC,CAACG,YAAYC,QAAQ,CAACJ,oBAAoB,CAAC,CAAC,UAASI,MACzEC,OAAO,cAAc,CAAC,UAASD,KAAK;YAAE,YAAY;YAAM,KAAKD,UAAU,CAACC,IAAI;QAAC;IAGzF;;;ICNAJ,oBAAoB,CAAC,GAAG,CAACM,KAAKC,OAAUF,OAAO,SAAS,CAAC,cAAc,CAAC,IAAI,CAACC,KAAKC;;;ICClFP,oBAAoB,CAAC,GAAG,CAAC;QACxB,IAAG,AAAkB,eAAlB,OAAOQ,UAA0BA,OAAO,WAAW,EACrDH,OAAO,cAAc,CAAC,UAASG,OAAO,WAAW,EAAE;YAAE,OAAO;QAAS;QAEtEH,OAAO,cAAc,CAAC,UAAS,cAAc;YAAE,OAAO;QAAK;IAC5D"}
|
|
@@ -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/node/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"}
|
|
@@ -0,0 +1,58 @@
|
|
|
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
|
+
classifyWorkflowDocumentFormat: ()=>classifyWorkflowDocumentFormat,
|
|
28
|
+
nativeWorkflowRootKeys: ()=>nativeWorkflowRootKeys
|
|
29
|
+
});
|
|
30
|
+
const nativeWorkflowRootKeys = [
|
|
31
|
+
'beforeAll',
|
|
32
|
+
'beforeEach',
|
|
33
|
+
'cases',
|
|
34
|
+
'afterEach',
|
|
35
|
+
'afterAll'
|
|
36
|
+
];
|
|
37
|
+
const isMapping = (value)=>'object' == typeof value && null !== value && !Array.isArray(value);
|
|
38
|
+
const classifyWorkflowDocumentFormat = (value)=>{
|
|
39
|
+
if (!isMapping(value)) return 'unknown';
|
|
40
|
+
const hasLegacyRoot = Object.hasOwn(value, 'tasks');
|
|
41
|
+
const hasNativeRoot = nativeWorkflowRootKeys.some((key)=>Object.hasOwn(value, key));
|
|
42
|
+
if (hasLegacyRoot && hasNativeRoot) return 'mixed';
|
|
43
|
+
if (hasLegacyRoot) return 'legacy';
|
|
44
|
+
if (hasNativeRoot) return 'native';
|
|
45
|
+
if (Array.isArray(value.files)) return 'legacy-batch';
|
|
46
|
+
return 'unknown';
|
|
47
|
+
};
|
|
48
|
+
exports.classifyWorkflowDocumentFormat = __webpack_exports__.classifyWorkflowDocumentFormat;
|
|
49
|
+
exports.nativeWorkflowRootKeys = __webpack_exports__.nativeWorkflowRootKeys;
|
|
50
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
51
|
+
"classifyWorkflowDocumentFormat",
|
|
52
|
+
"nativeWorkflowRootKeys"
|
|
53
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
54
|
+
Object.defineProperty(exports, '__esModule', {
|
|
55
|
+
value: true
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
//# sourceMappingURL=document-format.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"test-runner/parser/document-format.js","sources":["webpack/runtime/define_property_getters","webpack/runtime/has_own_property","webpack/runtime/make_namespace_object","../../../../src/test-runner/parser/document-format.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};","export const nativeWorkflowRootKeys = [\n 'beforeAll',\n 'beforeEach',\n 'cases',\n 'afterEach',\n 'afterAll',\n] as const;\n\nexport type WorkflowDocumentFormat =\n | 'legacy'\n | 'legacy-batch'\n | 'native'\n | 'mixed'\n | 'unknown';\n\nconst isMapping = (value: unknown): value is Record<string, unknown> =>\n typeof value === 'object' && value !== null && !Array.isArray(value);\n\n/**\n * Classify only the document envelope. Parsing and schema validation remain\n * owned by the selected command so this helper can never route execution.\n */\nexport const classifyWorkflowDocumentFormat = (\n value: unknown,\n): WorkflowDocumentFormat => {\n if (!isMapping(value)) return 'unknown';\n\n const hasLegacyRoot = Object.hasOwn(value, 'tasks');\n const hasNativeRoot = nativeWorkflowRootKeys.some((key) =>\n Object.hasOwn(value, key),\n );\n\n if (hasLegacyRoot && hasNativeRoot) return 'mixed';\n if (hasLegacyRoot) return 'legacy';\n if (hasNativeRoot) return 'native';\n if (Array.isArray(value.files)) return 'legacy-batch';\n return 'unknown';\n};\n"],"names":["__webpack_require__","definition","key","Object","obj","prop","Symbol","nativeWorkflowRootKeys","isMapping","value","Array","classifyWorkflowDocumentFormat","hasLegacyRoot","hasNativeRoot"],"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;;;;;;;;ACNO,MAAMI,yBAAyB;IACpC;IACA;IACA;IACA;IACA;CACD;AASD,MAAMC,YAAY,CAACC,QACjB,AAAiB,YAAjB,OAAOA,SAAsBA,AAAU,SAAVA,SAAkB,CAACC,MAAM,OAAO,CAACD;AAMzD,MAAME,iCAAiC,CAC5CF;IAEA,IAAI,CAACD,UAAUC,QAAQ,OAAO;IAE9B,MAAMG,gBAAgBT,OAAO,MAAM,CAACM,OAAO;IAC3C,MAAMI,gBAAgBN,uBAAuB,IAAI,CAAC,CAACL,MACjDC,OAAO,MAAM,CAACM,OAAOP;IAGvB,IAAIU,iBAAiBC,eAAe,OAAO;IAC3C,IAAID,eAAe,OAAO;IAC1B,IAAIC,eAAe,OAAO;IAC1B,IAAIH,MAAM,OAAO,CAACD,MAAM,KAAK,GAAG,OAAO;IACvC,OAAO;AACT"}
|