@thymian/core 0.0.0-PLACEHOLDER
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +59 -0
- package/dist/actions/action.d.ts +5 -0
- package/dist/actions/action.d.ts.map +1 -0
- package/dist/actions/action.js +2 -0
- package/dist/actions/action.js.map +1 -0
- package/dist/actions/close.action.d.ts +3 -0
- package/dist/actions/close.action.d.ts.map +1 -0
- package/dist/actions/close.action.js +2 -0
- package/dist/actions/close.action.js.map +1 -0
- package/dist/actions/core-analyze.action.d.ts +11 -0
- package/dist/actions/core-analyze.action.d.ts.map +1 -0
- package/dist/actions/core-analyze.action.js +2 -0
- package/dist/actions/core-analyze.action.js.map +1 -0
- package/dist/actions/core-lint.action.d.ts +9 -0
- package/dist/actions/core-lint.action.d.ts.map +1 -0
- package/dist/actions/core-lint.action.js +2 -0
- package/dist/actions/core-lint.action.js.map +1 -0
- package/dist/actions/core-request-sample.action.d.ts +9 -0
- package/dist/actions/core-request-sample.action.d.ts.map +1 -0
- package/dist/actions/core-request-sample.action.js +2 -0
- package/dist/actions/core-request-sample.action.js.map +1 -0
- package/dist/actions/core-test.action.d.ts +10 -0
- package/dist/actions/core-test.action.d.ts.map +1 -0
- package/dist/actions/core-test.action.js +2 -0
- package/dist/actions/core-test.action.js.map +1 -0
- package/dist/actions/core-validation-input.d.ts +6 -0
- package/dist/actions/core-validation-input.d.ts.map +1 -0
- package/dist/actions/core-validation-input.js +2 -0
- package/dist/actions/core-validation-input.js.map +1 -0
- package/dist/actions/format-load.action.d.ts +16 -0
- package/dist/actions/format-load.action.d.ts.map +1 -0
- package/dist/actions/format-load.action.js +36 -0
- package/dist/actions/format-load.action.js.map +1 -0
- package/dist/actions/format.action.d.ts +4 -0
- package/dist/actions/format.action.d.ts.map +1 -0
- package/dist/actions/format.action.js +2 -0
- package/dist/actions/format.action.js.map +1 -0
- package/dist/actions/index.d.ts +39 -0
- package/dist/actions/index.d.ts.map +1 -0
- package/dist/actions/index.js +14 -0
- package/dist/actions/index.js.map +1 -0
- package/dist/actions/ready.action.d.ts +3 -0
- package/dist/actions/ready.action.d.ts.map +1 -0
- package/dist/actions/ready.action.js +2 -0
- package/dist/actions/ready.action.js.map +1 -0
- package/dist/actions/report-flush.action.d.ts +6 -0
- package/dist/actions/report-flush.action.d.ts.map +1 -0
- package/dist/actions/report-flush.action.js +2 -0
- package/dist/actions/report-flush.action.js.map +1 -0
- package/dist/actions/request-dispatch.action.d.ts +13 -0
- package/dist/actions/request-dispatch.action.d.ts.map +1 -0
- package/dist/actions/request-dispatch.action.js +45 -0
- package/dist/actions/request-dispatch.action.js.map +1 -0
- package/dist/actions/traffic-load.action.d.ts +16 -0
- package/dist/actions/traffic-load.action.d.ts.map +1 -0
- package/dist/actions/traffic-load.action.js +36 -0
- package/dist/actions/traffic-load.action.js.map +1 -0
- package/dist/actions/validation-result.d.ts +18 -0
- package/dist/actions/validation-result.d.ts.map +1 -0
- package/dist/actions/validation-result.js +81 -0
- package/dist/actions/validation-result.js.map +1 -0
- package/dist/ajv.d.ts +5 -0
- package/dist/ajv.d.ts.map +1 -0
- package/dist/ajv.js +9 -0
- package/dist/ajv.js.map +1 -0
- package/dist/chalk.d.ts +2 -0
- package/dist/chalk.d.ts.map +1 -0
- package/dist/chalk.js +2 -0
- package/dist/chalk.js.map +1 -0
- package/dist/constants.d.ts +5 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +6 -0
- package/dist/constants.js.map +1 -0
- package/dist/core-plugin.d.ts +5 -0
- package/dist/core-plugin.d.ts.map +1 -0
- package/dist/core-plugin.js +62 -0
- package/dist/core-plugin.js.map +1 -0
- package/dist/emitter/action-event.d.ts +19 -0
- package/dist/emitter/action-event.d.ts.map +1 -0
- package/dist/emitter/action-event.js +2 -0
- package/dist/emitter/action-event.js.map +1 -0
- package/dist/emitter/error-event.d.ts +13 -0
- package/dist/emitter/error-event.d.ts.map +1 -0
- package/dist/emitter/error-event.js +2 -0
- package/dist/emitter/error-event.js.map +1 -0
- package/dist/emitter/events.d.ts +10 -0
- package/dist/emitter/events.d.ts.map +1 -0
- package/dist/emitter/events.js +2 -0
- package/dist/emitter/events.js.map +1 -0
- package/dist/emitter/index.d.ts +6 -0
- package/dist/emitter/index.d.ts.map +1 -0
- package/dist/emitter/index.js +6 -0
- package/dist/emitter/index.js.map +1 -0
- package/dist/emitter/thymian-emitter.d.ts +61 -0
- package/dist/emitter/thymian-emitter.d.ts.map +1 -0
- package/dist/emitter/thymian-emitter.js +371 -0
- package/dist/emitter/thymian-emitter.js.map +1 -0
- package/dist/emitter/utils.d.ts +8 -0
- package/dist/emitter/utils.d.ts.map +1 -0
- package/dist/emitter/utils.js +16 -0
- package/dist/emitter/utils.js.map +1 -0
- package/dist/events/error.event.d.ts +5 -0
- package/dist/events/error.event.d.ts.map +1 -0
- package/dist/events/error.event.js +49 -0
- package/dist/events/error.event.js.map +1 -0
- package/dist/events/exit.event.d.ts +14 -0
- package/dist/events/exit.event.d.ts.map +1 -0
- package/dist/events/exit.event.js +9 -0
- package/dist/events/exit.event.js.map +1 -0
- package/dist/events/index.d.ts +15 -0
- package/dist/events/index.d.ts.map +1 -0
- package/dist/events/index.js +4 -0
- package/dist/events/index.js.map +1 -0
- package/dist/events/register-plugin.event.d.ts +51 -0
- package/dist/events/register-plugin.event.d.ts.map +1 -0
- package/dist/events/register-plugin.event.js +29 -0
- package/dist/events/register-plugin.event.js.map +1 -0
- package/dist/events/report.event.d.ts +104 -0
- package/dist/events/report.event.d.ts.map +1 -0
- package/dist/events/report.event.js +109 -0
- package/dist/events/report.event.js.map +1 -0
- package/dist/format/circular-references.d.ts +3 -0
- package/dist/format/circular-references.d.ts.map +1 -0
- package/dist/format/circular-references.js +71 -0
- package/dist/format/circular-references.js.map +1 -0
- package/dist/format/edges/edge.d.ts +9 -0
- package/dist/format/edges/edge.d.ts.map +1 -0
- package/dist/format/edges/edge.js +2 -0
- package/dist/format/edges/edge.js.map +1 -0
- package/dist/format/edges/has-sample.edge.d.ts +5 -0
- package/dist/format/edges/has-sample.edge.d.ts.map +1 -0
- package/dist/format/edges/has-sample.edge.js +2 -0
- package/dist/format/edges/has-sample.edge.js.map +1 -0
- package/dist/format/edges/http-link.edge.d.ts +10 -0
- package/dist/format/edges/http-link.edge.d.ts.map +1 -0
- package/dist/format/edges/http-link.edge.js +2 -0
- package/dist/format/edges/http-link.edge.js.map +1 -0
- package/dist/format/edges/http-transaction.edge.d.ts +5 -0
- package/dist/format/edges/http-transaction.edge.d.ts.map +1 -0
- package/dist/format/edges/http-transaction.edge.js +2 -0
- package/dist/format/edges/http-transaction.edge.js.map +1 -0
- package/dist/format/edges/is-secured-with.edge.d.ts +5 -0
- package/dist/format/edges/is-secured-with.edge.d.ts.map +1 -0
- package/dist/format/edges/is-secured-with.edge.js +2 -0
- package/dist/format/edges/is-secured-with.edge.js.map +1 -0
- package/dist/format/edges/sample-http-transaction.edge.d.ts +5 -0
- package/dist/format/edges/sample-http-transaction.edge.d.ts.map +1 -0
- package/dist/format/edges/sample-http-transaction.edge.js +2 -0
- package/dist/format/edges/sample-http-transaction.edge.js.map +1 -0
- package/dist/format/format-location.d.ts +13 -0
- package/dist/format/format-location.d.ts.map +1 -0
- package/dist/format/format-location.js +2 -0
- package/dist/format/format-location.js.map +1 -0
- package/dist/format/http-filter-expression-to-transaction-filter.d.ts +5 -0
- package/dist/format/http-filter-expression-to-transaction-filter.d.ts.map +1 -0
- package/dist/format/http-filter-expression-to-transaction-filter.js +88 -0
- package/dist/format/http-filter-expression-to-transaction-filter.js.map +1 -0
- package/dist/format/index.d.ts +14 -0
- package/dist/format/index.d.ts.map +1 -0
- package/dist/format/index.js +14 -0
- package/dist/format/index.js.map +1 -0
- package/dist/format/nodes/http-request.node.d.ts +29 -0
- package/dist/format/nodes/http-request.node.d.ts.map +1 -0
- package/dist/format/nodes/http-request.node.js +2 -0
- package/dist/format/nodes/http-request.node.js.map +1 -0
- package/dist/format/nodes/http-response.node.d.ts +12 -0
- package/dist/format/nodes/http-response.node.d.ts.map +1 -0
- package/dist/format/nodes/http-response.node.js +2 -0
- package/dist/format/nodes/http-response.node.js.map +1 -0
- package/dist/format/nodes/node.d.ts +9 -0
- package/dist/format/nodes/node.d.ts.map +1 -0
- package/dist/format/nodes/node.js +2 -0
- package/dist/format/nodes/node.js.map +1 -0
- package/dist/format/nodes/sample-http-request.node.d.ts +7 -0
- package/dist/format/nodes/sample-http-request.node.d.ts.map +1 -0
- package/dist/format/nodes/sample-http-request.node.js +2 -0
- package/dist/format/nodes/sample-http-request.node.js.map +1 -0
- package/dist/format/nodes/sample-http-response.node.d.ts +7 -0
- package/dist/format/nodes/sample-http-response.node.d.ts.map +1 -0
- package/dist/format/nodes/sample-http-response.node.js +2 -0
- package/dist/format/nodes/sample-http-response.node.js.map +1 -0
- package/dist/format/nodes/security-scheme.node.d.ts +17 -0
- package/dist/format/nodes/security-scheme.node.d.ts.map +1 -0
- package/dist/format/nodes/security-scheme.node.js +2 -0
- package/dist/format/nodes/security-scheme.node.js.map +1 -0
- package/dist/format/parameter.d.ts +10 -0
- package/dist/format/parameter.d.ts.map +1 -0
- package/dist/format/parameter.js +2 -0
- package/dist/format/parameter.js.map +1 -0
- package/dist/format/serialization-style/cookie.serialization-style.d.ts +5 -0
- package/dist/format/serialization-style/cookie.serialization-style.d.ts.map +1 -0
- package/dist/format/serialization-style/cookie.serialization-style.js +7 -0
- package/dist/format/serialization-style/cookie.serialization-style.js.map +1 -0
- package/dist/format/serialization-style/header.serialization-style.d.ts +5 -0
- package/dist/format/serialization-style/header.serialization-style.d.ts.map +1 -0
- package/dist/format/serialization-style/header.serialization-style.js +7 -0
- package/dist/format/serialization-style/header.serialization-style.js.map +1 -0
- package/dist/format/serialization-style/index.d.ts +6 -0
- package/dist/format/serialization-style/index.d.ts.map +1 -0
- package/dist/format/serialization-style/index.js +6 -0
- package/dist/format/serialization-style/index.js.map +1 -0
- package/dist/format/serialization-style/path.serialization-style.d.ts +5 -0
- package/dist/format/serialization-style/path.serialization-style.d.ts.map +1 -0
- package/dist/format/serialization-style/path.serialization-style.js +7 -0
- package/dist/format/serialization-style/path.serialization-style.js.map +1 -0
- package/dist/format/serialization-style/query.serialization-style.d.ts +5 -0
- package/dist/format/serialization-style/query.serialization-style.d.ts.map +1 -0
- package/dist/format/serialization-style/query.serialization-style.js +7 -0
- package/dist/format/serialization-style/query.serialization-style.js.map +1 -0
- package/dist/format/serialization-style/serialization-style.d.ts +13 -0
- package/dist/format/serialization-style/serialization-style.d.ts.map +1 -0
- package/dist/format/serialization-style/serialization-style.js +25 -0
- package/dist/format/serialization-style/serialization-style.js.map +1 -0
- package/dist/format/thymian-format.d.ts +109 -0
- package/dist/format/thymian-format.d.ts.map +1 -0
- package/dist/format/thymian-format.js +437 -0
- package/dist/format/thymian-format.js.map +1 -0
- package/dist/format/thymian-schema.d.ts +56 -0
- package/dist/format/thymian-schema.d.ts.map +1 -0
- package/dist/format/thymian-schema.js +2 -0
- package/dist/format/thymian-schema.js.map +1 -0
- package/dist/format/utils.d.ts +12 -0
- package/dist/format/utils.d.ts.map +1 -0
- package/dist/format/utils.js +85 -0
- package/dist/format/utils.js.map +1 -0
- package/dist/http-filter-visitor.d.ts +76 -0
- package/dist/http-filter-visitor.d.ts.map +1 -0
- package/dist/http-filter-visitor.js +168 -0
- package/dist/http-filter-visitor.js.map +1 -0
- package/dist/http-filter.d.ts +140 -0
- package/dist/http-filter.d.ts.map +1 -0
- package/dist/http-filter.js +137 -0
- package/dist/http-filter.js.map +1 -0
- package/dist/http-status-codes/1xx/index.d.ts +15 -0
- package/dist/http-status-codes/1xx/index.d.ts.map +1 -0
- package/dist/http-status-codes/1xx/index.js +15 -0
- package/dist/http-status-codes/1xx/index.js.map +1 -0
- package/dist/http-status-codes/1xx/informational.phrases.d.ts +4 -0
- package/dist/http-status-codes/1xx/informational.phrases.d.ts.map +1 -0
- package/dist/http-status-codes/1xx/informational.phrases.js +10 -0
- package/dist/http-status-codes/1xx/informational.phrases.js.map +1 -0
- package/dist/http-status-codes/1xx/informational.status-codes.d.ts +4 -0
- package/dist/http-status-codes/1xx/informational.status-codes.d.ts.map +1 -0
- package/dist/http-status-codes/1xx/informational.status-codes.js +5 -0
- package/dist/http-status-codes/1xx/informational.status-codes.js.map +1 -0
- package/dist/http-status-codes/2xx/index.d.ts +25 -0
- package/dist/http-status-codes/2xx/index.d.ts.map +1 -0
- package/dist/http-status-codes/2xx/index.js +25 -0
- package/dist/http-status-codes/2xx/index.js.map +1 -0
- package/dist/http-status-codes/2xx/successful.phrases.d.ts +4 -0
- package/dist/http-status-codes/2xx/successful.phrases.d.ts.map +1 -0
- package/dist/http-status-codes/2xx/successful.phrases.js +15 -0
- package/dist/http-status-codes/2xx/successful.phrases.js.map +1 -0
- package/dist/http-status-codes/2xx/successful.status-codes.d.ts +4 -0
- package/dist/http-status-codes/2xx/successful.status-codes.d.ts.map +1 -0
- package/dist/http-status-codes/2xx/successful.status-codes.js +7 -0
- package/dist/http-status-codes/2xx/successful.status-codes.js.map +1 -0
- package/dist/http-status-codes/3xx/index.d.ts +21 -0
- package/dist/http-status-codes/3xx/index.d.ts.map +1 -0
- package/dist/http-status-codes/3xx/index.js +21 -0
- package/dist/http-status-codes/3xx/index.js.map +1 -0
- package/dist/http-status-codes/3xx/redirection.phrases.d.ts +4 -0
- package/dist/http-status-codes/3xx/redirection.phrases.d.ts.map +1 -0
- package/dist/http-status-codes/3xx/redirection.phrases.js +13 -0
- package/dist/http-status-codes/3xx/redirection.phrases.js.map +1 -0
- package/dist/http-status-codes/3xx/redirection.status-codes.d.ts +4 -0
- package/dist/http-status-codes/3xx/redirection.status-codes.d.ts.map +1 -0
- package/dist/http-status-codes/3xx/redirection.status-codes.js +7 -0
- package/dist/http-status-codes/3xx/redirection.status-codes.js.map +1 -0
- package/dist/http-status-codes/4xx/client-error.phrases.d.ts +4 -0
- package/dist/http-status-codes/4xx/client-error.phrases.d.ts.map +1 -0
- package/dist/http-status-codes/4xx/client-error.phrases.js +34 -0
- package/dist/http-status-codes/4xx/client-error.phrases.js.map +1 -0
- package/dist/http-status-codes/4xx/client-error.status-codes.d.ts +4 -0
- package/dist/http-status-codes/4xx/client-error.status-codes.d.ts.map +1 -0
- package/dist/http-status-codes/4xx/client-error.status-codes.js +8 -0
- package/dist/http-status-codes/4xx/client-error.status-codes.js.map +1 -0
- package/dist/http-status-codes/4xx/index.d.ts +63 -0
- package/dist/http-status-codes/4xx/index.d.ts.map +1 -0
- package/dist/http-status-codes/4xx/index.js +63 -0
- package/dist/http-status-codes/4xx/index.js.map +1 -0
- package/dist/http-status-codes/5xx/index.d.ts +29 -0
- package/dist/http-status-codes/5xx/index.d.ts.map +1 -0
- package/dist/http-status-codes/5xx/index.js +29 -0
- package/dist/http-status-codes/5xx/index.js.map +1 -0
- package/dist/http-status-codes/5xx/server-error.phrases.d.ts +4 -0
- package/dist/http-status-codes/5xx/server-error.phrases.d.ts.map +1 -0
- package/dist/http-status-codes/5xx/server-error.phrases.js +17 -0
- package/dist/http-status-codes/5xx/server-error.phrases.js.map +1 -0
- package/dist/http-status-codes/5xx/server-error.status-codes.d.ts +4 -0
- package/dist/http-status-codes/5xx/server-error.status-codes.d.ts.map +1 -0
- package/dist/http-status-codes/5xx/server-error.status-codes.js +7 -0
- package/dist/http-status-codes/5xx/server-error.status-codes.js.map +1 -0
- package/dist/http-status-codes/http-status-code-ranges.d.ts +11 -0
- package/dist/http-status-codes/http-status-code-ranges.d.ts.map +1 -0
- package/dist/http-status-codes/http-status-code-ranges.js +19 -0
- package/dist/http-status-codes/http-status-code-ranges.js.map +1 -0
- package/dist/http-status-codes/http-status-code.d.ts +8 -0
- package/dist/http-status-codes/http-status-code.d.ts.map +1 -0
- package/dist/http-status-codes/http-status-code.js +13 -0
- package/dist/http-status-codes/http-status-code.js.map +1 -0
- package/dist/http-status-codes/http-status-phrase.d.ts +8 -0
- package/dist/http-status-codes/http-status-phrase.d.ts.map +1 -0
- package/dist/http-status-codes/http-status-phrase.js +13 -0
- package/dist/http-status-codes/http-status-phrase.js.map +1 -0
- package/dist/http-status-codes/index.d.ts +10 -0
- package/dist/http-status-codes/index.d.ts.map +1 -0
- package/dist/http-status-codes/index.js +10 -0
- package/dist/http-status-codes/index.js.map +1 -0
- package/dist/http-status-codes/phrase-to-status-code.d.ts +62 -0
- package/dist/http-status-codes/phrase-to-status-code.d.ts.map +1 -0
- package/dist/http-status-codes/phrase-to-status-code.js +13 -0
- package/dist/http-status-codes/phrase-to-status-code.js.map +1 -0
- package/dist/http-status-codes/status-code-to-phrase.d.ts +62 -0
- package/dist/http-status-codes/status-code-to-phrase.d.ts.map +1 -0
- package/dist/http-status-codes/status-code-to-phrase.js +13 -0
- package/dist/http-status-codes/status-code-to-phrase.js.map +1 -0
- package/dist/http-status-codes/validate.d.ts +5 -0
- package/dist/http-status-codes/validate.d.ts.map +1 -0
- package/dist/http-status-codes/validate.js +28 -0
- package/dist/http-status-codes/validate.js.map +1 -0
- package/dist/http-testing/http-test/create-hook-runner.d.ts +21 -0
- package/dist/http-testing/http-test/create-hook-runner.d.ts.map +1 -0
- package/dist/http-testing/http-test/create-hook-runner.js +17 -0
- package/dist/http-testing/http-test/create-hook-runner.js.map +1 -0
- package/dist/http-testing/http-test/create-http-test-context.d.ts +3 -0
- package/dist/http-testing/http-test/create-http-test-context.d.ts.map +1 -0
- package/dist/http-testing/http-test/create-http-test-context.js +24 -0
- package/dist/http-testing/http-test/create-http-test-context.js.map +1 -0
- package/dist/http-testing/http-test/http-test-case-result.d.ts +46 -0
- package/dist/http-testing/http-test/http-test-case-result.d.ts.map +1 -0
- package/dist/http-testing/http-test/http-test-case-result.js +2 -0
- package/dist/http-testing/http-test/http-test-case-result.js.map +1 -0
- package/dist/http-testing/http-test/http-test-case.d.ts +36 -0
- package/dist/http-testing/http-test/http-test-case.d.ts.map +1 -0
- package/dist/http-testing/http-test/http-test-case.js +2 -0
- package/dist/http-testing/http-test/http-test-case.js.map +1 -0
- package/dist/http-testing/http-test/http-test-context.d.ts +20 -0
- package/dist/http-testing/http-test/http-test-context.d.ts.map +1 -0
- package/dist/http-testing/http-test/http-test-context.js +2 -0
- package/dist/http-testing/http-test/http-test-context.js.map +1 -0
- package/dist/http-testing/http-test/http-test-hooks.d.ts +26 -0
- package/dist/http-testing/http-test/http-test-hooks.d.ts.map +1 -0
- package/dist/http-testing/http-test/http-test-hooks.js +2 -0
- package/dist/http-testing/http-test/http-test-hooks.js.map +1 -0
- package/dist/http-testing/http-test/http-test-pipeline.d.ts +10 -0
- package/dist/http-testing/http-test/http-test-pipeline.d.ts.map +1 -0
- package/dist/http-testing/http-test/http-test-pipeline.js +2 -0
- package/dist/http-testing/http-test/http-test-pipeline.js.map +1 -0
- package/dist/http-testing/http-test/http-test.d.ts +11 -0
- package/dist/http-testing/http-test/http-test.d.ts.map +1 -0
- package/dist/http-testing/http-test/http-test.js +35 -0
- package/dist/http-testing/http-test/http-test.js.map +1 -0
- package/dist/http-testing/http-test/index.d.ts +10 -0
- package/dist/http-testing/http-test/index.d.ts.map +1 -0
- package/dist/http-testing/http-test/index.js +10 -0
- package/dist/http-testing/http-test/index.js.map +1 -0
- package/dist/http-testing/http-test/utils.d.ts +11 -0
- package/dist/http-testing/http-test/utils.d.ts.map +1 -0
- package/dist/http-testing/http-test/utils.js +16 -0
- package/dist/http-testing/http-test/utils.js.map +1 -0
- package/dist/http-testing/index.d.ts +7 -0
- package/dist/http-testing/index.d.ts.map +1 -0
- package/dist/http-testing/index.js +7 -0
- package/dist/http-testing/index.js.map +1 -0
- package/dist/http-testing/operators/expect-for-transaction.operator.d.ts +5 -0
- package/dist/http-testing/operators/expect-for-transaction.operator.d.ts.map +1 -0
- package/dist/http-testing/operators/expect-for-transaction.operator.js +39 -0
- package/dist/http-testing/operators/expect-for-transaction.operator.js.map +1 -0
- package/dist/http-testing/operators/expect-headers.operator.d.ts +4 -0
- package/dist/http-testing/operators/expect-headers.operator.d.ts.map +1 -0
- package/dist/http-testing/operators/expect-headers.operator.js +37 -0
- package/dist/http-testing/operators/expect-headers.operator.js.map +1 -0
- package/dist/http-testing/operators/expect-status-code.operator.d.ts +5 -0
- package/dist/http-testing/operators/expect-status-code.operator.d.ts.map +1 -0
- package/dist/http-testing/operators/expect-status-code.operator.js +55 -0
- package/dist/http-testing/operators/expect-status-code.operator.js.map +1 -0
- package/dist/http-testing/operators/expect.operator.d.ts +4 -0
- package/dist/http-testing/operators/expect.operator.d.ts.map +1 -0
- package/dist/http-testing/operators/expect.operator.js +31 -0
- package/dist/http-testing/operators/expect.operator.js.map +1 -0
- package/dist/http-testing/operators/fail.operator.d.ts +4 -0
- package/dist/http-testing/operators/fail.operator.d.ts.map +1 -0
- package/dist/http-testing/operators/fail.operator.js +8 -0
- package/dist/http-testing/operators/fail.operator.js.map +1 -0
- package/dist/http-testing/operators/filter-http-transactions.operator.d.ts +10 -0
- package/dist/http-testing/operators/filter-http-transactions.operator.d.ts.map +1 -0
- package/dist/http-testing/operators/filter-http-transactions.operator.js +18 -0
- package/dist/http-testing/operators/filter-http-transactions.operator.js.map +1 -0
- package/dist/http-testing/operators/generate-requests.operator.d.ts +10 -0
- package/dist/http-testing/operators/generate-requests.operator.d.ts.map +1 -0
- package/dist/http-testing/operators/generate-requests.operator.js +44 -0
- package/dist/http-testing/operators/generate-requests.operator.js.map +1 -0
- package/dist/http-testing/operators/index.d.ts +21 -0
- package/dist/http-testing/operators/index.d.ts.map +1 -0
- package/dist/http-testing/operators/index.js +21 -0
- package/dist/http-testing/operators/index.js.map +1 -0
- package/dist/http-testing/operators/map-to-grouped-test-case.operator.d.ts +7 -0
- package/dist/http-testing/operators/map-to-grouped-test-case.operator.d.ts.map +1 -0
- package/dist/http-testing/operators/map-to-grouped-test-case.operator.js +32 -0
- package/dist/http-testing/operators/map-to-grouped-test-case.operator.js.map +1 -0
- package/dist/http-testing/operators/map-to-test-case.operator.d.ts +7 -0
- package/dist/http-testing/operators/map-to-test-case.operator.d.ts.map +1 -0
- package/dist/http-testing/operators/map-to-test-case.operator.js +21 -0
- package/dist/http-testing/operators/map-to-test-case.operator.js.map +1 -0
- package/dist/http-testing/operators/override-headers.operator.d.ts +5 -0
- package/dist/http-testing/operators/override-headers.operator.d.ts.map +1 -0
- package/dist/http-testing/operators/override-headers.operator.js +18 -0
- package/dist/http-testing/operators/override-headers.operator.js.map +1 -0
- package/dist/http-testing/operators/override-with-previous.operator.d.ts +5 -0
- package/dist/http-testing/operators/override-with-previous.operator.d.ts.map +1 -0
- package/dist/http-testing/operators/override-with-previous.operator.js +23 -0
- package/dist/http-testing/operators/override-with-previous.operator.js.map +1 -0
- package/dist/http-testing/operators/replay-previous-step.operator.d.ts +5 -0
- package/dist/http-testing/operators/replay-previous-step.operator.d.ts.map +1 -0
- package/dist/http-testing/operators/replay-previous-step.operator.js +27 -0
- package/dist/http-testing/operators/replay-previous-step.operator.js.map +1 -0
- package/dist/http-testing/operators/reply-previous-but-expect-response.operator.d.ts +7 -0
- package/dist/http-testing/operators/reply-previous-but-expect-response.operator.d.ts.map +1 -0
- package/dist/http-testing/operators/reply-previous-but-expect-response.operator.js +61 -0
- package/dist/http-testing/operators/reply-previous-but-expect-response.operator.js.map +1 -0
- package/dist/http-testing/operators/requires-authorization.operator.d.ts +5 -0
- package/dist/http-testing/operators/requires-authorization.operator.d.ts.map +1 -0
- package/dist/http-testing/operators/requires-authorization.operator.js +9 -0
- package/dist/http-testing/operators/requires-authorization.operator.js.map +1 -0
- package/dist/http-testing/operators/run-requests.operator.d.ts +14 -0
- package/dist/http-testing/operators/run-requests.operator.d.ts.map +1 -0
- package/dist/http-testing/operators/run-requests.operator.js +139 -0
- package/dist/http-testing/operators/run-requests.operator.js.map +1 -0
- package/dist/http-testing/operators/single-step-for-transaction.operator.d.ts +5 -0
- package/dist/http-testing/operators/single-step-for-transaction.operator.d.ts.map +1 -0
- package/dist/http-testing/operators/single-step-for-transaction.operator.js +43 -0
- package/dist/http-testing/operators/single-step-for-transaction.operator.js.map +1 -0
- package/dist/http-testing/operators/skip.operator.d.ts +5 -0
- package/dist/http-testing/operators/skip.operator.d.ts.map +1 -0
- package/dist/http-testing/operators/skip.operator.js +11 -0
- package/dist/http-testing/operators/skip.operator.js.map +1 -0
- package/dist/http-testing/operators/step.operator.d.ts +5 -0
- package/dist/http-testing/operators/step.operator.d.ts.map +1 -0
- package/dist/http-testing/operators/step.operator.js +20 -0
- package/dist/http-testing/operators/step.operator.js.map +1 -0
- package/dist/http-testing/operators/utils.d.ts +10 -0
- package/dist/http-testing/operators/utils.d.ts.map +1 -0
- package/dist/http-testing/operators/utils.js +17 -0
- package/dist/http-testing/operators/utils.js.map +1 -0
- package/dist/http-testing/operators/validate-responses.operator.d.ts +4 -0
- package/dist/http-testing/operators/validate-responses.operator.d.ts.map +1 -0
- package/dist/http-testing/operators/validate-responses.operator.js +33 -0
- package/dist/http-testing/operators/validate-responses.operator.js.map +1 -0
- package/dist/http-testing/serialize-parameter.d.ts +6 -0
- package/dist/http-testing/serialize-parameter.d.ts.map +1 -0
- package/dist/http-testing/serialize-parameter.js +51 -0
- package/dist/http-testing/serialize-parameter.js.map +1 -0
- package/dist/http-testing/serialize-request.d.ts +7 -0
- package/dist/http-testing/serialize-request.d.ts.map +1 -0
- package/dist/http-testing/serialize-request.js +112 -0
- package/dist/http-testing/serialize-request.js.map +1 -0
- package/dist/http-testing/test-builder/builder-pipeline.d.ts +4 -0
- package/dist/http-testing/test-builder/builder-pipeline.d.ts.map +1 -0
- package/dist/http-testing/test-builder/builder-pipeline.js +2 -0
- package/dist/http-testing/test-builder/builder-pipeline.js.map +1 -0
- package/dist/http-testing/test-builder/compilers/http-filter-to-transaction-filter.d.ts +9 -0
- package/dist/http-testing/test-builder/compilers/http-filter-to-transaction-filter.d.ts.map +1 -0
- package/dist/http-testing/test-builder/compilers/http-filter-to-transaction-filter.js +114 -0
- package/dist/http-testing/test-builder/compilers/http-filter-to-transaction-filter.js.map +1 -0
- package/dist/http-testing/test-builder/compilers/response-scoped-to-response-checker.d.ts +4 -0
- package/dist/http-testing/test-builder/compilers/response-scoped-to-response-checker.d.ts.map +1 -0
- package/dist/http-testing/test-builder/compilers/response-scoped-to-response-checker.js +36 -0
- package/dist/http-testing/test-builder/compilers/response-scoped-to-response-checker.js.map +1 -0
- package/dist/http-testing/test-builder/compilers/response-scoped-to-transaction-validator.d.ts +4 -0
- package/dist/http-testing/test-builder/compilers/response-scoped-to-transaction-validator.d.ts.map +1 -0
- package/dist/http-testing/test-builder/compilers/response-scoped-to-transaction-validator.js +65 -0
- package/dist/http-testing/test-builder/compilers/response-scoped-to-transaction-validator.js.map +1 -0
- package/dist/http-testing/test-builder/extract-value-from-response.d.ts +4 -0
- package/dist/http-testing/test-builder/extract-value-from-response.d.ts.map +1 -0
- package/dist/http-testing/test-builder/extract-value-from-response.js +16 -0
- package/dist/http-testing/test-builder/extract-value-from-response.js.map +1 -0
- package/dist/http-testing/test-builder/override-request-template.d.ts +4 -0
- package/dist/http-testing/test-builder/override-request-template.d.ts.map +1 -0
- package/dist/http-testing/test-builder/override-request-template.js +33 -0
- package/dist/http-testing/test-builder/override-request-template.js.map +1 -0
- package/dist/http-testing/test-builder/reply-step-builder.d.ts +10 -0
- package/dist/http-testing/test-builder/reply-step-builder.d.ts.map +1 -0
- package/dist/http-testing/test-builder/reply-step-builder.js +39 -0
- package/dist/http-testing/test-builder/reply-step-builder.js.map +1 -0
- package/dist/http-testing/test-builder/single-step-test-builder.d.ts +42 -0
- package/dist/http-testing/test-builder/single-step-test-builder.d.ts.map +1 -0
- package/dist/http-testing/test-builder/single-step-test-builder.js +112 -0
- package/dist/http-testing/test-builder/single-step-test-builder.js.map +1 -0
- package/dist/http-testing/validate/ajv.d.ts +3 -0
- package/dist/http-testing/validate/ajv.d.ts.map +1 -0
- package/dist/http-testing/validate/ajv.js +7 -0
- package/dist/http-testing/validate/ajv.js.map +1 -0
- package/dist/http-testing/validate/index.d.ts +9 -0
- package/dist/http-testing/validate/index.d.ts.map +1 -0
- package/dist/http-testing/validate/index.js +9 -0
- package/dist/http-testing/validate/index.js.map +1 -0
- package/dist/http-testing/validate/validate-body.d.ts +5 -0
- package/dist/http-testing/validate/validate-body.d.ts.map +1 -0
- package/dist/http-testing/validate/validate-body.js +62 -0
- package/dist/http-testing/validate/validate-body.js.map +1 -0
- package/dist/http-testing/validate/validate-headers.d.ts +8 -0
- package/dist/http-testing/validate/validate-headers.d.ts.map +1 -0
- package/dist/http-testing/validate/validate-headers.js +101 -0
- package/dist/http-testing/validate/validate-headers.js.map +1 -0
- package/dist/http-testing/validate/validate-request-body.d.ts +5 -0
- package/dist/http-testing/validate/validate-request-body.d.ts.map +1 -0
- package/dist/http-testing/validate/validate-request-body.js +71 -0
- package/dist/http-testing/validate/validate-request-body.js.map +1 -0
- package/dist/http-testing/validate/validate-request-headers.d.ts +8 -0
- package/dist/http-testing/validate/validate-request-headers.d.ts.map +1 -0
- package/dist/http-testing/validate/validate-request-headers.js +93 -0
- package/dist/http-testing/validate/validate-request-headers.js.map +1 -0
- package/dist/http-testing/validate/validate-request-path-parameters.d.ts +6 -0
- package/dist/http-testing/validate/validate-request-path-parameters.d.ts.map +1 -0
- package/dist/http-testing/validate/validate-request-path-parameters.js +69 -0
- package/dist/http-testing/validate/validate-request-path-parameters.js.map +1 -0
- package/dist/http-testing/validate/validate-request-query-parameters.d.ts +7 -0
- package/dist/http-testing/validate/validate-request-query-parameters.d.ts.map +1 -0
- package/dist/http-testing/validate/validate-request-query-parameters.js +91 -0
- package/dist/http-testing/validate/validate-request-query-parameters.js.map +1 -0
- package/dist/http-testing/validate/validate-response.d.ts +7 -0
- package/dist/http-testing/validate/validate-response.d.ts.map +1 -0
- package/dist/http-testing/validate/validate-response.js +15 -0
- package/dist/http-testing/validate/validate-response.js.map +1 -0
- package/dist/http-testing/validate/validate-status-code.d.ts +3 -0
- package/dist/http-testing/validate/validate-status-code.d.ts.map +1 -0
- package/dist/http-testing/validate/validate-status-code.js +25 -0
- package/dist/http-testing/validate/validate-status-code.js.map +1 -0
- package/dist/http.d.ts +29 -0
- package/dist/http.d.ts.map +1 -0
- package/dist/http.js +2 -0
- package/dist/http.js.map +1 -0
- package/dist/index.d.ts +25 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +25 -0
- package/dist/index.js.map +1 -0
- package/dist/logger/log-level.d.ts +5 -0
- package/dist/logger/log-level.d.ts.map +1 -0
- package/dist/logger/log-level.js +24 -0
- package/dist/logger/log-level.js.map +1 -0
- package/dist/logger/logger.d.ts +13 -0
- package/dist/logger/logger.d.ts.map +1 -0
- package/dist/logger/logger.js +2 -0
- package/dist/logger/logger.js.map +1 -0
- package/dist/logger/noop.logger.d.ts +15 -0
- package/dist/logger/noop.logger.d.ts.map +1 -0
- package/dist/logger/noop.logger.js +18 -0
- package/dist/logger/noop.logger.js.map +1 -0
- package/dist/logger/text.logger.d.ts +16 -0
- package/dist/logger/text.logger.d.ts.map +1 -0
- package/dist/logger/text.logger.js +51 -0
- package/dist/logger/text.logger.js.map +1 -0
- package/dist/report-sorter.d.ts +16 -0
- package/dist/report-sorter.d.ts.map +1 -0
- package/dist/report-sorter.js +193 -0
- package/dist/report-sorter.js.map +1 -0
- package/dist/rules/ajv-validate.d.ts +2 -0
- package/dist/rules/ajv-validate.d.ts.map +1 -0
- package/dist/rules/ajv-validate.js +4 -0
- package/dist/rules/ajv-validate.js.map +1 -0
- package/dist/rules/captured-trace-to-string.d.ts +3 -0
- package/dist/rules/captured-trace-to-string.d.ts.map +1 -0
- package/dist/rules/captured-trace-to-string.js +27 -0
- package/dist/rules/captured-trace-to-string.js.map +1 -0
- package/dist/rules/common-http-converters.d.ts +8 -0
- package/dist/rules/common-http-converters.d.ts.map +1 -0
- package/dist/rules/common-http-converters.js +58 -0
- package/dist/rules/common-http-converters.js.map +1 -0
- package/dist/rules/contexts.d.ts +63 -0
- package/dist/rules/contexts.d.ts.map +1 -0
- package/dist/rules/contexts.js +2 -0
- package/dist/rules/contexts.js.map +1 -0
- package/dist/rules/index.d.ts +16 -0
- package/dist/rules/index.d.ts.map +1 -0
- package/dist/rules/index.js +16 -0
- package/dist/rules/index.js.map +1 -0
- package/dist/rules/rule-builder.d.ts +34 -0
- package/dist/rules/rule-builder.d.ts.map +1 -0
- package/dist/rules/rule-builder.js +112 -0
- package/dist/rules/rule-builder.js.map +1 -0
- package/dist/rules/rule-configuration.d.ts +10 -0
- package/dist/rules/rule-configuration.d.ts.map +1 -0
- package/dist/rules/rule-configuration.js +2 -0
- package/dist/rules/rule-configuration.js.map +1 -0
- package/dist/rules/rule-filter.d.ts +9 -0
- package/dist/rules/rule-filter.d.ts.map +1 -0
- package/dist/rules/rule-filter.js +12 -0
- package/dist/rules/rule-filter.js.map +1 -0
- package/dist/rules/rule-fn.d.ts +7 -0
- package/dist/rules/rule-fn.d.ts.map +1 -0
- package/dist/rules/rule-fn.js +2 -0
- package/dist/rules/rule-fn.js.map +1 -0
- package/dist/rules/rule-loader.d.ts +8 -0
- package/dist/rules/rule-loader.d.ts.map +1 -0
- package/dist/rules/rule-loader.js +124 -0
- package/dist/rules/rule-loader.js.map +1 -0
- package/dist/rules/rule-meta.d.ts +20 -0
- package/dist/rules/rule-meta.d.ts.map +1 -0
- package/dist/rules/rule-meta.js +18 -0
- package/dist/rules/rule-meta.js.map +1 -0
- package/dist/rules/rule-runner.d.ts +30 -0
- package/dist/rules/rule-runner.d.ts.map +1 -0
- package/dist/rules/rule-runner.js +129 -0
- package/dist/rules/rule-runner.js.map +1 -0
- package/dist/rules/rule-set.d.ts +9 -0
- package/dist/rules/rule-set.d.ts.map +1 -0
- package/dist/rules/rule-set.js +2 -0
- package/dist/rules/rule-set.js.map +1 -0
- package/dist/rules/rule-severity.d.ts +10 -0
- package/dist/rules/rule-severity.d.ts.map +1 -0
- package/dist/rules/rule-severity.js +12 -0
- package/dist/rules/rule-severity.js.map +1 -0
- package/dist/rules/rule-violation.d.ts +22 -0
- package/dist/rules/rule-violation.d.ts.map +1 -0
- package/dist/rules/rule-violation.js +2 -0
- package/dist/rules/rule-violation.js.map +1 -0
- package/dist/rules/rule.d.ts +10 -0
- package/dist/rules/rule.d.ts.map +1 -0
- package/dist/rules/rule.js +2 -0
- package/dist/rules/rule.js.map +1 -0
- package/dist/rules/traffic.d.ts +25 -0
- package/dist/rules/traffic.d.ts.map +1 -0
- package/dist/rules/traffic.js +2 -0
- package/dist/rules/traffic.js.map +1 -0
- package/dist/thymian-plugin.d.ts +38 -0
- package/dist/thymian-plugin.d.ts.map +1 -0
- package/dist/thymian-plugin.js +24 -0
- package/dist/thymian-plugin.js.map +1 -0
- package/dist/thymian.d.ts +85 -0
- package/dist/thymian.d.ts.map +1 -0
- package/dist/thymian.error.d.ts +26 -0
- package/dist/thymian.error.d.ts.map +1 -0
- package/dist/thymian.error.js +34 -0
- package/dist/thymian.error.js.map +1 -0
- package/dist/thymian.js +322 -0
- package/dist/thymian.js.map +1 -0
- package/dist/utils.d.ts +40 -0
- package/dist/utils.d.ts.map +1 -0
- package/dist/utils.js +139 -0
- package/dist/utils.js.map +1 -0
- package/package.json +64 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type OperatorFunction } from 'rxjs';
|
|
2
|
+
import { type ThymianHttpTransaction } from '../../index.js';
|
|
3
|
+
import type { HttpTestCase, SingleHttpTestCaseStep } from '../http-test/http-test-case.js';
|
|
4
|
+
import type { HttpTestContextLocals } from '../http-test/http-test-context.js';
|
|
5
|
+
import type { PipelineItem } from '../http-test/http-test-pipeline.js';
|
|
6
|
+
export declare function mapToTestCase<Locals extends HttpTestContextLocals>(): OperatorFunction<PipelineItem<ThymianHttpTransaction, Locals>, PipelineItem<HttpTestCase<[SingleHttpTestCaseStep]>, Locals>>;
|
|
7
|
+
//# sourceMappingURL=map-to-test-case.operator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"map-to-test-case.operator.d.ts","sourceRoot":"","sources":["../../../src/http-testing/operators/map-to-test-case.operator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,gBAAgB,EAAE,MAAM,MAAM,CAAC;AAElD,OAAO,EACL,KAAK,sBAAsB,EAE5B,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EACV,YAAY,EACZ,sBAAsB,EACvB,MAAM,gCAAgC,CAAC;AACxC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAC/E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAEvE,wBAAgB,aAAa,CAC3B,MAAM,SAAS,qBAAqB,KACjC,gBAAgB,CACnB,YAAY,CAAC,sBAAsB,EAAE,MAAM,CAAC,EAC5C,YAAY,CAAC,YAAY,CAAC,CAAC,sBAAsB,CAAC,CAAC,EAAE,MAAM,CAAC,CAC7D,CAoBA"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { map } from 'rxjs';
|
|
2
|
+
import { thymianHttpTransactionToString, } from '../../index.js';
|
|
3
|
+
export function mapToTestCase() {
|
|
4
|
+
return map(({ current, ctx }) => ({
|
|
5
|
+
ctx,
|
|
6
|
+
current: {
|
|
7
|
+
name: thymianHttpTransactionToString(current.thymianReq, current.thymianRes),
|
|
8
|
+
status: 'running',
|
|
9
|
+
start: performance.now(),
|
|
10
|
+
results: [],
|
|
11
|
+
steps: [
|
|
12
|
+
{
|
|
13
|
+
type: 'single',
|
|
14
|
+
source: current,
|
|
15
|
+
transactions: [],
|
|
16
|
+
},
|
|
17
|
+
],
|
|
18
|
+
},
|
|
19
|
+
}));
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=map-to-test-case.operator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"map-to-test-case.operator.js","sourceRoot":"","sources":["../../../src/http-testing/operators/map-to-test-case.operator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAyB,MAAM,MAAM,CAAC;AAElD,OAAO,EAEL,8BAA8B,GAC/B,MAAM,gBAAgB,CAAC;AAQxB,MAAM,UAAU,aAAa;IAM3B,OAAO,GAAG,CAAC,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC,CAAC;QAChC,GAAG;QACH,OAAO,EAAE;YACP,IAAI,EAAE,8BAA8B,CAClC,OAAO,CAAC,UAAU,EAClB,OAAO,CAAC,UAAU,CACnB;YACD,MAAM,EAAE,SAAS;YACjB,KAAK,EAAE,WAAW,CAAC,GAAG,EAAE;YACxB,OAAO,EAAE,EAAE;YACX,KAAK,EAAE;gBACL;oBACE,IAAI,EAAE,QAAQ;oBACd,MAAM,EAAE,OAAO;oBACf,YAAY,EAAE,EAAE;iBACjB;aACF;SACF;KACF,CAAC,CAAC,CAAC;AACN,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type MonoTypeOperatorFunction } from 'rxjs';
|
|
2
|
+
import type { HttpTestCase, HttpTestCaseStep } from '../http-test/http-test-case.js';
|
|
3
|
+
import type { PipelineItem } from '../http-test/http-test-pipeline.js';
|
|
4
|
+
export declare function overrideHeaders<Steps extends HttpTestCaseStep[]>(fn: (headers: Record<string, unknown>, testCase: HttpTestCase<Steps>) => Record<string, unknown>): MonoTypeOperatorFunction<PipelineItem<HttpTestCase<Steps>>>;
|
|
5
|
+
//# sourceMappingURL=override-headers.operator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"override-headers.operator.d.ts","sourceRoot":"","sources":["../../../src/http-testing/operators/override-headers.operator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,wBAAwB,EAAE,MAAM,MAAM,CAAC;AAE1D,OAAO,KAAK,EACV,YAAY,EACZ,gBAAgB,EACjB,MAAM,gCAAgC,CAAC;AACxC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAGvE,wBAAgB,eAAe,CAAC,KAAK,SAAS,gBAAgB,EAAE,EAC9D,EAAE,EAAE,CACF,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAChC,QAAQ,EAAE,YAAY,CAAC,KAAK,CAAC,KAC1B,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC3B,wBAAwB,CAAC,YAAY,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,CAqB7D"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { map } from 'rxjs';
|
|
2
|
+
import { isFailedTestCase, isSkippedTestCase } from '../http-test/index.js';
|
|
3
|
+
export function overrideHeaders(fn) {
|
|
4
|
+
return map(({ current, ctx }) => {
|
|
5
|
+
if (isSkippedTestCase(current) || isFailedTestCase(current)) {
|
|
6
|
+
return { current, ctx };
|
|
7
|
+
}
|
|
8
|
+
const currentStep = current.steps.at(-1);
|
|
9
|
+
if (typeof currentStep === 'undefined') {
|
|
10
|
+
throw new Error('Current http test case step must be defined.');
|
|
11
|
+
}
|
|
12
|
+
for (const transaction of currentStep.transactions) {
|
|
13
|
+
transaction.requestTemplate.headers = fn(transaction.requestTemplate.headers, current);
|
|
14
|
+
}
|
|
15
|
+
return { current, ctx };
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=override-headers.operator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"override-headers.operator.js","sourceRoot":"","sources":["../../../src/http-testing/operators/override-headers.operator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAiC,MAAM,MAAM,CAAC;AAO1D,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE5E,MAAM,UAAU,eAAe,CAC7B,EAG4B;IAE5B,OAAO,GAAG,CAAC,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,EAAE,EAAE;QAC9B,IAAI,iBAAiB,CAAC,OAAO,CAAC,IAAI,gBAAgB,CAAC,OAAO,CAAC,EAAE,CAAC;YAC5D,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC;QAC1B,CAAC;QAED,MAAM,WAAW,GAAG,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;QAEzC,IAAI,OAAO,WAAW,KAAK,WAAW,EAAE,CAAC;YACvC,MAAM,IAAI,KAAK,CAAC,8CAA8C,CAAC,CAAC;QAClE,CAAC;QAED,KAAK,MAAM,WAAW,IAAI,WAAW,CAAC,YAAY,EAAE,CAAC;YACnD,WAAW,CAAC,eAAe,CAAC,OAAO,GAAG,EAAE,CACtC,WAAW,CAAC,eAAe,CAAC,OAAO,EACnC,OAAO,CACR,CAAC;QACJ,CAAC;QAED,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC;IAC1B,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type MonoTypeOperatorFunction } from 'rxjs';
|
|
2
|
+
import type { HttpRequestTemplate } from '../../index.js';
|
|
3
|
+
import { type HttpTestCase, type HttpTestCaseStep, type PipelineItem } from '../http-test/index.js';
|
|
4
|
+
export declare function overrideRequestWithPrevious<Steps extends HttpTestCaseStep[], Previous extends HttpTestCaseStep, Current extends HttpTestCaseStep>(fn: (requestTemplate: HttpRequestTemplate, previous: Previous) => HttpRequestTemplate): MonoTypeOperatorFunction<PipelineItem<HttpTestCase<[...Steps, Previous, Current]>>>;
|
|
5
|
+
//# sourceMappingURL=override-with-previous.operator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"override-with-previous.operator.d.ts","sourceRoot":"","sources":["../../../src/http-testing/operators/override-with-previous.operator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,wBAAwB,EAAE,MAAM,MAAM,CAAC;AAE1D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,gBAAgB,EAGrB,KAAK,YAAY,EAClB,MAAM,uBAAuB,CAAC;AAE/B,wBAAgB,2BAA2B,CACzC,KAAK,SAAS,gBAAgB,EAAE,EAChC,QAAQ,SAAS,gBAAgB,EACjC,OAAO,SAAS,gBAAgB,EAEhC,EAAE,EAAE,CACF,eAAe,EAAE,mBAAmB,EACpC,QAAQ,EAAE,QAAQ,KACf,mBAAmB,GACvB,wBAAwB,CACzB,YAAY,CAAC,YAAY,CAAC,CAAC,GAAG,KAAK,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC,CAAC,CAC1D,CAyBA"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { map } from 'rxjs';
|
|
2
|
+
import { isFailedTestCase, isSkippedTestCase, } from '../http-test/index.js';
|
|
3
|
+
export function overrideRequestWithPrevious(fn) {
|
|
4
|
+
return map(({ current, ctx }) => {
|
|
5
|
+
if (isSkippedTestCase(current) || isFailedTestCase(current)) {
|
|
6
|
+
return { current, ctx };
|
|
7
|
+
}
|
|
8
|
+
const previous = current.steps.at(-2);
|
|
9
|
+
if (typeof previous === 'undefined') {
|
|
10
|
+
throw new Error('Previous http test case step must be defined.');
|
|
11
|
+
}
|
|
12
|
+
const currentStep = current.steps.at(-1);
|
|
13
|
+
if (typeof currentStep === 'undefined') {
|
|
14
|
+
throw new Error('Current http test case step must be defined.');
|
|
15
|
+
}
|
|
16
|
+
currentStep.transactions = currentStep.transactions.map((transaction) => ({
|
|
17
|
+
...transaction,
|
|
18
|
+
requestTemplate: fn(transaction.requestTemplate, previous),
|
|
19
|
+
}));
|
|
20
|
+
return { current, ctx };
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=override-with-previous.operator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"override-with-previous.operator.js","sourceRoot":"","sources":["../../../src/http-testing/operators/override-with-previous.operator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAiC,MAAM,MAAM,CAAC;AAG1D,OAAO,EAGL,gBAAgB,EAChB,iBAAiB,GAElB,MAAM,uBAAuB,CAAC;AAE/B,MAAM,UAAU,2BAA2B,CAKzC,EAGwB;IAIxB,OAAO,GAAG,CAAC,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,EAAE,EAAE;QAC9B,IAAI,iBAAiB,CAAC,OAAO,CAAC,IAAI,gBAAgB,CAAC,OAAO,CAAC,EAAE,CAAC;YAC5D,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC;QAC1B,CAAC;QAED,MAAM,QAAQ,GAAG,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,CAAyB,CAAC;QAE9D,IAAI,OAAO,QAAQ,KAAK,WAAW,EAAE,CAAC;YACpC,MAAM,IAAI,KAAK,CAAC,+CAA+C,CAAC,CAAC;QACnE,CAAC;QAED,MAAM,WAAW,GAAG,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,CAAwB,CAAC;QAEhE,IAAI,OAAO,WAAW,KAAK,WAAW,EAAE,CAAC;YACvC,MAAM,IAAI,KAAK,CAAC,8CAA8C,CAAC,CAAC;QAClE,CAAC;QAED,WAAW,CAAC,YAAY,GAAG,WAAW,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;YACxE,GAAG,WAAW;YACd,eAAe,EAAE,EAAE,CAAC,WAAW,CAAC,eAAe,EAAE,QAAQ,CAAC;SAC3D,CAAC,CAAC,CAAC;QAEJ,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC;IAC1B,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type Observable, type OperatorFunction } from 'rxjs';
|
|
2
|
+
import type { HttpTestCase, HttpTestCaseStep } from '../http-test/http-test-case.js';
|
|
3
|
+
import type { PipelineItem } from '../http-test/http-test-pipeline.js';
|
|
4
|
+
export declare function replayStep<Steps extends HttpTestCaseStep[], CurrentStep extends HttpTestCaseStep>(fn: (step: Observable<PipelineItem<HttpTestCase<[...Steps, CurrentStep, CurrentStep]>>>) => Observable<PipelineItem<HttpTestCase<[...Steps, CurrentStep, CurrentStep]>>>): OperatorFunction<PipelineItem<HttpTestCase<[...Steps, CurrentStep]>>, PipelineItem<HttpTestCase<[...Steps, CurrentStep, CurrentStep]>>>;
|
|
5
|
+
//# sourceMappingURL=replay-previous-step.operator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"replay-previous-step.operator.d.ts","sourceRoot":"","sources":["../../../src/http-testing/operators/replay-previous-step.operator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,UAAU,EAAM,KAAK,gBAAgB,EAAE,MAAM,MAAM,CAAC;AAE5E,OAAO,KAAK,EACV,YAAY,EACZ,gBAAgB,EACjB,MAAM,gCAAgC,CAAC;AACxC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAGvE,wBAAgB,UAAU,CACxB,KAAK,SAAS,gBAAgB,EAAE,EAChC,WAAW,SAAS,gBAAgB,EAEpC,EAAE,EAAE,CACF,IAAI,EAAE,UAAU,CACd,YAAY,CAAC,YAAY,CAAC,CAAC,GAAG,KAAK,EAAE,WAAW,EAAE,WAAW,CAAC,CAAC,CAAC,CACjE,KACE,UAAU,CACb,YAAY,CAAC,YAAY,CAAC,CAAC,GAAG,KAAK,EAAE,WAAW,EAAE,WAAW,CAAC,CAAC,CAAC,CACjE,GACA,gBAAgB,CACjB,YAAY,CAAC,YAAY,CAAC,CAAC,GAAG,KAAK,EAAE,WAAW,CAAC,CAAC,CAAC,EACnD,YAAY,CAAC,YAAY,CAAC,CAAC,GAAG,KAAK,EAAE,WAAW,EAAE,WAAW,CAAC,CAAC,CAAC,CACjE,CAgCA"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { mergeMap, of } from 'rxjs';
|
|
2
|
+
import { isFailedTestCase, isSkippedTestCase } from '../http-test/index.js';
|
|
3
|
+
export function replayStep(fn) {
|
|
4
|
+
return mergeMap(({ ctx, current }) => {
|
|
5
|
+
if (isSkippedTestCase(current) || isFailedTestCase(current)) {
|
|
6
|
+
return of({ current, ctx });
|
|
7
|
+
}
|
|
8
|
+
const prevStep = current.steps.at(-1);
|
|
9
|
+
if (typeof prevStep === 'undefined') {
|
|
10
|
+
throw new Error('Previous step must be defined.');
|
|
11
|
+
}
|
|
12
|
+
const newStep = {
|
|
13
|
+
type: prevStep.type,
|
|
14
|
+
source: prevStep.source,
|
|
15
|
+
transactions: prevStep.transactions.map((transaction) => ({
|
|
16
|
+
requestTemplate: transaction.requestTemplate,
|
|
17
|
+
source: transaction.source,
|
|
18
|
+
})),
|
|
19
|
+
};
|
|
20
|
+
current.steps.push(newStep);
|
|
21
|
+
return fn(of({
|
|
22
|
+
ctx,
|
|
23
|
+
current: current,
|
|
24
|
+
}));
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=replay-previous-step.operator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"replay-previous-step.operator.js","sourceRoot":"","sources":["../../../src/http-testing/operators/replay-previous-step.operator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAmB,EAAE,EAAyB,MAAM,MAAM,CAAC;AAO5E,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE5E,MAAM,UAAU,UAAU,CAIxB,EAMC;IAKD,OAAO,QAAQ,CAAC,CAAC,EAAE,GAAG,EAAE,OAAO,EAAE,EAAE,EAAE;QACnC,IAAI,iBAAiB,CAAC,OAAO,CAAC,IAAI,gBAAgB,CAAC,OAAO,CAAC,EAAE,CAAC;YAC5D,OAAO,EAAE,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,CAEzB,CAAC;QACJ,CAAC;QAED,MAAM,QAAQ,GAAG,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;QAEtC,IAAI,OAAO,QAAQ,KAAK,WAAW,EAAE,CAAC;YACpC,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAC;QACpD,CAAC;QAED,MAAM,OAAO,GAAG;YACd,IAAI,EAAE,QAAQ,CAAC,IAAI;YACnB,MAAM,EAAE,QAAQ,CAAC,MAAM;YACvB,YAAY,EAAE,QAAQ,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;gBACxD,eAAe,EAAE,WAAW,CAAC,eAAe;gBAC5C,MAAM,EAAE,WAAW,CAAC,MAAM;aAC3B,CAAC,CAAC;SACW,CAAC;QAEjB,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAE5B,OAAO,EAAE,CACP,EAAE,CAAC;YACD,GAAG;YACH,OAAO,EAAE,OAA6D;SACvE,CAAC,CACH,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type Observable, type OperatorFunction } from 'rxjs';
|
|
2
|
+
import { type ThymianHttpResponse } from '../../index.js';
|
|
3
|
+
import type { StringAndNumberProperties } from '../../utils.js';
|
|
4
|
+
import { type HttpTestCase, type HttpTestCaseStep, type SingleHttpTestCaseStep } from '../http-test/http-test-case.js';
|
|
5
|
+
import type { PipelineItem } from '../http-test/http-test-pipeline.js';
|
|
6
|
+
export declare function replayStepButExpectResponse<Steps extends HttpTestCaseStep[]>(filter: StringAndNumberProperties<ThymianHttpResponse>, fn: (step: Observable<PipelineItem<HttpTestCase<[...Steps, SingleHttpTestCaseStep, SingleHttpTestCaseStep]>>>) => Observable<PipelineItem<HttpTestCase<[...Steps, SingleHttpTestCaseStep, SingleHttpTestCaseStep]>>>): OperatorFunction<PipelineItem<HttpTestCase<[...Steps, SingleHttpTestCaseStep]>>, PipelineItem<HttpTestCase<[...Steps, SingleHttpTestCaseStep, SingleHttpTestCaseStep]>>>;
|
|
7
|
+
//# sourceMappingURL=reply-previous-but-expect-response.operator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reply-previous-but-expect-response.operator.d.ts","sourceRoot":"","sources":["../../../src/http-testing/operators/reply-previous-but-expect-response.operator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,UAAU,EAAM,KAAK,gBAAgB,EAAE,MAAM,MAAM,CAAC;AAE5E,OAAO,EAAgB,KAAK,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AACxE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;AAChE,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,gBAAgB,EAErB,KAAK,sBAAsB,EAC5B,MAAM,gCAAgC,CAAC;AACxC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAOvE,wBAAgB,2BAA2B,CAAC,KAAK,SAAS,gBAAgB,EAAE,EAC1E,MAAM,EAAE,yBAAyB,CAAC,mBAAmB,CAAC,EACtD,EAAE,EAAE,CACF,IAAI,EAAE,UAAU,CACd,YAAY,CACV,YAAY,CAAC,CAAC,GAAG,KAAK,EAAE,sBAAsB,EAAE,sBAAsB,CAAC,CAAC,CACzE,CACF,KACE,UAAU,CACb,YAAY,CACV,YAAY,CAAC,CAAC,GAAG,KAAK,EAAE,sBAAsB,EAAE,sBAAsB,CAAC,CAAC,CACzE,CACF,GACA,gBAAgB,CACjB,YAAY,CAAC,YAAY,CAAC,CAAC,GAAG,KAAK,EAAE,sBAAsB,CAAC,CAAC,CAAC,EAC9D,YAAY,CACV,YAAY,CAAC,CAAC,GAAG,KAAK,EAAE,sBAAsB,EAAE,sBAAsB,CAAC,CAAC,CACzE,CACF,CA+EA"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { mergeMap, of } from 'rxjs';
|
|
2
|
+
import { matchObjects } from '../../index.js';
|
|
3
|
+
import {} from '../http-test/http-test-case.js';
|
|
4
|
+
import { isFailedTestCase, isSingleHttpTestCaseStep, isSkippedTestCase, } from '../http-test/index.js';
|
|
5
|
+
export function replayStepButExpectResponse(filter, fn) {
|
|
6
|
+
return mergeMap(({ ctx, current }) => {
|
|
7
|
+
if (isSkippedTestCase(current) || isFailedTestCase(current)) {
|
|
8
|
+
return of({
|
|
9
|
+
current: current,
|
|
10
|
+
ctx,
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
const prevStep = current.steps.at(-1);
|
|
14
|
+
if (typeof prevStep === 'undefined') {
|
|
15
|
+
throw new Error('Previous step must be defined.');
|
|
16
|
+
}
|
|
17
|
+
if (!isSingleHttpTestCaseStep(prevStep)) {
|
|
18
|
+
throw new Error('Previous step must be a single test step.');
|
|
19
|
+
}
|
|
20
|
+
const { thymianReq, thymianRes } = prevStep.source;
|
|
21
|
+
const transactions = ctx.format
|
|
22
|
+
.getThymianHttpTransactions()
|
|
23
|
+
.filter((transaction) => {
|
|
24
|
+
return (matchObjects(transaction.thymianReq, {
|
|
25
|
+
host: thymianReq.host,
|
|
26
|
+
port: thymianReq.port,
|
|
27
|
+
protocol: thymianReq.protocol,
|
|
28
|
+
path: thymianReq.path,
|
|
29
|
+
method: thymianReq.method,
|
|
30
|
+
bodyRequired: thymianReq.bodyRequired,
|
|
31
|
+
mediaType: thymianReq.mediaType,
|
|
32
|
+
}) &&
|
|
33
|
+
matchObjects(transaction.thymianRes, {
|
|
34
|
+
statusCode: thymianRes.statusCode,
|
|
35
|
+
mediaType: thymianRes.mediaType,
|
|
36
|
+
...(filter ?? {}),
|
|
37
|
+
}));
|
|
38
|
+
});
|
|
39
|
+
if (transactions.length !== 1) {
|
|
40
|
+
return of(ctx.skip(
|
|
41
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
42
|
+
// @ts-expect-error
|
|
43
|
+
current, `A single transaction must be referenced but ${transactions.length} were referenced.`));
|
|
44
|
+
}
|
|
45
|
+
const newStep = {
|
|
46
|
+
type: 'single',
|
|
47
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
48
|
+
source: transactions[0],
|
|
49
|
+
transactions: prevStep.transactions.map((transaction) => ({
|
|
50
|
+
requestTemplate: transaction.requestTemplate,
|
|
51
|
+
source: transactions[0],
|
|
52
|
+
})),
|
|
53
|
+
};
|
|
54
|
+
current.steps.push(newStep);
|
|
55
|
+
return fn(of({
|
|
56
|
+
ctx,
|
|
57
|
+
current: current,
|
|
58
|
+
}));
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
//# sourceMappingURL=reply-previous-but-expect-response.operator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reply-previous-but-expect-response.operator.js","sourceRoot":"","sources":["../../../src/http-testing/operators/reply-previous-but-expect-response.operator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAmB,EAAE,EAAyB,MAAM,MAAM,CAAC;AAE5E,OAAO,EAAE,YAAY,EAA4B,MAAM,gBAAgB,CAAC;AAExE,OAAO,EAKN,MAAM,gCAAgC,CAAC;AAExC,OAAO,EACL,gBAAgB,EAChB,wBAAwB,EACxB,iBAAiB,GAClB,MAAM,uBAAuB,CAAC;AAE/B,MAAM,UAAU,2BAA2B,CACzC,MAAsD,EACtD,EAUC;IAOD,OAAO,QAAQ,CAAC,CAAC,EAAE,GAAG,EAAE,OAAO,EAAE,EAAE,EAAE;QACnC,IAAI,iBAAiB,CAAC,OAAO,CAAC,IAAI,gBAAgB,CAAC,OAAO,CAAC,EAAE,CAAC;YAC5D,OAAO,EAAE,CAAC;gBACR,OAAO,EAAE,OAER;gBACD,GAAG;aACJ,CAAC,CAAC;QACL,CAAC;QAED,MAAM,QAAQ,GAAG,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;QAEtC,IAAI,OAAO,QAAQ,KAAK,WAAW,EAAE,CAAC;YACpC,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAC;QACpD,CAAC;QAED,IAAI,CAAC,wBAAwB,CAAC,QAAQ,CAAC,EAAE,CAAC;YACxC,MAAM,IAAI,KAAK,CAAC,2CAA2C,CAAC,CAAC;QAC/D,CAAC;QAED,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,GAAG,QAAQ,CAAC,MAAM,CAAC;QAEnD,MAAM,YAAY,GAAG,GAAG,CAAC,MAAM;aAC5B,0BAA0B,EAAE;aAC5B,MAAM,CAAC,CAAC,WAAW,EAAE,EAAE;YACtB,OAAO,CACL,YAAY,CAAC,WAAW,CAAC,UAAU,EAAE;gBACnC,IAAI,EAAE,UAAU,CAAC,IAAI;gBACrB,IAAI,EAAE,UAAU,CAAC,IAAI;gBACrB,QAAQ,EAAE,UAAU,CAAC,QAAQ;gBAC7B,IAAI,EAAE,UAAU,CAAC,IAAI;gBACrB,MAAM,EAAE,UAAU,CAAC,MAAM;gBACzB,YAAY,EAAE,UAAU,CAAC,YAAY;gBACrC,SAAS,EAAE,UAAU,CAAC,SAAS;aAChC,CAAC;gBACF,YAAY,CAAC,WAAW,CAAC,UAAU,EAAE;oBACnC,UAAU,EAAE,UAAU,CAAC,UAAU;oBACjC,SAAS,EAAE,UAAU,CAAC,SAAS;oBAC/B,GAAG,CAAC,MAAM,IAAI,EAAE,CAAC;iBAClB,CAAC,CACH,CAAC;QACJ,CAAC,CAAC,CAAC;QAEL,IAAI,YAAY,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC9B,OAAO,EAAE,CACP,GAAG,CAAC,IAAI;YACN,6DAA6D;YAC7D,mBAAmB;YACnB,OAAO,EACP,+CAA+C,YAAY,CAAC,MAAM,mBAAmB,CACtF,CACF,CAAC;QACJ,CAAC;QAED,MAAM,OAAO,GAA2B;YACtC,IAAI,EAAE,QAAQ;YACd,oEAAoE;YACpE,MAAM,EAAE,YAAY,CAAC,CAAC,CAAE;YACxB,YAAY,EAAE,QAAQ,CAAC,YAAY,CAAC,GAAG,CACrC,CAAC,WAAW,EAAE,EAAE,CACd,CAAC;gBACC,eAAe,EAAE,WAAW,CAAC,eAAe;gBAC5C,MAAM,EAAE,YAAY,CAAC,CAAC,CAAC;aACxB,CAAgC,CACpC;SACF,CAAC;QAEF,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAE5B,OAAO,EAAE,CACP,EAAE,CAAC;YACD,GAAG;YACH,OAAO,EAAE,OAER;SACF,CAAC,CACH,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type MonoTypeOperatorFunction } from 'rxjs';
|
|
2
|
+
import type { ThymianHttpTransaction } from '../../index.js';
|
|
3
|
+
import type { PipelineItem } from '../http-test/http-test-pipeline.js';
|
|
4
|
+
export declare function requiresAuthorization(requireAuthorization?: boolean): MonoTypeOperatorFunction<PipelineItem<ThymianHttpTransaction>>;
|
|
5
|
+
//# sourceMappingURL=requires-authorization.operator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"requires-authorization.operator.d.ts","sourceRoot":"","sources":["../../../src/http-testing/operators/requires-authorization.operator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,KAAK,wBAAwB,EAAE,MAAM,MAAM,CAAC;AAE7D,OAAO,KAAK,EAAE,sBAAsB,EAAe,MAAM,gBAAgB,CAAC;AAC1E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAEvE,wBAAgB,qBAAqB,CACnC,oBAAoB,UAAO,GAC1B,wBAAwB,CAAC,YAAY,CAAC,sBAAsB,CAAC,CAAC,CAWhE"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { filter } from 'rxjs';
|
|
2
|
+
export function requiresAuthorization(requireAuthorization = true) {
|
|
3
|
+
return filter(({ current, ctx }) => {
|
|
4
|
+
return (requireAuthorization ===
|
|
5
|
+
(typeof ctx.format.graph.findOutNeighbor(current.thymianReqId, (_id, node) => node.type === 'security-scheme') ===
|
|
6
|
+
'string'));
|
|
7
|
+
});
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=requires-authorization.operator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"requires-authorization.operator.js","sourceRoot":"","sources":["../../../src/http-testing/operators/requires-authorization.operator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAiC,MAAM,MAAM,CAAC;AAK7D,MAAM,UAAU,qBAAqB,CACnC,oBAAoB,GAAG,IAAI;IAE3B,OAAO,MAAM,CAAC,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,EAAE,EAAE;QACjC,OAAO,CACL,oBAAoB;YACpB,CAAC,OAAO,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,eAAe,CACtC,OAAO,CAAC,YAAY,EACpB,CAAC,GAAW,EAAE,IAAiB,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,iBAAiB,CACpE;gBACC,QAAQ,CAAC,CACZ,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type MonoTypeOperatorFunction } from 'rxjs';
|
|
2
|
+
import { type HttpTestCase, type HttpTestCaseStep, type HttpTestContextLocals, type PipelineItem } from '../http-test/index.js';
|
|
3
|
+
export type RunRequestsOptions = {
|
|
4
|
+
checkResponse: boolean;
|
|
5
|
+
checkStatusCode: boolean;
|
|
6
|
+
checkHeaders: boolean;
|
|
7
|
+
checkBody: boolean;
|
|
8
|
+
expectStatusCode?: number;
|
|
9
|
+
authorize: boolean;
|
|
10
|
+
/** Override the origin of all request templates. When set, every request is sent to this origin instead of the one defined in the specification. */
|
|
11
|
+
origin?: string;
|
|
12
|
+
};
|
|
13
|
+
export declare function runRequests<Steps extends HttpTestCaseStep[], Locals extends HttpTestContextLocals>(opts?: Partial<RunRequestsOptions>): MonoTypeOperatorFunction<PipelineItem<HttpTestCase<Steps>, Locals>>;
|
|
14
|
+
//# sourceMappingURL=run-requests.operator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"run-requests.operator.d.ts","sourceRoot":"","sources":["../../../src/http-testing/operators/run-requests.operator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,wBAAwB,EAAE,MAAM,MAAM,CAAC;AAG/D,OAAO,EACL,KAAK,YAAY,EAEjB,KAAK,gBAAgB,EACrB,KAAK,qBAAqB,EAG1B,KAAK,YAAY,EAClB,MAAM,uBAAuB,CAAC;AAQ/B,MAAM,MAAM,kBAAkB,GAAG;IAC/B,aAAa,EAAE,OAAO,CAAC;IACvB,eAAe,EAAE,OAAO,CAAC;IACzB,YAAY,EAAE,OAAO,CAAC;IACtB,SAAS,EAAE,OAAO,CAAC;IACnB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,SAAS,EAAE,OAAO,CAAC;IACnB,oJAAoJ;IACpJ,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,wBAAgB,WAAW,CACzB,KAAK,SAAS,gBAAgB,EAAE,EAChC,MAAM,SAAS,qBAAqB,EAEpC,IAAI,GAAE,OAAO,CAAC,kBAAkB,CAAM,GACrC,wBAAwB,CAAC,YAAY,CAAC,YAAY,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC,CAAC,CAmNrE"}
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import { mergeMap } from 'rxjs';
|
|
2
|
+
import { thymianHttpTransactionToString } from '../../index.js';
|
|
3
|
+
import { isFailedTestCase, isSkippedTestCase, } from '../http-test/index.js';
|
|
4
|
+
import { serializeRequest } from '../serialize-request.js';
|
|
5
|
+
import { validateBodyForResponse, validateHeaders, validateStatusCode, } from '../validate/index.js';
|
|
6
|
+
export function runRequests(opts = {}) {
|
|
7
|
+
return mergeMap(async ({ current, ctx }) => {
|
|
8
|
+
if (isSkippedTestCase(current) || isFailedTestCase(current)) {
|
|
9
|
+
return { current, ctx };
|
|
10
|
+
}
|
|
11
|
+
const options = {
|
|
12
|
+
checkResponse: false,
|
|
13
|
+
checkStatusCode: true,
|
|
14
|
+
checkBody: false,
|
|
15
|
+
checkHeaders: false,
|
|
16
|
+
authorize: true,
|
|
17
|
+
...opts,
|
|
18
|
+
};
|
|
19
|
+
const stepIdx = current.steps.length - 1;
|
|
20
|
+
const step = current.steps.at(stepIdx);
|
|
21
|
+
if (step) {
|
|
22
|
+
if (step.transactions.length === 0) {
|
|
23
|
+
ctx.logger.warn(`Test case ${current.name} does not contain any transactions to run requests for.`);
|
|
24
|
+
}
|
|
25
|
+
for (const transaction of step.transactions) {
|
|
26
|
+
if (options.origin) {
|
|
27
|
+
transaction.requestTemplate = {
|
|
28
|
+
...transaction.requestTemplate,
|
|
29
|
+
origin: options.origin,
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
const transactionName = transaction.source
|
|
33
|
+
? thymianHttpTransactionToString(transaction.source.thymianReq, transaction.source.thymianRes)
|
|
34
|
+
: transaction.requestTemplate.method.toUpperCase() +
|
|
35
|
+
' ' +
|
|
36
|
+
new URL(transaction.requestTemplate.path, transaction.requestTemplate.origin).toString();
|
|
37
|
+
ctx.logger.debug(`Running "beforeRequest" hook for transaction ${transactionName} in test case ${current.name}.`);
|
|
38
|
+
const beforeRequest = await ctx.runHook('beforeRequest', {
|
|
39
|
+
value: transaction.requestTemplate,
|
|
40
|
+
ctx: transaction.source,
|
|
41
|
+
});
|
|
42
|
+
current.results.push(...(beforeRequest.testResults ?? []));
|
|
43
|
+
if (beforeRequest.skip) {
|
|
44
|
+
ctx.logger.debug(`Skipping test case "${current.name}" after "beforeEach" hook.`);
|
|
45
|
+
return ctx.skip(current, beforeRequest.skip);
|
|
46
|
+
}
|
|
47
|
+
if (beforeRequest.fail) {
|
|
48
|
+
ctx.logger.debug(`Test case ${current.name} failed after "beforeEach" hook.`);
|
|
49
|
+
return ctx.fail(current, beforeRequest.fail);
|
|
50
|
+
}
|
|
51
|
+
transaction.requestTemplate =
|
|
52
|
+
beforeRequest.result ?? transaction.requestTemplate;
|
|
53
|
+
if (options.authorize && transaction.requestTemplate.authorize) {
|
|
54
|
+
ctx.logger.debug(`Running "authorize" hook for transaction ${transactionName} in test case ${current.name}.`);
|
|
55
|
+
transaction.requestTemplate =
|
|
56
|
+
(await ctx.runHook('authorize', {
|
|
57
|
+
value: transaction.requestTemplate,
|
|
58
|
+
ctx: transaction.source,
|
|
59
|
+
})).result ?? transaction.requestTemplate;
|
|
60
|
+
}
|
|
61
|
+
transaction.request = serializeRequest(transaction);
|
|
62
|
+
transaction.response = await ctx.runRequest(transaction.request);
|
|
63
|
+
const afterResponse = await ctx.runHook('afterResponse', {
|
|
64
|
+
value: transaction.response,
|
|
65
|
+
ctx: {
|
|
66
|
+
request: transaction.request,
|
|
67
|
+
requestTemplate: transaction.requestTemplate,
|
|
68
|
+
thymianTransaction: transaction.source,
|
|
69
|
+
},
|
|
70
|
+
});
|
|
71
|
+
current.results.push(...(afterResponse.testResults ?? []));
|
|
72
|
+
if (afterResponse.skip) {
|
|
73
|
+
ctx.logger.debug(`Skipping test case "${current.name}" after "afterEach" hook.`);
|
|
74
|
+
return ctx.skip(current, afterResponse.skip);
|
|
75
|
+
}
|
|
76
|
+
if (afterResponse.fail) {
|
|
77
|
+
ctx.logger.debug(`Skipping test case "${current.name}" after "afterEach" hook.`);
|
|
78
|
+
return ctx.fail(current, afterResponse.fail);
|
|
79
|
+
}
|
|
80
|
+
transaction.response = afterResponse.result ?? transaction.response;
|
|
81
|
+
if (typeof options.expectStatusCode !== 'undefined') {
|
|
82
|
+
if (transaction.response.statusCode !== options.expectStatusCode) {
|
|
83
|
+
const message = `Expected status code ${options.expectStatusCode}, but received ${transaction.response.statusCode}.`;
|
|
84
|
+
current.results.push({
|
|
85
|
+
type: 'invalid-transaction',
|
|
86
|
+
message,
|
|
87
|
+
transaction: transaction.source,
|
|
88
|
+
timestamp: Date.now(),
|
|
89
|
+
details: 'In most cases, this is because the http-testing module has failed to generate syntactic and/or semantic correct test data. You can either specify samples directly in your API description or provide valid samples via hooks.',
|
|
90
|
+
});
|
|
91
|
+
return ctx.skip(current, message);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
else if (transaction.source) {
|
|
95
|
+
const results = [];
|
|
96
|
+
if (options.checkStatusCode || options.checkResponse) {
|
|
97
|
+
const result = validateStatusCode(transaction.source.thymianRes.statusCode, transaction.response.statusCode, ctx.format
|
|
98
|
+
.getHttpResponsesOf(transaction.source.thymianReqId)
|
|
99
|
+
.map(([, { statusCode }]) => statusCode));
|
|
100
|
+
if (result.type === 'assertion-failure') {
|
|
101
|
+
current.results.push({
|
|
102
|
+
type: 'invalid-transaction',
|
|
103
|
+
message: result.message,
|
|
104
|
+
transaction: transaction.source,
|
|
105
|
+
timestamp: result.timestamp,
|
|
106
|
+
details: 'In most cases, this is because the http-testing module has failed to generate syntactic and/or semantic correct test data. You can either specify samples directly in your API description or provide valid samples via hooks.',
|
|
107
|
+
});
|
|
108
|
+
return ctx.skip(current, result.message);
|
|
109
|
+
}
|
|
110
|
+
results.push(result);
|
|
111
|
+
}
|
|
112
|
+
if (options.checkBody ||
|
|
113
|
+
(options.checkResponse &&
|
|
114
|
+
typeof transaction.response.body !== 'undefined')) {
|
|
115
|
+
results.push(...validateBodyForResponse(transaction.response.body, transaction.source.thymianRes));
|
|
116
|
+
}
|
|
117
|
+
if (options.checkHeaders || options.checkResponse) {
|
|
118
|
+
results.push(...validateHeaders(transaction.response.headers, transaction.source.thymianRes));
|
|
119
|
+
}
|
|
120
|
+
const valid = !results.some((r) => r.type === 'assertion-failure');
|
|
121
|
+
if (!valid) {
|
|
122
|
+
current.results.push(...results.map((r) => {
|
|
123
|
+
if (r.type === 'assertion-failure') {
|
|
124
|
+
r.transaction = transaction.source;
|
|
125
|
+
}
|
|
126
|
+
return r;
|
|
127
|
+
}));
|
|
128
|
+
return ctx.fail(current);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
else {
|
|
134
|
+
ctx.logger.warn(`Test case ${current.name} does not contain any steps to run requests for.`);
|
|
135
|
+
}
|
|
136
|
+
return { current, ctx };
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
//# sourceMappingURL=run-requests.operator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"run-requests.operator.js","sourceRoot":"","sources":["../../../src/http-testing/operators/run-requests.operator.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type Observable, type OperatorFunction } from 'rxjs';
|
|
2
|
+
import { ThymianFormat } from '../../index.js';
|
|
3
|
+
import { type HttpTestCase, type HttpTestCaseStep, type PipelineItem, type SingleHttpTestCaseStep } from '../http-test/index.js';
|
|
4
|
+
export declare function singleStepForTransaction<Steps extends HttpTestCaseStep[], CurrentStep extends HttpTestCaseStep>(findTransaction: (previous: CurrentStep, format: ThymianFormat) => string, fn: (step: Observable<PipelineItem<HttpTestCase<[...Steps, CurrentStep, SingleHttpTestCaseStep]>>>) => Observable<PipelineItem<HttpTestCase<[...Steps, CurrentStep, SingleHttpTestCaseStep]>>>): OperatorFunction<PipelineItem<HttpTestCase<[...Steps, CurrentStep]>>, PipelineItem<HttpTestCase<[...Steps, CurrentStep, SingleHttpTestCaseStep]>>>;
|
|
5
|
+
//# sourceMappingURL=single-step-for-transaction.operator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"single-step-for-transaction.operator.d.ts","sourceRoot":"","sources":["../../../src/http-testing/operators/single-step-for-transaction.operator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,UAAU,EAAM,KAAK,gBAAgB,EAAE,MAAM,MAAM,CAAC;AAE5E,OAAO,EAEL,aAAa,EAGd,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,gBAAgB,EAGrB,KAAK,YAAY,EACjB,KAAK,sBAAsB,EAC5B,MAAM,uBAAuB,CAAC;AAE/B,wBAAgB,wBAAwB,CACtC,KAAK,SAAS,gBAAgB,EAAE,EAChC,WAAW,SAAS,gBAAgB,EAEpC,eAAe,EAAE,CAAC,QAAQ,EAAE,WAAW,EAAE,MAAM,EAAE,aAAa,KAAK,MAAM,EACzE,EAAE,EAAE,CACF,IAAI,EAAE,UAAU,CACd,YAAY,CACV,YAAY,CAAC,CAAC,GAAG,KAAK,EAAE,WAAW,EAAE,sBAAsB,CAAC,CAAC,CAC9D,CACF,KACE,UAAU,CACb,YAAY,CAAC,YAAY,CAAC,CAAC,GAAG,KAAK,EAAE,WAAW,EAAE,sBAAsB,CAAC,CAAC,CAAC,CAC5E,GACA,gBAAgB,CACjB,YAAY,CAAC,YAAY,CAAC,CAAC,GAAG,KAAK,EAAE,WAAW,CAAC,CAAC,CAAC,EACnD,YAAY,CAAC,YAAY,CAAC,CAAC,GAAG,KAAK,EAAE,WAAW,EAAE,sBAAsB,CAAC,CAAC,CAAC,CAC5E,CAkEA"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { mergeMap, of } from 'rxjs';
|
|
2
|
+
import { ThymianFormat, } from '../../index.js';
|
|
3
|
+
import { isFailedTestCase, isSkippedTestCase, } from '../http-test/index.js';
|
|
4
|
+
export function singleStepForTransaction(findTransaction, fn) {
|
|
5
|
+
return mergeMap(({ ctx, current }) => {
|
|
6
|
+
if (isSkippedTestCase(current) || isFailedTestCase(current)) {
|
|
7
|
+
return of({
|
|
8
|
+
current: current,
|
|
9
|
+
ctx,
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
const prevStep = current.steps.at(-1);
|
|
13
|
+
if (typeof prevStep === 'undefined') {
|
|
14
|
+
return of(ctx.fail(current, 'Previous step must be defined.'));
|
|
15
|
+
}
|
|
16
|
+
const transactionId = findTransaction(prevStep, ctx.format);
|
|
17
|
+
const transaction = ctx.format.getEdge(transactionId);
|
|
18
|
+
const [thymianReqId, thymianResId] = ctx.format.graph.extremities(transactionId);
|
|
19
|
+
const thymianReq = ctx.format.getNode(thymianReqId);
|
|
20
|
+
const thymianRes = ctx.format.getNode(thymianResId);
|
|
21
|
+
if (!thymianReq || !thymianRes || !transaction) {
|
|
22
|
+
return of(ctx.fail(current, 'Invalid HTTP transaction ID.'));
|
|
23
|
+
}
|
|
24
|
+
const newStep = {
|
|
25
|
+
type: 'single',
|
|
26
|
+
source: {
|
|
27
|
+
thymianReq,
|
|
28
|
+
thymianReqId,
|
|
29
|
+
thymianRes,
|
|
30
|
+
thymianResId,
|
|
31
|
+
transactionId,
|
|
32
|
+
transaction,
|
|
33
|
+
},
|
|
34
|
+
transactions: [],
|
|
35
|
+
};
|
|
36
|
+
current.steps.push(newStep);
|
|
37
|
+
return fn(of({
|
|
38
|
+
ctx,
|
|
39
|
+
current: current,
|
|
40
|
+
}));
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=single-step-for-transaction.operator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"single-step-for-transaction.operator.js","sourceRoot":"","sources":["../../../src/http-testing/operators/single-step-for-transaction.operator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAmB,EAAE,EAAyB,MAAM,MAAM,CAAC;AAE5E,OAAO,EAEL,aAAa,GAGd,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAGL,gBAAgB,EAChB,iBAAiB,GAGlB,MAAM,uBAAuB,CAAC;AAE/B,MAAM,UAAU,wBAAwB,CAItC,eAAyE,EACzE,EAQC;IAKD,OAAO,QAAQ,CAAC,CAAC,EAAE,GAAG,EAAE,OAAO,EAAE,EAAE,EAAE;QACnC,IAAI,iBAAiB,CAAC,OAAO,CAAC,IAAI,gBAAgB,CAAC,OAAO,CAAC,EAAE,CAAC;YAC5D,OAAO,EAAE,CAAC;gBACR,OAAO,EAAE,OAER;gBACD,GAAG;aACJ,CAAC,CAAC;QACL,CAAC;QAED,MAAM,QAAQ,GAAG,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,CAA4B,CAAC;QAEjE,IAAI,OAAO,QAAQ,KAAK,WAAW,EAAE,CAAC;YACpC,OAAO,EAAE,CACP,GAAG,CAAC,IAAI,CACN,OAAO,EACP,gCAAgC,CAGjC,CACF,CAAC;QACJ,CAAC;QAED,MAAM,aAAa,GAAG,eAAe,CAAC,QAAQ,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;QAC5D,MAAM,WAAW,GAAG,GAAG,CAAC,MAAM,CAAC,OAAO,CAAkB,aAAa,CAAC,CAAC;QACvE,MAAM,CAAC,YAAY,EAAE,YAAY,CAAC,GAChC,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,WAAW,CAAC,aAAa,CAAC,CAAC;QAC9C,MAAM,UAAU,GAAG,GAAG,CAAC,MAAM,CAAC,OAAO,CAAqB,YAAY,CAAC,CAAC;QACxE,MAAM,UAAU,GAAG,GAAG,CAAC,MAAM,CAAC,OAAO,CAAsB,YAAY,CAAC,CAAC;QAEzE,IAAI,CAAC,UAAU,IAAI,CAAC,UAAU,IAAI,CAAC,WAAW,EAAE,CAAC;YAC/C,OAAO,EAAE,CACP,GAAG,CAAC,IAAI,CACN,OAAO,EACP,8BAA8B,CAG/B,CACF,CAAC;QACJ,CAAC;QAED,MAAM,OAAO,GAA2B;YACtC,IAAI,EAAE,QAAQ;YACd,MAAM,EAAE;gBACN,UAAU;gBACV,YAAY;gBACZ,UAAU;gBACV,YAAY;gBACZ,aAAa;gBACb,WAAW;aACZ;YACD,YAAY,EAAE,EAAE;SACjB,CAAC;QAEF,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAE5B,OAAO,EAAE,CACP,EAAE,CAAC;YACD,GAAG;YACH,OAAO,EAAE,OAER;SACF,CAAC,CACH,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type MonoTypeOperatorFunction } from 'rxjs';
|
|
2
|
+
import type { HttpTestCase, HttpTestCaseStep } from '../http-test/http-test-case.js';
|
|
3
|
+
import type { PipelineItem } from '../http-test/http-test-pipeline.js';
|
|
4
|
+
export declare function skipTestCase<Steps extends HttpTestCaseStep[]>(fn?: (testCase: HttpTestCase<Steps>) => boolean): MonoTypeOperatorFunction<PipelineItem<HttpTestCase<Steps>>>;
|
|
5
|
+
//# sourceMappingURL=skip.operator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skip.operator.d.ts","sourceRoot":"","sources":["../../../src/http-testing/operators/skip.operator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,wBAAwB,EAAE,MAAM,MAAM,CAAC;AAE1D,OAAO,KAAK,EACV,YAAY,EACZ,gBAAgB,EACjB,MAAM,gCAAgC,CAAC;AACxC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAEvE,wBAAgB,YAAY,CAAC,KAAK,SAAS,gBAAgB,EAAE,EAC3D,EAAE,GAAE,CAAC,QAAQ,EAAE,YAAY,CAAC,KAAK,CAAC,KAAK,OAAoB,GAC1D,wBAAwB,CAAC,YAAY,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,CAQ7D"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { map } from 'rxjs';
|
|
2
|
+
export function skipTestCase(fn = () => true) {
|
|
3
|
+
return map(({ current, ctx }) => ({
|
|
4
|
+
current: {
|
|
5
|
+
...current,
|
|
6
|
+
status: fn(current) ? 'skipped' : current.status,
|
|
7
|
+
},
|
|
8
|
+
ctx,
|
|
9
|
+
}));
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=skip.operator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skip.operator.js","sourceRoot":"","sources":["../../../src/http-testing/operators/skip.operator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAiC,MAAM,MAAM,CAAC;AAQ1D,MAAM,UAAU,YAAY,CAC1B,KAAiD,GAAG,EAAE,CAAC,IAAI;IAE3D,OAAO,GAAG,CAAC,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC,CAAC;QAChC,OAAO,EAAE;YACP,GAAG,OAAO;YACV,MAAM,EAAE,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM;SACjD;QACD,GAAG;KACJ,CAAC,CAAC,CAAC;AACN,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type MonoTypeOperatorFunction, type OperatorFunction } from 'rxjs';
|
|
2
|
+
import type { CustomHttpTestCaseStep, HttpTestCase, HttpTestCaseStep } from '../http-test/http-test-case.js';
|
|
3
|
+
import type { PipelineItem } from '../http-test/http-test-pipeline.js';
|
|
4
|
+
export declare function step<Steps extends HttpTestCaseStep[], CurrentStep extends HttpTestCaseStep>(fn: MonoTypeOperatorFunction<PipelineItem<HttpTestCase<[...Steps, CurrentStep, CustomHttpTestCaseStep]>>>): OperatorFunction<PipelineItem<HttpTestCase<[...Steps, CurrentStep]>>, PipelineItem<HttpTestCase<[...Steps, CurrentStep, CustomHttpTestCaseStep]>>>;
|
|
5
|
+
//# sourceMappingURL=step.operator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"step.operator.d.ts","sourceRoot":"","sources":["../../../src/http-testing/operators/step.operator.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,wBAAwB,EAC7B,KAAK,gBAAgB,EACtB,MAAM,MAAM,CAAC;AAEd,OAAO,KAAK,EACV,sBAAsB,EACtB,YAAY,EACZ,gBAAgB,EACjB,MAAM,gCAAgC,CAAC;AACxC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAGvE,wBAAgB,IAAI,CAClB,KAAK,SAAS,gBAAgB,EAAE,EAChC,WAAW,SAAS,gBAAgB,EAEpC,EAAE,EAAE,wBAAwB,CAC1B,YAAY,CAAC,YAAY,CAAC,CAAC,GAAG,KAAK,EAAE,WAAW,EAAE,sBAAsB,CAAC,CAAC,CAAC,CAC5E,GACA,gBAAgB,CACjB,YAAY,CAAC,YAAY,CAAC,CAAC,GAAG,KAAK,EAAE,WAAW,CAAC,CAAC,CAAC,EACnD,YAAY,CAAC,YAAY,CAAC,CAAC,GAAG,KAAK,EAAE,WAAW,EAAE,sBAAsB,CAAC,CAAC,CAAC,CAC5E,CA2BA"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { map, } from 'rxjs';
|
|
2
|
+
import { isFailedTestCase, isSkippedTestCase } from '../http-test/index.js';
|
|
3
|
+
export function step(fn) {
|
|
4
|
+
return (observable) => observable.pipe(map(({ current, ctx }) => {
|
|
5
|
+
if (isSkippedTestCase(current) || isFailedTestCase(current)) {
|
|
6
|
+
return {
|
|
7
|
+
current: current,
|
|
8
|
+
ctx,
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
current.steps.push({
|
|
12
|
+
transactions: [],
|
|
13
|
+
source: {},
|
|
14
|
+
type: 'custom',
|
|
15
|
+
});
|
|
16
|
+
const newCurr = current;
|
|
17
|
+
return { current: newCurr, ctx };
|
|
18
|
+
}), fn);
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=step.operator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"step.operator.js","sourceRoot":"","sources":["../../../src/http-testing/operators/step.operator.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,GAAG,GAGJ,MAAM,MAAM,CAAC;AAQd,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE5E,MAAM,UAAU,IAAI,CAIlB,EAEC;IAKD,OAAO,CAAC,UAAU,EAAE,EAAE,CACpB,UAAU,CAAC,IAAI,CACb,GAAG,CAAC,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,EAAE,EAAE;QACvB,IAAI,iBAAiB,CAAC,OAAO,CAAC,IAAI,gBAAgB,CAAC,OAAO,CAAC,EAAE,CAAC;YAC5D,OAAO;gBACL,OAAO,EAAE,OAER;gBACD,GAAG;aACJ,CAAC;QACJ,CAAC;QAED,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC;YACjB,YAAY,EAAE,EAAE;YAChB,MAAM,EAAE,EAAE;YACV,IAAI,EAAE,QAAQ;SACf,CAAC,CAAC;QAEH,MAAM,OAAO,GAAG,OAEf,CAAC;QAEF,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC;IACnC,CAAC,CAAC,EACF,EAAE,CACH,CAAC;AACN,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { HttpTestCase, HttpTestCaseStep } from '../http-test/http-test-case.js';
|
|
2
|
+
export declare function hasOwnProperty<T extends Record<PropertyKey, unknown>, K extends PropertyKey>(obj: T, key: K): obj is T & Record<K, unknown>;
|
|
3
|
+
export declare function hasThymianReqId(value: unknown): value is Record<PropertyKey, unknown> & {
|
|
4
|
+
thymianReqId: string;
|
|
5
|
+
};
|
|
6
|
+
export declare function hasThymianResId(value: unknown): value is Record<PropertyKey, unknown> & {
|
|
7
|
+
thymianResId: string;
|
|
8
|
+
};
|
|
9
|
+
export declare function previousStep<Steps extends HttpTestCaseStep[]>(testCase: HttpTestCase<Steps>): Steps extends [...HttpTestCaseStep[], infer Previous, HttpTestCaseStep] ? Previous : undefined;
|
|
10
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/http-testing/operators/utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,YAAY,EACZ,gBAAgB,EACjB,MAAM,gCAAgC,CAAC;AAExC,wBAAgB,cAAc,CAC5B,CAAC,SAAS,MAAM,CAAC,WAAW,EAAE,OAAO,CAAC,EACtC,CAAC,SAAS,WAAW,EACrB,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG,MAAM,CAAC,CAAC,EAAE,OAAO,CAAC,CAE/C;AAED,wBAAgB,eAAe,CAC7B,KAAK,EAAE,OAAO,GACb,KAAK,IAAI,MAAM,CAAC,WAAW,EAAE,OAAO,CAAC,GAAG;IAAE,YAAY,EAAE,MAAM,CAAA;CAAE,CAElE;AAED,wBAAgB,eAAe,CAC7B,KAAK,EAAE,OAAO,GACb,KAAK,IAAI,MAAM,CAAC,WAAW,EAAE,OAAO,CAAC,GAAG;IAAE,YAAY,EAAE,MAAM,CAAA;CAAE,CAElE;AAED,wBAAgB,YAAY,CAAC,KAAK,SAAS,gBAAgB,EAAE,EAC3D,QAAQ,EAAE,YAAY,CAAC,KAAK,CAAC,GAC5B,KAAK,SAAS,CAAC,GAAG,gBAAgB,EAAE,EAAE,MAAM,QAAQ,EAAE,gBAAgB,CAAC,GACtE,QAAQ,GACR,SAAS,CAKZ"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { isRecord } from '../../index.js';
|
|
2
|
+
export function hasOwnProperty(obj, key) {
|
|
3
|
+
return Object.hasOwn(obj, key);
|
|
4
|
+
}
|
|
5
|
+
export function hasThymianReqId(value) {
|
|
6
|
+
return isRecord(value) && 'thymianReqId' in value;
|
|
7
|
+
}
|
|
8
|
+
export function hasThymianResId(value) {
|
|
9
|
+
return isRecord(value) && 'thymianResId' in value;
|
|
10
|
+
}
|
|
11
|
+
export function previousStep(testCase) {
|
|
12
|
+
// TODO
|
|
13
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
14
|
+
// @ts-expect-error
|
|
15
|
+
return testCase.steps.at(-2);
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=utils.js.map
|