@redocly/respect-core 0.0.0-snapshot.1744362365 → 0.0.0-snapshot.1744801622
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/lib/arazzo-schema.js +35 -32
- package/lib/arazzo-schema.js.map +1 -1
- package/lib/consts.d.ts.map +1 -1
- package/lib/consts.js +6 -3
- package/lib/consts.js.map +1 -1
- package/lib/handlers/generate.d.ts +1 -1
- package/lib/handlers/generate.d.ts.map +1 -1
- package/lib/handlers/generate.js +17 -14
- package/lib/handlers/generate.js.map +1 -1
- package/lib/handlers/index.d.ts +2 -2
- package/lib/handlers/index.d.ts.map +1 -1
- package/lib/handlers/index.js +18 -2
- package/lib/handlers/index.js.map +1 -1
- package/lib/handlers/run.d.ts +1 -1
- package/lib/handlers/run.d.ts.map +1 -1
- package/lib/handlers/run.js +24 -21
- package/lib/handlers/run.js.map +1 -1
- package/lib/index.d.ts +4 -4
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +6 -1
- package/lib/index.js.map +1 -1
- package/lib/modules/arazzo-description-generator/cleanup-test-description.d.ts +1 -1
- package/lib/modules/arazzo-description-generator/cleanup-test-description.d.ts.map +1 -1
- package/lib/modules/arazzo-description-generator/cleanup-test-description.js +4 -1
- package/lib/modules/arazzo-description-generator/cleanup-test-description.js.map +1 -1
- package/lib/modules/arazzo-description-generator/generate-arazzo-description.d.ts +1 -1
- package/lib/modules/arazzo-description-generator/generate-arazzo-description.d.ts.map +1 -1
- package/lib/modules/arazzo-description-generator/generate-arazzo-description.js +38 -11
- package/lib/modules/arazzo-description-generator/generate-arazzo-description.js.map +1 -1
- package/lib/modules/arazzo-description-generator/generate-example-value.d.ts +1 -1
- package/lib/modules/arazzo-description-generator/generate-example-value.d.ts.map +1 -1
- package/lib/modules/arazzo-description-generator/generate-example-value.js +8 -5
- package/lib/modules/arazzo-description-generator/generate-example-value.js.map +1 -1
- package/lib/modules/arazzo-description-generator/generate-inputs-arazzo-components.d.ts +1 -1
- package/lib/modules/arazzo-description-generator/generate-inputs-arazzo-components.d.ts.map +1 -1
- package/lib/modules/arazzo-description-generator/generate-inputs-arazzo-components.js +4 -1
- package/lib/modules/arazzo-description-generator/generate-inputs-arazzo-components.js.map +1 -1
- package/lib/modules/arazzo-description-generator/generate-test-data-from-json-schema.js +32 -6
- package/lib/modules/arazzo-description-generator/generate-test-data-from-json-schema.js.map +1 -1
- package/lib/modules/arazzo-description-generator/generate-workflow-security-inputs.js +4 -1
- package/lib/modules/arazzo-description-generator/generate-workflow-security-inputs.js.map +1 -1
- package/lib/modules/arazzo-description-generator/generate-workflow-security-parameters.d.ts +1 -1
- package/lib/modules/arazzo-description-generator/generate-workflow-security-parameters.d.ts.map +1 -1
- package/lib/modules/arazzo-description-generator/generate-workflow-security-parameters.js +4 -1
- package/lib/modules/arazzo-description-generator/generate-workflow-security-parameters.js.map +1 -1
- package/lib/modules/arazzo-description-generator/generate-workflows-from-description.d.ts +3 -2
- package/lib/modules/arazzo-description-generator/generate-workflows-from-description.d.ts.map +1 -1
- package/lib/modules/arazzo-description-generator/generate-workflows-from-description.js +10 -7
- package/lib/modules/arazzo-description-generator/generate-workflows-from-description.js.map +1 -1
- package/lib/modules/arazzo-description-generator/index.d.ts +8 -8
- package/lib/modules/arazzo-description-generator/index.d.ts.map +1 -1
- package/lib/modules/arazzo-description-generator/index.js +24 -8
- package/lib/modules/arazzo-description-generator/index.js.map +1 -1
- package/lib/modules/checks/checks.js +4 -1
- package/lib/modules/checks/checks.js.map +1 -1
- package/lib/modules/checks/index.d.ts +2 -2
- package/lib/modules/checks/index.d.ts.map +1 -1
- package/lib/modules/checks/index.js +18 -2
- package/lib/modules/checks/index.js.map +1 -1
- package/lib/modules/checks/severity.d.ts +2 -2
- package/lib/modules/checks/severity.d.ts.map +1 -1
- package/lib/modules/checks/severity.js +10 -6
- package/lib/modules/checks/severity.js.map +1 -1
- package/lib/modules/cli-output/calculate-tests-passed.d.ts +1 -1
- package/lib/modules/cli-output/calculate-tests-passed.d.ts.map +1 -1
- package/lib/modules/cli-output/calculate-tests-passed.js +4 -1
- package/lib/modules/cli-output/calculate-tests-passed.js.map +1 -1
- package/lib/modules/cli-output/display-checks.d.ts +1 -1
- package/lib/modules/cli-output/display-checks.d.ts.map +1 -1
- package/lib/modules/cli-output/display-checks.js +39 -36
- package/lib/modules/cli-output/display-checks.js.map +1 -1
- package/lib/modules/cli-output/display-errors.d.ts +1 -1
- package/lib/modules/cli-output/display-errors.d.ts.map +1 -1
- package/lib/modules/cli-output/display-errors.js +21 -18
- package/lib/modules/cli-output/display-errors.js.map +1 -1
- package/lib/modules/cli-output/display-files-summary-table.d.ts +1 -1
- package/lib/modules/cli-output/display-files-summary-table.d.ts.map +1 -1
- package/lib/modules/cli-output/display-files-summary-table.js +51 -25
- package/lib/modules/cli-output/display-files-summary-table.js.map +1 -1
- package/lib/modules/cli-output/display-summary.d.ts +1 -1
- package/lib/modules/cli-output/display-summary.d.ts.map +1 -1
- package/lib/modules/cli-output/display-summary.js +55 -29
- package/lib/modules/cli-output/display-summary.js.map +1 -1
- package/lib/modules/cli-output/index.d.ts +8 -8
- package/lib/modules/cli-output/index.d.ts.map +1 -1
- package/lib/modules/cli-output/index.js +24 -8
- package/lib/modules/cli-output/index.js.map +1 -1
- package/lib/modules/cli-output/json-logs.d.ts +1 -1
- package/lib/modules/cli-output/json-logs.d.ts.map +1 -1
- package/lib/modules/cli-output/json-logs.js +8 -5
- package/lib/modules/cli-output/json-logs.js.map +1 -1
- package/lib/modules/cli-output/mask-secrets.js +6 -2
- package/lib/modules/cli-output/mask-secrets.js.map +1 -1
- package/lib/modules/cli-output/verbose-logs.d.ts +1 -1
- package/lib/modules/cli-output/verbose-logs.d.ts.map +1 -1
- package/lib/modules/cli-output/verbose-logs.js +4 -1
- package/lib/modules/cli-output/verbose-logs.js.map +1 -1
- package/lib/modules/config-parser/get-value-from-context.d.ts +1 -1
- package/lib/modules/config-parser/get-value-from-context.d.ts.map +1 -1
- package/lib/modules/config-parser/get-value-from-context.js +21 -14
- package/lib/modules/config-parser/get-value-from-context.js.map +1 -1
- package/lib/modules/config-parser/handle-request-body-replacements.d.ts +1 -1
- package/lib/modules/config-parser/handle-request-body-replacements.d.ts.map +1 -1
- package/lib/modules/config-parser/handle-request-body-replacements.js +7 -4
- package/lib/modules/config-parser/handle-request-body-replacements.js.map +1 -1
- package/lib/modules/config-parser/index.d.ts +6 -6
- package/lib/modules/config-parser/index.d.ts.map +1 -1
- package/lib/modules/config-parser/index.js +22 -6
- package/lib/modules/config-parser/index.js.map +1 -1
- package/lib/modules/config-parser/parse-parameters.d.ts +1 -1
- package/lib/modules/config-parser/parse-parameters.d.ts.map +1 -1
- package/lib/modules/config-parser/parse-parameters.js +6 -2
- package/lib/modules/config-parser/parse-parameters.js.map +1 -1
- package/lib/modules/config-parser/parse-request-body.d.ts +2 -2
- package/lib/modules/config-parser/parse-request-body.d.ts.map +1 -1
- package/lib/modules/config-parser/parse-request-body.js +38 -15
- package/lib/modules/config-parser/parse-request-body.js.map +1 -1
- package/lib/modules/config-parser/resolve-reusable-component.d.ts +1 -1
- package/lib/modules/config-parser/resolve-reusable-component.d.ts.map +1 -1
- package/lib/modules/config-parser/resolve-reusable-component.js +6 -3
- package/lib/modules/config-parser/resolve-reusable-component.js.map +1 -1
- package/lib/modules/config-parser/resolve-reusable-object-reference.d.ts +1 -1
- package/lib/modules/config-parser/resolve-reusable-object-reference.d.ts.map +1 -1
- package/lib/modules/config-parser/resolve-reusable-object-reference.js +6 -3
- package/lib/modules/config-parser/resolve-reusable-object-reference.js.map +1 -1
- package/lib/modules/description-parser/bundle-openapi.js +14 -11
- package/lib/modules/description-parser/bundle-openapi.js.map +1 -1
- package/lib/modules/description-parser/extract-first-example.js +4 -1
- package/lib/modules/description-parser/extract-first-example.js.map +1 -1
- package/lib/modules/description-parser/get-operation-by-id.d.ts +1 -1
- package/lib/modules/description-parser/get-operation-by-id.d.ts.map +1 -1
- package/lib/modules/description-parser/get-operation-by-id.js +7 -4
- package/lib/modules/description-parser/get-operation-by-id.js.map +1 -1
- package/lib/modules/description-parser/get-operation-by-path.d.ts +2 -2
- package/lib/modules/description-parser/get-operation-by-path.d.ts.map +1 -1
- package/lib/modules/description-parser/get-operation-by-path.js +8 -5
- package/lib/modules/description-parser/get-operation-by-path.js.map +1 -1
- package/lib/modules/description-parser/get-operation-from-description.d.ts +3 -3
- package/lib/modules/description-parser/get-operation-from-description.d.ts.map +1 -1
- package/lib/modules/description-parser/get-operation-from-description.js +10 -6
- package/lib/modules/description-parser/get-operation-from-description.js.map +1 -1
- package/lib/modules/description-parser/get-request-body-schema.d.ts +1 -1
- package/lib/modules/description-parser/get-request-body-schema.d.ts.map +1 -1
- package/lib/modules/description-parser/get-request-body-schema.js +4 -1
- package/lib/modules/description-parser/get-request-body-schema.js.map +1 -1
- package/lib/modules/description-parser/get-request-data-from-openapi.d.ts +2 -2
- package/lib/modules/description-parser/get-request-data-from-openapi.d.ts.map +1 -1
- package/lib/modules/description-parser/get-request-data-from-openapi.js +14 -11
- package/lib/modules/description-parser/get-request-data-from-openapi.js.map +1 -1
- package/lib/modules/description-parser/get-response-schema.js +4 -1
- package/lib/modules/description-parser/get-response-schema.js.map +1 -1
- package/lib/modules/description-parser/index.d.ts +9 -9
- package/lib/modules/description-parser/index.d.ts.map +1 -1
- package/lib/modules/description-parser/index.js +25 -9
- package/lib/modules/description-parser/index.js.map +1 -1
- package/lib/modules/description-parser/remove-write-only-properties.d.ts +1 -1
- package/lib/modules/description-parser/remove-write-only-properties.d.ts.map +1 -1
- package/lib/modules/description-parser/remove-write-only-properties.js +4 -1
- package/lib/modules/description-parser/remove-write-only-properties.js.map +1 -1
- package/lib/modules/faker.js +20 -17
- package/lib/modules/faker.js.map +1 -1
- package/lib/modules/flow-runner/call-api-and-analyze-results.d.ts +2 -2
- package/lib/modules/flow-runner/call-api-and-analyze-results.d.ts.map +1 -1
- package/lib/modules/flow-runner/call-api-and-analyze-results.js +14 -11
- package/lib/modules/flow-runner/call-api-and-analyze-results.js.map +1 -1
- package/lib/modules/flow-runner/context/create-runtime-expression-ctx.d.ts +1 -1
- package/lib/modules/flow-runner/context/create-runtime-expression-ctx.d.ts.map +1 -1
- package/lib/modules/flow-runner/context/create-runtime-expression-ctx.js +5 -1
- package/lib/modules/flow-runner/context/create-runtime-expression-ctx.js.map +1 -1
- package/lib/modules/flow-runner/context/create-test-context.d.ts +2 -2
- package/lib/modules/flow-runner/context/create-test-context.d.ts.map +1 -1
- package/lib/modules/flow-runner/context/create-test-context.js +28 -24
- package/lib/modules/flow-runner/context/create-test-context.js.map +1 -1
- package/lib/modules/flow-runner/context/index.d.ts +4 -4
- package/lib/modules/flow-runner/context/index.d.ts.map +1 -1
- package/lib/modules/flow-runner/context/index.js +20 -4
- package/lib/modules/flow-runner/context/index.js.map +1 -1
- package/lib/modules/flow-runner/context/set-public-steps.d.ts +1 -1
- package/lib/modules/flow-runner/context/set-public-steps.d.ts.map +1 -1
- package/lib/modules/flow-runner/context/set-public-steps.js +4 -1
- package/lib/modules/flow-runner/context/set-public-steps.js.map +1 -1
- package/lib/modules/flow-runner/context/set-public-workflows.d.ts +1 -1
- package/lib/modules/flow-runner/context/set-public-workflows.d.ts.map +1 -1
- package/lib/modules/flow-runner/context/set-public-workflows.js +9 -6
- package/lib/modules/flow-runner/context/set-public-workflows.js.map +1 -1
- package/lib/modules/flow-runner/error-message-matcher.js +6 -3
- package/lib/modules/flow-runner/error-message-matcher.js.map +1 -1
- package/lib/modules/flow-runner/get-server-url.d.ts +2 -2
- package/lib/modules/flow-runner/get-server-url.d.ts.map +1 -1
- package/lib/modules/flow-runner/get-server-url.js +8 -5
- package/lib/modules/flow-runner/get-server-url.js.map +1 -1
- package/lib/modules/flow-runner/get-test-description-from-file.d.ts +21 -2
- package/lib/modules/flow-runner/get-test-description-from-file.d.ts.map +1 -1
- package/lib/modules/flow-runner/get-test-description-from-file.js +47 -21
- package/lib/modules/flow-runner/get-test-description-from-file.js.map +1 -1
- package/lib/modules/flow-runner/get-workflows-to-run.d.ts +1 -1
- package/lib/modules/flow-runner/get-workflows-to-run.d.ts.map +1 -1
- package/lib/modules/flow-runner/get-workflows-to-run.js +9 -6
- package/lib/modules/flow-runner/get-workflows-to-run.js.map +1 -1
- package/lib/modules/flow-runner/index.d.ts +15 -15
- package/lib/modules/flow-runner/index.d.ts.map +1 -1
- package/lib/modules/flow-runner/index.js +31 -15
- package/lib/modules/flow-runner/index.js.map +1 -1
- package/lib/modules/flow-runner/inputs/format-cli-inputs.js +4 -1
- package/lib/modules/flow-runner/inputs/format-cli-inputs.js.map +1 -1
- package/lib/modules/flow-runner/inputs/index.d.ts +2 -2
- package/lib/modules/flow-runner/inputs/index.d.ts.map +1 -1
- package/lib/modules/flow-runner/inputs/index.js +18 -2
- package/lib/modules/flow-runner/inputs/index.js.map +1 -1
- package/lib/modules/flow-runner/inputs/map-input-values-to-schema.d.ts +1 -1
- package/lib/modules/flow-runner/inputs/map-input-values-to-schema.d.ts.map +1 -1
- package/lib/modules/flow-runner/inputs/map-input-values-to-schema.js +9 -3
- package/lib/modules/flow-runner/inputs/map-input-values-to-schema.js.map +1 -1
- package/lib/modules/flow-runner/outputs/index.d.ts +1 -1
- package/lib/modules/flow-runner/outputs/index.d.ts.map +1 -1
- package/lib/modules/flow-runner/outputs/index.js +17 -1
- package/lib/modules/flow-runner/outputs/index.js.map +1 -1
- package/lib/modules/flow-runner/outputs/print-message.js +14 -9
- package/lib/modules/flow-runner/outputs/print-message.js.map +1 -1
- package/lib/modules/flow-runner/prepare-request.d.ts +3 -3
- package/lib/modules/flow-runner/prepare-request.d.ts.map +1 -1
- package/lib/modules/flow-runner/prepare-request.js +22 -19
- package/lib/modules/flow-runner/prepare-request.js.map +1 -1
- package/lib/modules/flow-runner/read-env-variables.js +30 -4
- package/lib/modules/flow-runner/read-env-variables.js.map +1 -1
- package/lib/modules/flow-runner/resolve-running-workflows.js +4 -1
- package/lib/modules/flow-runner/resolve-running-workflows.js.map +1 -1
- package/lib/modules/flow-runner/run-step.d.ts +1 -1
- package/lib/modules/flow-runner/run-step.d.ts.map +1 -1
- package/lib/modules/flow-runner/run-step.js +51 -48
- package/lib/modules/flow-runner/run-step.js.map +1 -1
- package/lib/modules/flow-runner/runner.d.ts +2 -2
- package/lib/modules/flow-runner/runner.d.ts.map +1 -1
- package/lib/modules/flow-runner/runner.js +52 -44
- package/lib/modules/flow-runner/runner.js.map +1 -1
- package/lib/modules/flow-runner/schema/index.d.ts +1 -1
- package/lib/modules/flow-runner/schema/index.d.ts.map +1 -1
- package/lib/modules/flow-runner/schema/index.js +17 -1
- package/lib/modules/flow-runner/schema/index.js.map +1 -1
- package/lib/modules/flow-runner/schema/schema-checker.d.ts +1 -1
- package/lib/modules/flow-runner/schema/schema-checker.d.ts.map +1 -1
- package/lib/modules/flow-runner/schema/schema-checker.js +30 -24
- package/lib/modules/flow-runner/schema/schema-checker.js.map +1 -1
- package/lib/modules/flow-runner/success-criteria/check-success-criteria.d.ts +1 -1
- package/lib/modules/flow-runner/success-criteria/check-success-criteria.d.ts.map +1 -1
- package/lib/modules/flow-runner/success-criteria/check-success-criteria.js +22 -19
- package/lib/modules/flow-runner/success-criteria/check-success-criteria.js.map +1 -1
- package/lib/modules/flow-runner/success-criteria/index.d.ts +2 -2
- package/lib/modules/flow-runner/success-criteria/index.d.ts.map +1 -1
- package/lib/modules/flow-runner/success-criteria/index.js +18 -2
- package/lib/modules/flow-runner/success-criteria/index.js.map +1 -1
- package/lib/modules/flow-runner/success-criteria/validate-success-criteria.d.ts +1 -1
- package/lib/modules/flow-runner/success-criteria/validate-success-criteria.d.ts.map +1 -1
- package/lib/modules/flow-runner/success-criteria/validate-success-criteria.js +12 -6
- package/lib/modules/flow-runner/success-criteria/validate-success-criteria.js.map +1 -1
- package/lib/modules/runtime-expressions/abnf-parser.d.ts +15 -0
- package/lib/modules/runtime-expressions/abnf-parser.d.ts.map +1 -0
- package/lib/modules/runtime-expressions/abnf-parser.js +2012 -0
- package/lib/modules/runtime-expressions/abnf-parser.js.map +1 -0
- package/lib/modules/runtime-expressions/evaluate.d.ts +1 -1
- package/lib/modules/runtime-expressions/evaluate.d.ts.map +1 -1
- package/lib/modules/runtime-expressions/evaluate.js +19 -14
- package/lib/modules/runtime-expressions/evaluate.js.map +1 -1
- package/lib/modules/runtime-expressions/index.d.ts +1 -1
- package/lib/modules/runtime-expressions/index.d.ts.map +1 -1
- package/lib/modules/runtime-expressions/index.js +17 -1
- package/lib/modules/runtime-expressions/index.js.map +1 -1
- package/lib/modules/runtime-expressions/lint.d.ts.map +1 -1
- package/lib/modules/runtime-expressions/lint.js +5 -4
- package/lib/modules/runtime-expressions/lint.js.map +1 -1
- package/lib/modules/runtime-expressions/replace-json-pointers.js +6 -3
- package/lib/modules/runtime-expressions/replace-json-pointers.js.map +1 -1
- package/lib/modules/timeout-timer/timer.js +9 -3
- package/lib/modules/timeout-timer/timer.js.map +1 -1
- package/lib/types.d.ts +8 -6
- package/lib/types.d.ts.map +1 -1
- package/lib/types.js +2 -1
- package/lib/utils/ajv-errors.d.ts +1 -1
- package/lib/utils/ajv-errors.d.ts.map +1 -1
- package/lib/utils/ajv-errors.js +11 -5
- package/lib/utils/ajv-errors.js.map +1 -1
- package/lib/utils/api-fetcher.d.ts +2 -2
- package/lib/utils/api-fetcher.d.ts.map +1 -1
- package/lib/utils/api-fetcher.js +210 -195
- package/lib/utils/api-fetcher.js.map +1 -1
- package/lib/utils/check-circular-refs-in-schema.js +4 -1
- package/lib/utils/check-circular-refs-in-schema.js.map +1 -1
- package/lib/utils/clean-colors.js +4 -1
- package/lib/utils/clean-colors.js.map +1 -1
- package/lib/utils/cli-outputs.d.ts +1 -1
- package/lib/utils/cli-outputs.d.ts.map +1 -1
- package/lib/utils/cli-outputs.js +39 -25
- package/lib/utils/cli-outputs.js.map +1 -1
- package/lib/utils/delay.js +4 -1
- package/lib/utils/delay.js.map +1 -1
- package/lib/utils/env.js +6 -2
- package/lib/utils/env.js.map +1 -1
- package/lib/utils/exit-with-error.d.ts.map +1 -1
- package/lib/utils/exit-with-error.js +11 -3
- package/lib/utils/exit-with-error.js.map +1 -1
- package/lib/utils/file.js +4 -1
- package/lib/utils/file.js.map +1 -1
- package/lib/utils/get-nested-value.js +4 -1
- package/lib/utils/get-nested-value.js.map +1 -1
- package/lib/utils/har-logs/create-har-log.js +5 -2
- package/lib/utils/har-logs/create-har-log.js.map +1 -1
- package/lib/utils/har-logs/helpers/add-headers.js +4 -1
- package/lib/utils/har-logs/helpers/add-headers.js.map +1 -1
- package/lib/utils/har-logs/helpers/build-headers.js +4 -1
- package/lib/utils/har-logs/helpers/build-headers.js.map +1 -1
- package/lib/utils/har-logs/helpers/build-params.js +28 -2
- package/lib/utils/har-logs/helpers/build-params.js.map +1 -1
- package/lib/utils/har-logs/helpers/build-request-cookies.js +28 -2
- package/lib/utils/har-logs/helpers/build-request-cookies.js.map +1 -1
- package/lib/utils/har-logs/helpers/build-response-cookies.js +28 -2
- package/lib/utils/har-logs/helpers/build-response-cookies.js.map +1 -1
- package/lib/utils/har-logs/helpers/get-agent.js +38 -12
- package/lib/utils/har-logs/helpers/get-agent.js.map +1 -1
- package/lib/utils/har-logs/helpers/get-duration.js +4 -1
- package/lib/utils/har-logs/helpers/get-duration.js.map +1 -1
- package/lib/utils/har-logs/helpers/get-input-url.js +4 -1
- package/lib/utils/har-logs/helpers/get-input-url.js.map +1 -1
- package/lib/utils/har-logs/helpers/handle-request.js +4 -1
- package/lib/utils/har-logs/helpers/handle-request.js.map +1 -1
- package/lib/utils/har-logs/index.d.ts +2 -2
- package/lib/utils/har-logs/index.d.ts.map +1 -1
- package/lib/utils/har-logs/index.js +18 -2
- package/lib/utils/har-logs/index.js.map +1 -1
- package/lib/utils/har-logs/with-har.js +51 -24
- package/lib/utils/har-logs/with-har.js.map +1 -1
- package/lib/utils/is-empty.js +4 -1
- package/lib/utils/is-empty.js.map +1 -1
- package/lib/utils/is-json.js +4 -1
- package/lib/utils/is-json.js.map +1 -1
- package/lib/utils/is-url.js +4 -1
- package/lib/utils/is-url.js.map +1 -1
- package/lib/utils/logger/logger.js +8 -3
- package/lib/utils/logger/logger.js.map +1 -1
- package/lib/utils/mtls/create-mtls-client.d.ts +1 -1
- package/lib/utils/mtls/create-mtls-client.d.ts.map +1 -1
- package/lib/utils/mtls/create-mtls-client.js +6 -3
- package/lib/utils/mtls/create-mtls-client.js.map +1 -1
- package/lib/utils/mtls/resolve-mtls-certificates.d.ts +1 -1
- package/lib/utils/mtls/resolve-mtls-certificates.d.ts.map +1 -1
- package/lib/utils/mtls/resolve-mtls-certificates.js +29 -3
- package/lib/utils/mtls/resolve-mtls-certificates.js.map +1 -1
- package/lib/utils/sort.js +4 -1
- package/lib/utils/sort.js.map +1 -1
- package/lib/utils/time.js +4 -1
- package/lib/utils/time.js.map +1 -1
- package/lib/utils/url.js +4 -1
- package/lib/utils/url.js.map +1 -1
- package/lib/utils/yaml.js +16 -11
- package/lib/utils/yaml.js.map +1 -1
- package/package.json +6 -6
- package/lib/modules/runtime-expressions/abnf-parser.cjs +0 -1993
- package/lib/utils/package.d.ts +0 -2
- package/lib/utils/package.d.ts.map +0 -1
- package/lib/utils/package.js +0 -4
- package/lib/utils/package.js.map +0 -1
|
@@ -1,7 +1,33 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.readEnvVariables = readEnvVariables;
|
|
27
|
+
const dotenv = __importStar(require("dotenv"));
|
|
28
|
+
const path = __importStar(require("path"));
|
|
29
|
+
const fs = __importStar(require("fs"));
|
|
30
|
+
function readEnvVariables(executionFilePath) {
|
|
5
31
|
if (executionFilePath) {
|
|
6
32
|
let currentDir = path.dirname(executionFilePath);
|
|
7
33
|
while (currentDir !== path.resolve(currentDir, '..')) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"read-env-variables.js","sourceRoot":"","sources":["../../../src/modules/flow-runner/read-env-variables.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"read-env-variables.js","sourceRoot":"","sources":["../../../src/modules/flow-runner/read-env-variables.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAIA,4CAiBC;AArBD,+CAAiC;AACjC,2CAA6B;AAC7B,uCAAyB;AAEzB,SAAgB,gBAAgB,CAAC,iBAA0B;IACzD,IAAI,iBAAiB,EAAE,CAAC;QACtB,IAAI,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC;QAEjD,OAAO,UAAU,KAAK,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,IAAI,CAAC,EAAE,CAAC;YACrD,MAAM,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;YAElD,IAAI,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC,EAAE,CAAC;gBAC/B,MAAM,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC,CAAC;gBACrC,MAAM;YACR,CAAC;YAED,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;QAC9C,CAAC;IACH,CAAC;IAED,OAAO,OAAO,CAAC,GAA6B,CAAC;AAC/C,CAAC"}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.resolveRunningWorkflows = resolveRunningWorkflows;
|
|
4
|
+
function resolveRunningWorkflows(workflows) {
|
|
2
5
|
if (!workflows) {
|
|
3
6
|
return undefined;
|
|
4
7
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolve-running-workflows.js","sourceRoot":"","sources":["../../../src/modules/flow-runner/resolve-running-workflows.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"resolve-running-workflows.js","sourceRoot":"","sources":["../../../src/modules/flow-runner/resolve-running-workflows.ts"],"names":[],"mappings":";;AAAA,0DAwBC;AAxBD,SAAgB,uBAAuB,CACrC,SAAwC;IAExC,IAAI,CAAC,SAAS,EAAE,CAAC;QACf,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,IAAI,OAAO,SAAS,KAAK,QAAQ,EAAE,CAAC;QAClC,OAAO,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;IAC3F,CAAC;IAED,IAAI,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,CAAC;QAC7B,MAAM,MAAM,GAAa,EAAE,CAAC;QAC5B,KAAK,MAAM,QAAQ,IAAI,SAAS,EAAE,CAAC;YACjC,IAAI,QAAQ,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;gBAC3B,MAAM,CAAC,IAAI,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;YAC3D,CAAC;iBAAM,CAAC;gBACN,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;YACxB,CAAC;QACH,CAAC;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run-step.d.ts","sourceRoot":"","sources":["../../../src/modules/flow-runner/run-step.ts"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EAEV,IAAI,EACJ,WAAW,EAMZ,MAAM,
|
|
1
|
+
{"version":3,"file":"run-step.d.ts","sourceRoot":"","sources":["../../../src/modules/flow-runner/run-step.ts"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EAEV,IAAI,EACJ,WAAW,EAMZ,MAAM,aAAa,CAAC;AAQrB,wBAAsB,OAAO,CAAC,EAC5B,IAAI,EACJ,GAAG,EACH,UAAU,EACV,WAAW,GACZ,EAAE;IACD,IAAI,EAAE,IAAI,CAAC;IACX,GAAG,EAAE,WAAW,CAAC;IACjB,UAAU,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,GAAG,OAAO,CAAC;IAAE,SAAS,EAAE,OAAO,CAAA;CAAE,GAAG,IAAI,CAAC,CAyTzC"}
|
|
@@ -1,55 +1,58 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
const
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.runStep = runStep;
|
|
4
|
+
const colorette_1 = require("colorette");
|
|
5
|
+
const call_api_and_analyze_results_1 = require("./call-api-and-analyze-results");
|
|
6
|
+
const success_criteria_1 = require("./success-criteria");
|
|
7
|
+
const delay_1 = require("../../utils/delay");
|
|
8
|
+
const checks_1 = require("../checks");
|
|
9
|
+
const runner_1 = require("./runner");
|
|
10
|
+
const prepare_request_1 = require("./prepare-request");
|
|
11
|
+
const cli_outputs_1 = require("../../utils/cli-outputs");
|
|
12
|
+
const config_parser_1 = require("../config-parser");
|
|
13
|
+
const runtime_expressions_1 = require("../runtime-expressions");
|
|
14
|
+
const logger_1 = require("../../utils/logger/logger");
|
|
15
|
+
const timer_1 = require("../timeout-timer/timer");
|
|
16
|
+
const consts_1 = require("../../consts");
|
|
17
|
+
const logger = logger_1.DefaultLogger.getInstance();
|
|
15
18
|
const parsedMaxSteps = parseInt(process.env.RESPECT_MAX_STEPS, 10);
|
|
16
|
-
const maxSteps = isNaN(parsedMaxSteps) ? DEFAULT_RESPECT_MAX_STEPS : parsedMaxSteps;
|
|
19
|
+
const maxSteps = isNaN(parsedMaxSteps) ? consts_1.DEFAULT_RESPECT_MAX_STEPS : parsedMaxSteps;
|
|
17
20
|
let stepsRun = 0;
|
|
18
|
-
|
|
21
|
+
async function runStep({ step, ctx, workflowId, retriesLeft, }) {
|
|
19
22
|
step = { ...step }; // shallow copy step to avoid mutating the original step
|
|
20
23
|
step.retriesLeft = retriesLeft;
|
|
21
24
|
const workflow = ctx.workflows.find((w) => w.workflowId === workflowId);
|
|
22
25
|
const { stepId, onFailure, onSuccess, workflowId: targetWorkflowRef, parameters } = step;
|
|
23
|
-
const failureActionsToRun = (onFailure || workflow?.failureActions || []).map((action) => resolveReusableComponentItem(action, ctx));
|
|
24
|
-
const successActionsToRun = (onSuccess || workflow?.successActions || []).map((action) => resolveReusableComponentItem(action, ctx));
|
|
25
|
-
const resolvedParameters = parameters?.map((parameter) => resolveReusableComponentItem(parameter, ctx));
|
|
26
|
+
const failureActionsToRun = (onFailure || workflow?.failureActions || []).map((action) => (0, config_parser_1.resolveReusableComponentItem)(action, ctx));
|
|
27
|
+
const successActionsToRun = (onSuccess || workflow?.successActions || []).map((action) => (0, config_parser_1.resolveReusableComponentItem)(action, ctx));
|
|
28
|
+
const resolvedParameters = parameters?.map((parameter) => (0, config_parser_1.resolveReusableComponentItem)(parameter, ctx));
|
|
26
29
|
if (targetWorkflowRef) {
|
|
27
30
|
const targetWorkflow = ctx.workflows.find((w) => w.workflowId === targetWorkflowRef) ||
|
|
28
|
-
getValueFromContext(targetWorkflowRef, ctx);
|
|
31
|
+
(0, config_parser_1.getValueFromContext)(targetWorkflowRef, ctx);
|
|
29
32
|
if (!targetWorkflow) {
|
|
30
33
|
const failedCall = {
|
|
31
|
-
name: CHECKS.UNEXPECTED_ERROR,
|
|
32
|
-
message: `Workflow ${red(targetWorkflowRef)} not found.`,
|
|
34
|
+
name: checks_1.CHECKS.UNEXPECTED_ERROR,
|
|
35
|
+
message: `Workflow ${(0, colorette_1.red)(targetWorkflowRef)} not found.`,
|
|
33
36
|
passed: false,
|
|
34
37
|
severity: ctx.severity['UNEXPECTED_ERROR'],
|
|
35
38
|
};
|
|
36
39
|
step.checks.push(failedCall);
|
|
37
40
|
return;
|
|
38
41
|
}
|
|
39
|
-
const workflowCtx = await resolveWorkflowContext(targetWorkflowRef, targetWorkflow, ctx);
|
|
42
|
+
const workflowCtx = await (0, runner_1.resolveWorkflowContext)(targetWorkflowRef, targetWorkflow, ctx);
|
|
40
43
|
if (resolvedParameters && resolvedParameters.length) {
|
|
41
44
|
// When the step in context specifies a workflowId, then all parameters without `in` maps to workflow inputs.
|
|
42
45
|
const workflowInputParameters = resolvedParameters
|
|
43
|
-
.filter(isParameterWithoutIn)
|
|
46
|
+
.filter(config_parser_1.isParameterWithoutIn)
|
|
44
47
|
.reduce((acc, parameter) => {
|
|
45
48
|
// Ensure parameter is of type ParameterWithoutIn
|
|
46
|
-
acc[parameter.name] = getValueFromContext(parameter.value, ctx);
|
|
49
|
+
acc[parameter.name] = (0, config_parser_1.getValueFromContext)(parameter.value, ctx);
|
|
47
50
|
return acc;
|
|
48
51
|
}, {});
|
|
49
52
|
workflowCtx.$workflows[targetWorkflow.workflowId].inputs = workflowInputParameters;
|
|
50
53
|
}
|
|
51
|
-
printChildWorkflowSeparator(stepId);
|
|
52
|
-
const stepWorkflowResult = await runWorkflow({
|
|
54
|
+
(0, cli_outputs_1.printChildWorkflowSeparator)(stepId);
|
|
55
|
+
const stepWorkflowResult = await (0, runner_1.runWorkflow)({
|
|
53
56
|
workflowInput: targetWorkflow,
|
|
54
57
|
ctx: workflowCtx,
|
|
55
58
|
skipLineSeparator: true,
|
|
@@ -62,7 +65,7 @@ export async function runStep({ step, ctx, workflowId, retriesLeft, }) {
|
|
|
62
65
|
try {
|
|
63
66
|
for (const [outputKey, outputValue] of Object.entries(step.outputs)) {
|
|
64
67
|
// need to partially emulate $outputs context
|
|
65
|
-
outputs[outputKey] = evaluateRuntimeExpressionPayload({
|
|
68
|
+
outputs[outputKey] = (0, runtime_expressions_1.evaluateRuntimeExpressionPayload)({
|
|
66
69
|
payload: outputValue,
|
|
67
70
|
context: {
|
|
68
71
|
$outputs: workflowCtx.$outputs?.[targetWorkflow.workflowId] || {},
|
|
@@ -72,7 +75,7 @@ export async function runStep({ step, ctx, workflowId, retriesLeft, }) {
|
|
|
72
75
|
}
|
|
73
76
|
catch (error) {
|
|
74
77
|
const failedCall = {
|
|
75
|
-
name: CHECKS.UNEXPECTED_ERROR,
|
|
78
|
+
name: checks_1.CHECKS.UNEXPECTED_ERROR,
|
|
76
79
|
message: error.message,
|
|
77
80
|
passed: false,
|
|
78
81
|
severity: ctx.severity['UNEXPECTED_ERROR'],
|
|
@@ -98,16 +101,16 @@ export async function runStep({ step, ctx, workflowId, retriesLeft, }) {
|
|
|
98
101
|
stepsRun++;
|
|
99
102
|
if (stepsRun > maxSteps) {
|
|
100
103
|
step.checks.push({
|
|
101
|
-
name: CHECKS.MAX_STEPS_REACHED_ERROR,
|
|
104
|
+
name: checks_1.CHECKS.MAX_STEPS_REACHED_ERROR,
|
|
102
105
|
message: `Max steps (${maxSteps}) reached`,
|
|
103
106
|
passed: false,
|
|
104
107
|
severity: ctx.severity['MAX_STEPS_REACHED_ERROR'],
|
|
105
108
|
});
|
|
106
109
|
return { shouldEnd: true };
|
|
107
110
|
}
|
|
108
|
-
if (Timer.getInstance().isTimedOut()) {
|
|
111
|
+
if (timer_1.Timer.getInstance().isTimedOut()) {
|
|
109
112
|
step.checks.push({
|
|
110
|
-
name: CHECKS.GLOBAL_TIMEOUT_ERROR,
|
|
113
|
+
name: checks_1.CHECKS.GLOBAL_TIMEOUT_ERROR,
|
|
111
114
|
message: `Global Respect timer reached`,
|
|
112
115
|
passed: false,
|
|
113
116
|
severity: ctx.severity['GLOBAL_TIMEOUT_ERROR'],
|
|
@@ -117,7 +120,7 @@ export async function runStep({ step, ctx, workflowId, retriesLeft, }) {
|
|
|
117
120
|
if (resolvedParameters && resolvedParameters.length) {
|
|
118
121
|
// When the step in context does not specify a workflowId the `in` field MUST be specified.
|
|
119
122
|
const parameterWithoutIn = resolvedParameters.find((parameter) => {
|
|
120
|
-
const resolvedParameter = resolveReusableComponentItem(parameter, ctx);
|
|
123
|
+
const resolvedParameter = (0, config_parser_1.resolveReusableComponentItem)(parameter, ctx);
|
|
121
124
|
return !('in' in resolvedParameter);
|
|
122
125
|
});
|
|
123
126
|
if (parameterWithoutIn) {
|
|
@@ -130,8 +133,8 @@ export async function runStep({ step, ctx, workflowId, retriesLeft, }) {
|
|
|
130
133
|
if (!workflowId) {
|
|
131
134
|
throw new Error('Workflow name is required to run a step');
|
|
132
135
|
}
|
|
133
|
-
requestData = await prepareRequest(ctx, step, workflowId);
|
|
134
|
-
const checksResult = await callAPIAndAnalyzeResults({
|
|
136
|
+
requestData = await (0, prepare_request_1.prepareRequest)(ctx, step, workflowId);
|
|
137
|
+
const checksResult = await (0, call_api_and_analyze_results_1.callAPIAndAnalyzeResults)({
|
|
135
138
|
ctx,
|
|
136
139
|
workflowId,
|
|
137
140
|
step,
|
|
@@ -142,7 +145,7 @@ export async function runStep({ step, ctx, workflowId, retriesLeft, }) {
|
|
|
142
145
|
catch (e) {
|
|
143
146
|
step.verboseLog = ctx.apiClient.getVerboseResponseLogs();
|
|
144
147
|
const failedCall = {
|
|
145
|
-
name: CHECKS.UNEXPECTED_ERROR,
|
|
148
|
+
name: checks_1.CHECKS.UNEXPECTED_ERROR,
|
|
146
149
|
message: e.message,
|
|
147
150
|
passed: false,
|
|
148
151
|
severity: ctx.severity['UNEXPECTED_ERROR'],
|
|
@@ -155,15 +158,15 @@ export async function runStep({ step, ctx, workflowId, retriesLeft, }) {
|
|
|
155
158
|
: undefined;
|
|
156
159
|
const requestUrl = requestData?.path || requestData?.serverUrl?.url;
|
|
157
160
|
if (requestUrl) {
|
|
158
|
-
printStepDetails({
|
|
159
|
-
testNameToDisplay: `${requestData?.method.toUpperCase()} ${white(requestUrl)}${step.stepId ? ` ${blue('- step')} ${white(bold(step.stepId))}` : ''}`,
|
|
161
|
+
(0, cli_outputs_1.printStepDetails)({
|
|
162
|
+
testNameToDisplay: `${requestData?.method.toUpperCase()} ${(0, colorette_1.white)(requestUrl)}${step.stepId ? ` ${(0, colorette_1.blue)('- step')} ${(0, colorette_1.white)((0, colorette_1.bold)(step.stepId))}` : ''}`,
|
|
160
163
|
checks: step.checks,
|
|
161
164
|
verboseLogs,
|
|
162
165
|
verboseResponseLogs,
|
|
163
166
|
});
|
|
164
167
|
}
|
|
165
168
|
else {
|
|
166
|
-
printUnknownStep(step);
|
|
169
|
+
(0, cli_outputs_1.printUnknownStep)(step);
|
|
167
170
|
}
|
|
168
171
|
if (!allChecksPassed) {
|
|
169
172
|
const result = await runActions(failureActionsToRun, 'failure');
|
|
@@ -189,7 +192,7 @@ export async function runStep({ step, ctx, workflowId, retriesLeft, }) {
|
|
|
189
192
|
if (action.workflowId && action.stepId) {
|
|
190
193
|
throw new Error(`Cannot use both workflowId: ${action.workflowId} and stepId: ${action.stepId} in ${action.type} action`);
|
|
191
194
|
}
|
|
192
|
-
const matchesCriteria = checkCriteria({
|
|
195
|
+
const matchesCriteria = (0, success_criteria_1.checkCriteria)({
|
|
193
196
|
workflowId: workflowId,
|
|
194
197
|
step,
|
|
195
198
|
criteria,
|
|
@@ -197,10 +200,10 @@ export async function runStep({ step, ctx, workflowId, retriesLeft, }) {
|
|
|
197
200
|
}).every((check) => check.passed);
|
|
198
201
|
if (matchesCriteria) {
|
|
199
202
|
const targetWorkflow = action.workflowId
|
|
200
|
-
? getValueFromContext(action.workflowId, ctx)
|
|
203
|
+
? (0, config_parser_1.getValueFromContext)(action.workflowId, ctx)
|
|
201
204
|
: undefined;
|
|
202
205
|
const targetCtx = action.workflowId
|
|
203
|
-
? await resolveWorkflowContext(action.workflowId, targetWorkflow, ctx)
|
|
206
|
+
? await (0, runner_1.resolveWorkflowContext)(action.workflowId, targetWorkflow, ctx)
|
|
204
207
|
: { ...ctx, executedSteps: [] };
|
|
205
208
|
const targetStep = action.stepId ? action.stepId : undefined;
|
|
206
209
|
if (type === 'retry') {
|
|
@@ -210,12 +213,12 @@ export async function runStep({ step, ctx, workflowId, retriesLeft, }) {
|
|
|
210
213
|
if (retriesLeft === 0) {
|
|
211
214
|
return { retriesLeft: 0, shouldEnd: false };
|
|
212
215
|
}
|
|
213
|
-
await delay(retryAfter);
|
|
216
|
+
await (0, delay_1.delay)(retryAfter);
|
|
214
217
|
if (targetWorkflow || targetStep) {
|
|
215
|
-
printActionsSeparator(stepId, action.name, kind);
|
|
218
|
+
(0, cli_outputs_1.printActionsSeparator)(stepId, action.name, kind);
|
|
216
219
|
}
|
|
217
220
|
if (targetWorkflow) {
|
|
218
|
-
const stepWorkflowResult = await runWorkflow({
|
|
221
|
+
const stepWorkflowResult = await (0, runner_1.runWorkflow)({
|
|
219
222
|
workflowInput: targetWorkflow,
|
|
220
223
|
ctx: targetCtx,
|
|
221
224
|
skipLineSeparator: true,
|
|
@@ -234,7 +237,7 @@ export async function runStep({ step, ctx, workflowId, retriesLeft, }) {
|
|
|
234
237
|
workflowId,
|
|
235
238
|
});
|
|
236
239
|
}
|
|
237
|
-
logger.log(`\n Retrying step ${blue(stepId)} (${retryLimit - retriesLeft + 1}/${retryLimit})\n`);
|
|
240
|
+
logger.log(`\n Retrying step ${(0, colorette_1.blue)(stepId)} (${retryLimit - retriesLeft + 1}/${retryLimit})\n`);
|
|
238
241
|
return {
|
|
239
242
|
stepResult: await runStep({
|
|
240
243
|
step,
|
|
@@ -253,9 +256,9 @@ export async function runStep({ step, ctx, workflowId, retriesLeft, }) {
|
|
|
253
256
|
throw new Error('Either workflowId or stepId must be provided in goto action');
|
|
254
257
|
}
|
|
255
258
|
if (targetWorkflow || targetStep) {
|
|
256
|
-
printActionsSeparator(stepId, action.name, kind);
|
|
259
|
+
(0, cli_outputs_1.printActionsSeparator)(stepId, action.name, kind);
|
|
257
260
|
}
|
|
258
|
-
const stepWorkflowResult = await runWorkflow({
|
|
261
|
+
const stepWorkflowResult = await (0, runner_1.runWorkflow)({
|
|
259
262
|
workflowInput: targetWorkflow || workflow,
|
|
260
263
|
ctx: targetCtx,
|
|
261
264
|
fromStepId: targetStep,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run-step.js","sourceRoot":"","sources":["../../../src/modules/flow-runner/run-step.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"run-step.js","sourceRoot":"","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IAAI,EAAE,CAAC;gBAC7B,CAAC;gBACD,gCAAgC;gBAChC,MAAM;YACR,CAAC;QACH,CAAC;QAED,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;YACvB,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;QAC7B,CAAC;IACH,CAAC;AACH,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { CollectFn } from '@redocly/openapi-core';
|
|
2
|
-
import type { TestContext, RunArgv, Workflow, RunWorkflowInput, WorkflowExecutionResult } from '../../types
|
|
1
|
+
import type { CollectFn } from '@redocly/openapi-core/src/utils';
|
|
2
|
+
import type { TestContext, RunArgv, Workflow, RunWorkflowInput, WorkflowExecutionResult } from '../../types';
|
|
3
3
|
export declare function runTestFile(argv: RunArgv, output: {
|
|
4
4
|
harFile?: string;
|
|
5
5
|
jsonFile?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runner.d.ts","sourceRoot":"","sources":["../../../src/modules/flow-runner/runner.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"runner.d.ts","sourceRoot":"","sources":["../../../src/modules/flow-runner/runner.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,KAAK,EAGV,WAAW,EACX,OAAO,EACP,QAAQ,EAGR,gBAAgB,EAChB,uBAAuB,EACxB,MAAM,aAAa,CAAC;AAIrB,wBAAsB,WAAW,CAC/B,IAAI,EAAE,OAAO,EACb,MAAM,EAAE;IAAE,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE,EAC/C,eAAe,CAAC,EAAE,SAAS;;;;GA4C5B;AAmCD,wBAAsB,WAAW,CAAC,EAChC,aAAa,EACb,GAAG,EACH,UAAU,EACV,iBAAiB,EACjB,YAAY,EACZ,iBAAiB,GAClB,EAAE,gBAAgB,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAgHrD;AA2BD,wBAAsB,sBAAsB,CAC1C,UAAU,EAAE,MAAM,GAAG,SAAS,EAC9B,gBAAgB,EAAE,QAAQ,EAC1B,GAAG,EAAE,WAAW,wBA+BjB"}
|
|
@@ -1,22 +1,27 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
const
|
|
19
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.runTestFile = runTestFile;
|
|
4
|
+
exports.runWorkflow = runWorkflow;
|
|
5
|
+
exports.resolveWorkflowContext = resolveWorkflowContext;
|
|
6
|
+
const colorette_1 = require("colorette");
|
|
7
|
+
const node_path_1 = require("node:path");
|
|
8
|
+
const node_fs_1 = require("node:fs");
|
|
9
|
+
const har_logs_1 = require("../../utils/har-logs");
|
|
10
|
+
const api_fetcher_1 = require("../../utils/api-fetcher");
|
|
11
|
+
const create_test_context_1 = require("./context/create-test-context");
|
|
12
|
+
const config_parser_1 = require("../config-parser");
|
|
13
|
+
const get_workflows_to_run_1 = require("./get-workflows-to-run");
|
|
14
|
+
const run_step_1 = require("./run-step");
|
|
15
|
+
const cli_outputs_1 = require("../../utils/cli-outputs");
|
|
16
|
+
const get_test_description_from_file_1 = require("./get-test-description-from-file");
|
|
17
|
+
const checks_1 = require("../checks");
|
|
18
|
+
const context_1 = require("./context");
|
|
19
|
+
const runtime_expressions_1 = require("../runtime-expressions");
|
|
20
|
+
const cli_output_1 = require("../cli-output");
|
|
21
|
+
const resolve_running_workflows_1 = require("./resolve-running-workflows");
|
|
22
|
+
const logger_1 = require("../../utils/logger/logger");
|
|
23
|
+
const logger = logger_1.DefaultLogger.getInstance();
|
|
24
|
+
async function runTestFile(argv, output, collectSpecData) {
|
|
20
25
|
const { file: filePath, workflow, verbose, input, skip, server, 'har-output': harOutput, 'json-output': jsonOutput, severity, } = argv;
|
|
21
26
|
const options = {
|
|
22
27
|
workflowPath: filePath, // filePath or documentPath
|
|
@@ -35,26 +40,26 @@ export async function runTestFile(argv, output, collectSpecData) {
|
|
|
35
40
|
caCert: argv['ca-cert'],
|
|
36
41
|
},
|
|
37
42
|
};
|
|
38
|
-
const bundledTestDescription = await bundleArazzo(filePath, collectSpecData);
|
|
43
|
+
const bundledTestDescription = await (0, get_test_description_from_file_1.bundleArazzo)(filePath, collectSpecData);
|
|
39
44
|
const result = await runWorkflows(bundledTestDescription, options);
|
|
40
45
|
if (output?.harFile && Object.keys(result.harLogs).length) {
|
|
41
|
-
const parsedHarLogs = maskSecrets(result.harLogs, result.ctx.secretFields || new Set());
|
|
42
|
-
writeFileSync(output.harFile, JSON.stringify(parsedHarLogs, null, 2), 'utf-8');
|
|
43
|
-
logger.log(blue(`Har logs saved in ${green(output.harFile)}`));
|
|
46
|
+
const parsedHarLogs = (0, cli_output_1.maskSecrets)(result.harLogs, result.ctx.secretFields || new Set());
|
|
47
|
+
(0, node_fs_1.writeFileSync)(output.harFile, JSON.stringify(parsedHarLogs, null, 2), 'utf-8');
|
|
48
|
+
logger.log((0, colorette_1.blue)(`Har logs saved in ${(0, colorette_1.green)(output.harFile)}`));
|
|
44
49
|
logger.printNewLine();
|
|
45
50
|
logger.printNewLine();
|
|
46
51
|
}
|
|
47
52
|
return result;
|
|
48
53
|
}
|
|
49
54
|
async function runWorkflows(testDescription, options) {
|
|
50
|
-
const harLogs = options?.harOutput && createHarLog();
|
|
51
|
-
const apiClient = new ApiFetcher({
|
|
55
|
+
const harLogs = options?.harOutput && (0, har_logs_1.createHarLog)();
|
|
56
|
+
const apiClient = new api_fetcher_1.ApiFetcher({
|
|
52
57
|
harLogs,
|
|
53
58
|
});
|
|
54
|
-
const ctx = await createTestContext(testDescription, options, apiClient);
|
|
55
|
-
const workflowsToRun = resolveRunningWorkflows(options.workflow);
|
|
56
|
-
const workflowsToSkip = resolveRunningWorkflows(options.skip);
|
|
57
|
-
const workflows = getWorkflowsToRun(ctx.workflows, workflowsToRun, workflowsToSkip);
|
|
59
|
+
const ctx = await (0, create_test_context_1.createTestContext)(testDescription, options, apiClient);
|
|
60
|
+
const workflowsToRun = (0, resolve_running_workflows_1.resolveRunningWorkflows)(options.workflow);
|
|
61
|
+
const workflowsToSkip = (0, resolve_running_workflows_1.resolveRunningWorkflows)(options.skip);
|
|
62
|
+
const workflows = (0, get_workflows_to_run_1.getWorkflowsToRun)(ctx.workflows, workflowsToRun, workflowsToSkip);
|
|
58
63
|
const executedWorkflows = [];
|
|
59
64
|
for (const workflow of workflows) {
|
|
60
65
|
ctx.executedSteps = [];
|
|
@@ -70,28 +75,31 @@ async function runWorkflows(testDescription, options) {
|
|
|
70
75
|
}
|
|
71
76
|
return { ctx, harLogs, executedWorkflows };
|
|
72
77
|
}
|
|
73
|
-
|
|
78
|
+
async function runWorkflow({ workflowInput, ctx, fromStepId, skipLineSeparator, parentStepId, invocationContext, }) {
|
|
74
79
|
const workflowStartTime = performance.now();
|
|
75
|
-
const fileBaseName = basename(ctx.options.workflowPath);
|
|
80
|
+
const fileBaseName = (0, node_path_1.basename)(ctx.options.workflowPath);
|
|
76
81
|
const workflow = typeof workflowInput === 'string'
|
|
77
82
|
? ctx.workflows.find((w) => w.workflowId === workflowInput)
|
|
78
83
|
: workflowInput;
|
|
79
84
|
if (!workflow) {
|
|
80
|
-
throw new Error(`\n ${blue('Workflow')} ${workflowInput} ${blue('not found')} \n`);
|
|
85
|
+
throw new Error(`\n ${(0, colorette_1.blue)('Workflow')} ${workflowInput} ${(0, colorette_1.blue)('not found')} \n`);
|
|
81
86
|
}
|
|
82
87
|
const workflowId = workflow.workflowId;
|
|
83
88
|
if (!fromStepId) {
|
|
84
|
-
printWorkflowSeparator(fileBaseName, workflowId, skipLineSeparator);
|
|
89
|
+
(0, cli_outputs_1.printWorkflowSeparator)(fileBaseName, workflowId, skipLineSeparator);
|
|
85
90
|
}
|
|
86
91
|
const fromStepIndex = fromStepId
|
|
87
92
|
? workflow.steps.findIndex((step) => step.stepId === fromStepId)
|
|
88
93
|
: 0;
|
|
94
|
+
// if (fromStepId && fromStepIndex === -1) {
|
|
95
|
+
// throw new Error(`\n ${blue('Step')} ${fromStepId} ${blue('not found')} \n`);
|
|
96
|
+
// }
|
|
89
97
|
const workflowSteps = workflow.steps.slice(fromStepIndex);
|
|
90
98
|
// clean $steps ctx before running workflow steps
|
|
91
99
|
ctx.$steps = {};
|
|
92
100
|
for (const step of workflowSteps) {
|
|
93
101
|
try {
|
|
94
|
-
const stepResult = await runStep({
|
|
102
|
+
const stepResult = await (0, run_step_1.runStep)({
|
|
95
103
|
step,
|
|
96
104
|
ctx,
|
|
97
105
|
workflowId,
|
|
@@ -103,7 +111,7 @@ export async function runWorkflow({ workflowInput, ctx, fromStepId, skipLineSepa
|
|
|
103
111
|
}
|
|
104
112
|
catch (err) {
|
|
105
113
|
const failedCall = {
|
|
106
|
-
name: CHECKS.UNEXPECTED_ERROR,
|
|
114
|
+
name: checks_1.CHECKS.UNEXPECTED_ERROR,
|
|
107
115
|
message: err.message,
|
|
108
116
|
passed: false,
|
|
109
117
|
severity: ctx.severity['UNEXPECTED_ERROR'],
|
|
@@ -111,7 +119,7 @@ export async function runWorkflow({ workflowInput, ctx, fromStepId, skipLineSepa
|
|
|
111
119
|
step.checks.push(failedCall);
|
|
112
120
|
}
|
|
113
121
|
}
|
|
114
|
-
const hasFailedTimeoutSteps = workflow.steps.some((step) => step.checks?.some((check) => !check.passed && check.name == CHECKS.GLOBAL_TIMEOUT_ERROR));
|
|
122
|
+
const hasFailedTimeoutSteps = workflow.steps.some((step) => step.checks?.some((check) => !check.passed && check.name == checks_1.CHECKS.GLOBAL_TIMEOUT_ERROR));
|
|
115
123
|
// workflow level outputs
|
|
116
124
|
if (workflow.outputs && workflowId && !hasFailedTimeoutSteps) {
|
|
117
125
|
if (!ctx.$outputs) {
|
|
@@ -120,7 +128,7 @@ export async function runWorkflow({ workflowInput, ctx, fromStepId, skipLineSepa
|
|
|
120
128
|
if (!ctx.$outputs[workflowId]) {
|
|
121
129
|
ctx.$outputs[workflowId] = {};
|
|
122
130
|
}
|
|
123
|
-
const runtimeExpressionContext = createRuntimeExpressionCtx({
|
|
131
|
+
const runtimeExpressionContext = (0, context_1.createRuntimeExpressionCtx)({
|
|
124
132
|
ctx: {
|
|
125
133
|
...ctx,
|
|
126
134
|
$inputs: {
|
|
@@ -133,7 +141,7 @@ export async function runWorkflow({ workflowInput, ctx, fromStepId, skipLineSepa
|
|
|
133
141
|
const outputs = {};
|
|
134
142
|
for (const outputKey of Object.keys(workflow.outputs)) {
|
|
135
143
|
try {
|
|
136
|
-
outputs[outputKey] = evaluateRuntimeExpressionPayload({
|
|
144
|
+
outputs[outputKey] = (0, runtime_expressions_1.evaluateRuntimeExpressionPayload)({
|
|
137
145
|
payload: workflow.outputs[outputKey],
|
|
138
146
|
context: runtimeExpressionContext,
|
|
139
147
|
});
|
|
@@ -165,29 +173,29 @@ async function handleDependsOn({ workflow, ctx }) {
|
|
|
165
173
|
if (!workflow.dependsOn?.length)
|
|
166
174
|
return;
|
|
167
175
|
const dependenciesWorkflows = await Promise.all(workflow.dependsOn.map(async (workflowId) => {
|
|
168
|
-
const resolvedWorkflow = getValueFromContext(workflowId, ctx);
|
|
176
|
+
const resolvedWorkflow = (0, config_parser_1.getValueFromContext)(workflowId, ctx);
|
|
169
177
|
const workflowCtx = await resolveWorkflowContext(workflowId, resolvedWorkflow, ctx);
|
|
170
|
-
printRequiredWorkflowSeparator(workflow.workflowId);
|
|
178
|
+
(0, cli_outputs_1.printRequiredWorkflowSeparator)(workflow.workflowId);
|
|
171
179
|
return runWorkflow({
|
|
172
180
|
workflowInput: resolvedWorkflow,
|
|
173
181
|
ctx: workflowCtx,
|
|
174
182
|
skipLineSeparator: true,
|
|
175
183
|
});
|
|
176
184
|
}));
|
|
177
|
-
const totals = calculateTotals(dependenciesWorkflows);
|
|
185
|
+
const totals = (0, cli_output_1.calculateTotals)(dependenciesWorkflows);
|
|
178
186
|
const hasProblems = totals.steps.failed > 0;
|
|
179
187
|
if (hasProblems) {
|
|
180
188
|
throw new Error('Dependent workflows has failed steps');
|
|
181
189
|
}
|
|
182
190
|
}
|
|
183
|
-
|
|
191
|
+
async function resolveWorkflowContext(workflowId, resolvedWorkflow, ctx) {
|
|
184
192
|
const sourceDescriptionId = workflowId && workflowId.startsWith('$sourceDescriptions.') && workflowId.split('.')[1];
|
|
185
193
|
const testDescription = sourceDescriptionId && ctx.$sourceDescriptions[sourceDescriptionId];
|
|
186
194
|
// executing external workflow should not mutate the original context
|
|
187
195
|
// only outputs are transferred to the parent workflow
|
|
188
196
|
// creating the new ctx for the external workflow or recreate current ctx for local workflow
|
|
189
197
|
return testDescription
|
|
190
|
-
? await createTestContext(testDescription, {
|
|
198
|
+
? await (0, create_test_context_1.createTestContext)(testDescription, {
|
|
191
199
|
workflowPath: findSourceDescriptionUrl(sourceDescriptionId, ctx.sourceDescriptions, ctx.options),
|
|
192
200
|
workflow: [resolvedWorkflow.workflowId],
|
|
193
201
|
skip: undefined,
|
|
@@ -210,7 +218,7 @@ function findSourceDescriptionUrl(sourceDescriptionId, sourceDescriptions, optio
|
|
|
210
218
|
return sourceDescription.url;
|
|
211
219
|
}
|
|
212
220
|
else if (sourceDescription.type === 'arazzo') {
|
|
213
|
-
return resolve(dirname(options.workflowPath), sourceDescription.url);
|
|
221
|
+
return (0, node_path_1.resolve)((0, node_path_1.dirname)(options.workflowPath), sourceDescription.url);
|
|
214
222
|
}
|
|
215
223
|
else {
|
|
216
224
|
throw new Error(`Unknown source description type ${sourceDescription.type}`);
|