@redocly/respect-core 1.34.4 → 2.0.0-next.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +20 -7
- package/lib/arazzo-schema.d.ts +874 -2
- package/lib/arazzo-schema.d.ts.map +1 -1
- package/lib/arazzo-schema.js +102 -35
- package/lib/arazzo-schema.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 +14 -17
- 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 +2 -18
- package/lib/handlers/index.js.map +1 -1
- package/lib/handlers/run.d.ts +4 -2
- package/lib/handlers/run.d.ts.map +1 -1
- package/lib/handlers/run.js +21 -24
- 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 +1 -6
- 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 +1 -4
- 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 +11 -38
- 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 +5 -8
- 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 -6
- 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 +6 -32
- 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 +1 -4
- 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 +3 -3
- 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 +5 -8
- 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 +2 -3
- 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 +7 -10
- 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 +8 -24
- package/lib/modules/arazzo-description-generator/index.js.map +1 -1
- package/lib/modules/checks/checks.js +1 -4
- 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 +2 -18
- 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 +6 -10
- 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 +1 -4
- 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 +36 -39
- 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 +18 -21
- 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 +25 -51
- 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 +29 -55
- 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 +8 -24
- 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 +5 -8
- package/lib/modules/cli-output/json-logs.js.map +1 -1
- package/lib/modules/cli-output/mask-secrets.d.ts.map +1 -1
- package/lib/modules/cli-output/mask-secrets.js +12 -8
- 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 +1 -4
- package/lib/modules/cli-output/verbose-logs.js.map +1 -1
- package/lib/modules/context-parser/get-security-parameters.d.ts +5 -0
- package/lib/modules/context-parser/get-security-parameters.d.ts.map +1 -0
- package/lib/modules/context-parser/get-security-parameters.js +54 -0
- package/lib/modules/context-parser/get-security-parameters.js.map +1 -0
- package/lib/modules/{config-parser → context-parser}/get-value-from-context.d.ts +1 -1
- package/lib/modules/context-parser/get-value-from-context.d.ts.map +1 -0
- package/lib/modules/{config-parser → context-parser}/get-value-from-context.js +14 -21
- package/lib/modules/context-parser/get-value-from-context.js.map +1 -0
- package/lib/modules/{config-parser → context-parser}/handle-request-body-replacements.d.ts +1 -1
- package/lib/modules/context-parser/handle-request-body-replacements.d.ts.map +1 -0
- package/lib/modules/{config-parser → context-parser}/handle-request-body-replacements.js +4 -7
- package/lib/modules/context-parser/handle-request-body-replacements.js.map +1 -0
- package/lib/modules/context-parser/index.d.ts +7 -0
- package/lib/modules/context-parser/index.d.ts.map +1 -0
- package/lib/modules/context-parser/index.js +7 -0
- package/lib/modules/context-parser/index.js.map +1 -0
- package/lib/modules/{config-parser → context-parser}/parse-parameters.d.ts +1 -1
- package/lib/modules/context-parser/parse-parameters.d.ts.map +1 -0
- package/lib/modules/{config-parser → context-parser}/parse-parameters.js +2 -6
- package/lib/modules/context-parser/parse-parameters.js.map +1 -0
- package/lib/modules/{config-parser → context-parser}/parse-request-body.d.ts +2 -2
- package/lib/modules/context-parser/parse-request-body.d.ts.map +1 -0
- package/lib/modules/{config-parser → context-parser}/parse-request-body.js +15 -38
- package/lib/modules/context-parser/parse-request-body.js.map +1 -0
- package/lib/modules/{config-parser → context-parser}/resolve-reusable-component.d.ts +1 -1
- package/lib/modules/context-parser/resolve-reusable-component.d.ts.map +1 -0
- package/lib/modules/context-parser/resolve-reusable-component.js +5 -0
- package/lib/modules/context-parser/resolve-reusable-component.js.map +1 -0
- package/lib/modules/{config-parser → context-parser}/resolve-reusable-object-reference.d.ts +1 -1
- package/lib/modules/context-parser/resolve-reusable-object-reference.d.ts.map +1 -0
- package/lib/modules/{config-parser → context-parser}/resolve-reusable-object-reference.js +3 -6
- package/lib/modules/context-parser/resolve-reusable-object-reference.js.map +1 -0
- package/lib/modules/description-parser/bundle-openapi.js +11 -14
- package/lib/modules/description-parser/bundle-openapi.js.map +1 -1
- package/lib/modules/description-parser/extract-first-example.js +1 -4
- 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 +6 -7
- 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 +7 -8
- 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 +6 -10
- 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 +1 -4
- 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 +11 -14
- package/lib/modules/description-parser/get-request-data-from-openapi.js.map +1 -1
- package/lib/modules/description-parser/get-response-schema.js +1 -4
- 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 +9 -25
- 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 +1 -4
- package/lib/modules/description-parser/remove-write-only-properties.js.map +1 -1
- package/lib/modules/faker.js +17 -20
- 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 +12 -15
- 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 +1 -5
- 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 +25 -29
- 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 +4 -20
- 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 +1 -4
- 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 +6 -9
- package/lib/modules/flow-runner/context/set-public-workflows.js.map +1 -1
- package/lib/modules/flow-runner/error-message-matcher.js +3 -6
- 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 +6 -9
- package/lib/modules/flow-runner/get-server-url.js.map +1 -1
- package/lib/modules/flow-runner/get-test-description-from-file.d.ts +2 -21
- 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 +24 -47
- 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 +6 -9
- 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 +15 -31
- package/lib/modules/flow-runner/index.js.map +1 -1
- package/lib/modules/flow-runner/inputs/format-cli-inputs.js +1 -4
- 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 +2 -18
- 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 +3 -9
- 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 +1 -17
- package/lib/modules/flow-runner/outputs/index.js.map +1 -1
- package/lib/modules/flow-runner/outputs/print-message.js +9 -14
- package/lib/modules/flow-runner/outputs/print-message.js.map +1 -1
- package/lib/modules/flow-runner/prepare-request.d.ts +7 -4
- package/lib/modules/flow-runner/prepare-request.d.ts.map +1 -1
- package/lib/modules/flow-runner/prepare-request.js +31 -24
- package/lib/modules/flow-runner/prepare-request.js.map +1 -1
- package/lib/modules/flow-runner/read-env-variables.js +4 -30
- package/lib/modules/flow-runner/read-env-variables.js.map +1 -1
- package/lib/modules/flow-runner/resolve-running-workflows.js +1 -4
- package/lib/modules/flow-runner/resolve-running-workflows.js.map +1 -1
- package/lib/modules/flow-runner/resolve-x-security-parameters.d.ts +15 -0
- package/lib/modules/flow-runner/resolve-x-security-parameters.d.ts.map +1 -0
- package/lib/modules/flow-runner/resolve-x-security-parameters.js +37 -0
- package/lib/modules/flow-runner/resolve-x-security-parameters.js.map +1 -0
- 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 +48 -54
- 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 +50 -52
- 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 +1 -17
- 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 +24 -30
- 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 +19 -22
- 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 +2 -18
- 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 +6 -12
- package/lib/modules/flow-runner/success-criteria/validate-success-criteria.js.map +1 -1
- package/lib/modules/flow-runner/validate-x-security-parameters.d.ts +6 -0
- package/lib/modules/flow-runner/validate-x-security-parameters.d.ts.map +1 -0
- package/lib/modules/flow-runner/validate-x-security-parameters.js +24 -0
- package/lib/modules/flow-runner/validate-x-security-parameters.js.map +1 -0
- package/lib/modules/runtime-expressions/abnf-parser.cjs +1993 -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 +14 -19
- 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 +1 -17
- 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 +4 -5
- package/lib/modules/runtime-expressions/lint.js.map +1 -1
- package/lib/modules/runtime-expressions/replace-json-pointers.js +3 -6
- package/lib/modules/runtime-expressions/replace-json-pointers.js.map +1 -1
- package/lib/modules/timeout-timer/timer.d.ts +3 -1
- package/lib/modules/timeout-timer/timer.d.ts.map +1 -1
- package/lib/modules/timeout-timer/timer.js +9 -14
- package/lib/modules/timeout-timer/timer.js.map +1 -1
- package/lib/types.d.ts +11 -9
- package/lib/types.d.ts.map +1 -1
- package/lib/types.js +1 -2
- 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 +5 -11
- package/lib/utils/ajv-errors.js.map +1 -1
- package/lib/utils/api-fetcher.d.ts +9 -3
- package/lib/utils/api-fetcher.d.ts.map +1 -1
- package/lib/utils/api-fetcher.js +280 -209
- package/lib/utils/api-fetcher.js.map +1 -1
- package/lib/utils/check-circular-refs-in-schema.js +1 -4
- package/lib/utils/check-circular-refs-in-schema.js.map +1 -1
- package/lib/utils/clean-colors.js +1 -4
- 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 +25 -39
- package/lib/utils/cli-outputs.js.map +1 -1
- package/lib/utils/delay.js +1 -4
- package/lib/utils/delay.js.map +1 -1
- package/lib/utils/digest-auth/generate-digest-auth-header.d.ts +36 -0
- package/lib/utils/digest-auth/generate-digest-auth-header.d.ts.map +1 -0
- package/lib/utils/digest-auth/generate-digest-auth-header.js +70 -0
- package/lib/utils/digest-auth/generate-digest-auth-header.js.map +1 -0
- package/lib/utils/digest-auth/parse-www-authenticate-header.d.ts +10 -0
- package/lib/utils/digest-auth/parse-www-authenticate-header.d.ts.map +1 -0
- package/lib/utils/digest-auth/parse-www-authenticate-header.js +17 -0
- package/lib/utils/digest-auth/parse-www-authenticate-header.js.map +1 -0
- package/lib/utils/env.js +2 -6
- 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 +3 -11
- package/lib/utils/exit-with-error.js.map +1 -1
- package/lib/utils/file.js +1 -4
- package/lib/utils/file.js.map +1 -1
- package/lib/utils/get-nested-value.js +1 -4
- package/lib/utils/get-nested-value.js.map +1 -1
- package/lib/utils/har-logs/create-har-log.js +2 -5
- package/lib/utils/har-logs/create-har-log.js.map +1 -1
- package/lib/utils/har-logs/helpers/add-headers.js +1 -4
- package/lib/utils/har-logs/helpers/add-headers.js.map +1 -1
- package/lib/utils/har-logs/helpers/build-headers.js +1 -4
- package/lib/utils/har-logs/helpers/build-headers.js.map +1 -1
- package/lib/utils/har-logs/helpers/build-params.js +2 -28
- package/lib/utils/har-logs/helpers/build-params.js.map +1 -1
- package/lib/utils/har-logs/helpers/build-request-cookies.js +2 -28
- package/lib/utils/har-logs/helpers/build-request-cookies.js.map +1 -1
- package/lib/utils/har-logs/helpers/build-response-cookies.js +2 -28
- package/lib/utils/har-logs/helpers/build-response-cookies.js.map +1 -1
- package/lib/utils/har-logs/helpers/get-agent.js +12 -38
- package/lib/utils/har-logs/helpers/get-agent.js.map +1 -1
- package/lib/utils/har-logs/helpers/get-duration.js +1 -4
- package/lib/utils/har-logs/helpers/get-duration.js.map +1 -1
- package/lib/utils/har-logs/helpers/get-input-url.js +1 -4
- package/lib/utils/har-logs/helpers/get-input-url.js.map +1 -1
- package/lib/utils/har-logs/helpers/handle-request.js +1 -4
- 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 +2 -18
- package/lib/utils/har-logs/index.js.map +1 -1
- package/lib/utils/har-logs/with-har.js +24 -51
- package/lib/utils/har-logs/with-har.js.map +1 -1
- package/lib/utils/is-empty.js +1 -4
- package/lib/utils/is-empty.js.map +1 -1
- package/lib/utils/is-json.js +1 -4
- package/lib/utils/is-json.js.map +1 -1
- package/lib/utils/is-url.js +1 -4
- package/lib/utils/is-url.js.map +1 -1
- package/lib/utils/logger/logger.js +3 -8
- 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 +3 -6
- 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 +3 -29
- package/lib/utils/mtls/resolve-mtls-certificates.js.map +1 -1
- package/lib/utils/package.d.ts +2 -0
- package/lib/utils/package.d.ts.map +1 -0
- package/lib/utils/package.js +4 -0
- package/lib/utils/package.js.map +1 -0
- package/lib/utils/sort.js +1 -4
- package/lib/utils/sort.js.map +1 -1
- package/lib/utils/time.js +1 -4
- package/lib/utils/time.js.map +1 -1
- package/lib/utils/url.js +1 -4
- package/lib/utils/url.js.map +1 -1
- package/lib/utils/yaml.js +11 -16
- package/lib/utils/yaml.js.map +1 -1
- package/package.json +7 -7
- package/lib/consts.d.ts +0 -4
- package/lib/consts.d.ts.map +0 -1
- package/lib/consts.js +0 -7
- package/lib/consts.js.map +0 -1
- package/lib/modules/config-parser/get-value-from-context.d.ts.map +0 -1
- package/lib/modules/config-parser/get-value-from-context.js.map +0 -1
- package/lib/modules/config-parser/handle-request-body-replacements.d.ts.map +0 -1
- package/lib/modules/config-parser/handle-request-body-replacements.js.map +0 -1
- package/lib/modules/config-parser/index.d.ts +0 -7
- package/lib/modules/config-parser/index.d.ts.map +0 -1
- package/lib/modules/config-parser/index.js +0 -23
- package/lib/modules/config-parser/index.js.map +0 -1
- package/lib/modules/config-parser/parse-parameters.d.ts.map +0 -1
- package/lib/modules/config-parser/parse-parameters.js.map +0 -1
- package/lib/modules/config-parser/parse-request-body.d.ts.map +0 -1
- package/lib/modules/config-parser/parse-request-body.js.map +0 -1
- package/lib/modules/config-parser/resolve-reusable-component.d.ts.map +0 -1
- package/lib/modules/config-parser/resolve-reusable-component.js +0 -8
- package/lib/modules/config-parser/resolve-reusable-component.js.map +0 -1
- package/lib/modules/config-parser/resolve-reusable-object-reference.d.ts.map +0 -1
- package/lib/modules/config-parser/resolve-reusable-object-reference.js.map +0 -1
- package/lib/modules/runtime-expressions/abnf-parser.d.ts +0 -15
- package/lib/modules/runtime-expressions/abnf-parser.d.ts.map +0 -1
- package/lib/modules/runtime-expressions/abnf-parser.js +0 -2012
- package/lib/modules/runtime-expressions/abnf-parser.js.map +0 -1
|
@@ -1,70 +1,47 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
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.bundleArazzo = bundleArazzo;
|
|
27
|
-
const colorette_1 = require("colorette");
|
|
28
|
-
const openapi_core_1 = require("@redocly/openapi-core");
|
|
29
|
-
const path = __importStar(require("node:path"));
|
|
30
|
-
const node_fs_1 = require("node:fs");
|
|
31
|
-
const cli_outputs_1 = require("../../utils/cli-outputs");
|
|
32
|
-
const package_json_1 = require("../../../package.json");
|
|
33
|
-
const file_1 = require("../../utils/file");
|
|
34
|
-
const yaml_1 = require("../../utils/yaml");
|
|
35
|
-
async function bundleArazzo(filePath, collectSpecData) {
|
|
1
|
+
import { bold, red } from 'colorette';
|
|
2
|
+
import { getTotals, formatProblems, lint, bundle, createConfig } from '@redocly/openapi-core';
|
|
3
|
+
import * as path from 'node:path';
|
|
4
|
+
import { existsSync } from 'node:fs';
|
|
5
|
+
import { printConfigLintTotals } from '../../utils/cli-outputs.js';
|
|
6
|
+
import { isTestFile } from '../../utils/file.js';
|
|
7
|
+
import { readYaml } from '../../utils/yaml.js';
|
|
8
|
+
import { version } from '../../utils/package.js';
|
|
9
|
+
export async function bundleArazzo(filePath, collectSpecData) {
|
|
36
10
|
const fileName = path.basename(filePath);
|
|
37
11
|
if (!fileName) {
|
|
38
12
|
throw new Error('Invalid file name');
|
|
39
13
|
}
|
|
40
|
-
if (!
|
|
14
|
+
if (!existsSync(filePath)) {
|
|
41
15
|
const relativePath = path.relative(process.cwd(), filePath);
|
|
42
16
|
throw new Error(`Could not find source description file '${fileName}' at path '${relativePath}'`);
|
|
43
17
|
}
|
|
44
|
-
const fileContent = await
|
|
45
|
-
if (!
|
|
18
|
+
const fileContent = await readYaml(filePath);
|
|
19
|
+
if (!isTestFile(fileName, fileContent)) {
|
|
46
20
|
throw new Error(`No test files found. File ${fileName} does not follows naming pattern "*.[yaml | yml | json]" or have not valid "Arazzo" description.`);
|
|
47
21
|
}
|
|
48
|
-
const config = await
|
|
22
|
+
const config = await createConfig({
|
|
49
23
|
extends: ['recommended-strict'],
|
|
50
24
|
arazzo1Rules: {
|
|
51
25
|
'no-criteria-xpath': 'error',
|
|
52
26
|
'respect-supported-versions': 'warn',
|
|
27
|
+
'no-x-security-scheme-name-without-openapi': 'error',
|
|
28
|
+
'x-security-scheme-required-values': 'error',
|
|
29
|
+
'no-x-security-scheme-name-in-workflow': 'error',
|
|
53
30
|
},
|
|
54
31
|
});
|
|
55
|
-
const lintProblems = await
|
|
32
|
+
const lintProblems = await lint({
|
|
56
33
|
ref: filePath,
|
|
57
34
|
config,
|
|
58
35
|
});
|
|
59
36
|
if (lintProblems.length) {
|
|
60
|
-
const fileTotals =
|
|
61
|
-
|
|
37
|
+
const fileTotals = getTotals(lintProblems);
|
|
38
|
+
formatProblems(lintProblems, {
|
|
62
39
|
totals: fileTotals,
|
|
63
|
-
version
|
|
40
|
+
version,
|
|
64
41
|
});
|
|
65
|
-
|
|
42
|
+
printConfigLintTotals(fileTotals);
|
|
66
43
|
}
|
|
67
|
-
const bundledDocument = await
|
|
44
|
+
const bundledDocument = await bundle({
|
|
68
45
|
ref: filePath,
|
|
69
46
|
config,
|
|
70
47
|
dereference: true,
|
|
@@ -72,8 +49,8 @@ async function bundleArazzo(filePath, collectSpecData) {
|
|
|
72
49
|
collectSpecData?.(bundledDocument.bundle.parsed || {});
|
|
73
50
|
const errorLintProblems = lintProblems.filter((problem) => problem.severity === 'error');
|
|
74
51
|
if (errorLintProblems.length) {
|
|
75
|
-
throw new Error(`${
|
|
52
|
+
throw new Error(`${red('Found errors in Arazzo description')} ${bold(fileName)}`);
|
|
76
53
|
}
|
|
77
|
-
return
|
|
54
|
+
return bundledDocument.bundle.parsed || {};
|
|
78
55
|
}
|
|
79
56
|
//# sourceMappingURL=get-test-description-from-file.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-test-description-from-file.js","sourceRoot":"","sources":["../../../src/modules/flow-runner/get-test-description-from-file.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"get-test-description-from-file.js","sourceRoot":"","sources":["../../../src/modules/flow-runner/get-test-description-from-file.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAE9F,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAEjD,MAAM,CAAC,KAAK,UAAU,YAAY,CAAC,QAAgB,EAAE,eAA2B;IAC9E,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAEzC,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,MAAM,IAAI,KAAK,CAAC,mBAAmB,CAAC,CAAC;IACvC,CAAC;IAED,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC1B,MAAM,YAAY,GAAG,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,QAAQ,CAAC,CAAC;QAC5D,MAAM,IAAI,KAAK,CACb,2CAA2C,QAAQ,cAAc,YAAY,GAAG,CACjF,CAAC;IACJ,CAAC;IAED,MAAM,WAAW,GAAG,MAAM,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAE7C,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE,WAAW,CAAC,EAAE,CAAC;QACvC,MAAM,IAAI,KAAK,CACb,6BAA6B,QAAQ,kGAAkG,CACxI,CAAC;IACJ,CAAC;IAED,MAAM,MAAM,GAAG,MAAM,YAAY,CAAC;QAChC,OAAO,EAAE,CAAC,oBAAoB,CAAC;QAC/B,YAAY,EAAE;YACZ,mBAAmB,EAAE,OAAO;YAC5B,4BAA4B,EAAE,MAAM;YACpC,2CAA2C,EAAE,OAAO;YACpD,mCAAmC,EAAE,OAAO;YAC5C,uCAAuC,EAAE,OAAO;SACjD;KACF,CAAC,CAAC;IAEH,MAAM,YAAY,GAAG,MAAM,IAAI,CAAC;QAC9B,GAAG,EAAE,QAAQ;QACb,MAAM;KACP,CAAC,CAAC;IAEH,IAAI,YAAY,CAAC,MAAM,EAAE,CAAC;QACxB,MAAM,UAAU,GAAG,SAAS,CAAC,YAAY,CAAC,CAAC;QAE3C,cAAc,CAAC,YAAY,EAAE;YAC3B,MAAM,EAAE,UAAU;YAClB,OAAO;SACR,CAAC,CAAC;QAEH,qBAAqB,CAAC,UAAU,CAAC,CAAC;IACpC,CAAC;IAED,MAAM,eAAe,GAAG,MAAM,MAAM,CAAC;QACnC,GAAG,EAAE,QAAQ;QACb,MAAM;QACN,WAAW,EAAE,IAAI;KAClB,CAAC,CAAC;IAEH,eAAe,EAAE,CAAC,eAAe,CAAC,MAAM,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC;IAEvD,MAAM,iBAAiB,GAAG,YAAY,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,QAAQ,KAAK,OAAO,CAAC,CAAC;IACzF,IAAI,iBAAiB,CAAC,MAAM,EAAE,CAAC;QAC7B,MAAM,IAAI,KAAK,CAAC,GAAG,GAAG,CAAC,oCAAoC,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;IACpF,CAAC;IAED,OAAO,eAAe,CAAC,MAAM,CAAC,MAAM,IAAI,EAAE,CAAC;AAC7C,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { Workflow } from '../../types';
|
|
1
|
+
import type { Workflow } from '../../types.js';
|
|
2
2
|
export declare function getWorkflowsToRun(workflows: Workflow[], workflowsToRun: string[] | undefined, workflowsToSkip: string[] | undefined): Workflow[];
|
|
3
3
|
//# sourceMappingURL=get-workflows-to-run.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-workflows-to-run.d.ts","sourceRoot":"","sources":["../../../src/modules/flow-runner/get-workflows-to-run.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"get-workflows-to-run.d.ts","sourceRoot":"","sources":["../../../src/modules/flow-runner/get-workflows-to-run.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAI/C,wBAAgB,iBAAiB,CAC/B,SAAS,EAAE,QAAQ,EAAE,EACrB,cAAc,EAAE,MAAM,EAAE,GAAG,SAAS,EACpC,eAAe,EAAE,MAAM,EAAE,GAAG,SAAS,GACpC,QAAQ,EAAE,CAYZ"}
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const logger_1 = require("../../utils/logger/logger");
|
|
6
|
-
const logger = logger_1.DefaultLogger.getInstance();
|
|
7
|
-
function getWorkflowsToRun(workflows, workflowsToRun, workflowsToSkip) {
|
|
1
|
+
import { red, yellow } from 'colorette';
|
|
2
|
+
import { DefaultLogger } from '../../utils/logger/logger.js';
|
|
3
|
+
const logger = DefaultLogger.getInstance();
|
|
4
|
+
export function getWorkflowsToRun(workflows, workflowsToRun, workflowsToSkip) {
|
|
8
5
|
let filteredWorkflows = [];
|
|
9
6
|
if (workflowsToRun && workflowsToRun.length) {
|
|
10
7
|
filteredWorkflows = filterWorkflowsToRun(workflows, workflowsToRun);
|
|
@@ -20,11 +17,11 @@ function getWorkflowsToRun(workflows, workflowsToRun, workflowsToSkip) {
|
|
|
20
17
|
function filterWorkflowsToSkip(workflows, workflowsToSkip) {
|
|
21
18
|
const workflowsToRun = workflows.filter((workflow) => !workflowsToSkip.includes(workflow.workflowId));
|
|
22
19
|
if (!workflowsToRun.length) {
|
|
23
|
-
logger.log(`${
|
|
20
|
+
logger.log(`${red('All workflows are skipped')}`);
|
|
24
21
|
logger.printNewLine();
|
|
25
22
|
return [];
|
|
26
23
|
}
|
|
27
|
-
logger.log(`${
|
|
24
|
+
logger.log(`${yellow(`Following workflows are skipped: ${workflowsToSkip.join(', ')}`)}`);
|
|
28
25
|
logger.printNewLine();
|
|
29
26
|
return workflowsToRun;
|
|
30
27
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-workflows-to-run.js","sourceRoot":"","sources":["../../../src/modules/flow-runner/get-workflows-to-run.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"get-workflows-to-run.js","sourceRoot":"","sources":["../../../src/modules/flow-runner/get-workflows-to-run.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAI7D,MAAM,MAAM,GAAG,aAAa,CAAC,WAAW,EAAE,CAAC;AAE3C,MAAM,UAAU,iBAAiB,CAC/B,SAAqB,EACrB,cAAoC,EACpC,eAAqC;IAErC,IAAI,iBAAiB,GAAe,EAAE,CAAC;IAEvC,IAAI,cAAc,IAAI,cAAc,CAAC,MAAM,EAAE,CAAC;QAC5C,iBAAiB,GAAG,oBAAoB,CAAC,SAAS,EAAE,cAAc,CAAC,CAAC;IACtE,CAAC;SAAM,IAAI,eAAe,IAAI,eAAe,CAAC,MAAM,EAAE,CAAC;QACrD,iBAAiB,GAAG,qBAAqB,CAAC,SAAS,EAAE,eAAe,CAAC,CAAC;IACxE,CAAC;SAAM,CAAC;QACN,iBAAiB,GAAG,SAAS,CAAC;IAChC,CAAC;IAED,OAAO,iBAAiB,CAAC;AAC3B,CAAC;AAED,SAAS,qBAAqB,CAAC,SAAqB,EAAE,eAAyB;IAC7E,MAAM,cAAc,GAAG,SAAS,CAAC,MAAM,CACrC,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,eAAe,CAAC,QAAQ,CAAC,QAAQ,CAAC,UAAU,CAAC,CAC7D,CAAC;IAEF,IAAI,CAAC,cAAc,CAAC,MAAM,EAAE,CAAC;QAC3B,MAAM,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC,2BAA2B,CAAC,EAAE,CAAC,CAAC;QAClD,MAAM,CAAC,YAAY,EAAE,CAAC;QACtB,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,MAAM,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,oCAAoC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;IAC1F,MAAM,CAAC,YAAY,EAAE,CAAC;IAEtB,OAAO,cAAc,CAAC;AACxB,CAAC;AAED,SAAS,oBAAoB,CAAC,SAAqB,EAAE,cAAwB;IAC3E,MAAM,iBAAiB,GAAG,oBAAoB,CAAC,SAAS,EAAE,cAAc,CAAC,CAAC;IAE1E,IAAI,CAAC,iBAAiB,CAAC,MAAM,EAAE,CAAC;QAC9B,MAAM,IAAI,KAAK,CAAC,oCAAoC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACnF,CAAC;IAED,IAAI,iBAAiB,CAAC,MAAM,KAAK,cAAc,CAAC,MAAM,EAAE,CAAC;QACvD,OAAO,iBAAiB,CAAC;IAC3B,CAAC;SAAM,CAAC;QACN,MAAM,oBAAoB,GAAG,cAAc,CAAC,MAAM,CAAC,CAAC,UAAU,EAAE,EAAE;YAChE,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,UAAU,KAAK,UAAU,CAAC,CAAC;QAC3E,CAAC,CAAC,CAAC;QAEH,MAAM,CAAC,GAAG,CAAC,oCAAoC,oBAAoB,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QAClF,OAAO,iBAAiB,CAAC;IAC3B,CAAC;AACH,CAAC;AAED,SAAS,oBAAoB,CAAC,SAAqB,EAAE,WAAqB;IACxE,OAAO,SAAS,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,WAAW,CAAC,QAAQ,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAC;AACnF,CAAC"}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
export * from './runner';
|
|
2
|
-
export * from './context';
|
|
3
|
-
export * from './get-workflows-to-run';
|
|
4
|
-
export * from './schema';
|
|
5
|
-
export * from './inputs';
|
|
6
|
-
export * from './outputs';
|
|
7
|
-
export * from '../checks';
|
|
8
|
-
export * from './error-message-matcher';
|
|
9
|
-
export * from './success-criteria';
|
|
10
|
-
export * from './get-server-url';
|
|
11
|
-
export * from './call-api-and-analyze-results';
|
|
12
|
-
export * from './run-step';
|
|
13
|
-
export * from './prepare-request';
|
|
14
|
-
export * from './read-env-variables';
|
|
15
|
-
export * from './resolve-running-workflows';
|
|
1
|
+
export * from './runner.js';
|
|
2
|
+
export * from './context/index.js';
|
|
3
|
+
export * from './get-workflows-to-run.js';
|
|
4
|
+
export * from './schema/index.js';
|
|
5
|
+
export * from './inputs/index.js';
|
|
6
|
+
export * from './outputs/index.js';
|
|
7
|
+
export * from '../checks/index.js';
|
|
8
|
+
export * from './error-message-matcher.js';
|
|
9
|
+
export * from './success-criteria/index.js';
|
|
10
|
+
export * from './get-server-url.js';
|
|
11
|
+
export * from './call-api-and-analyze-results.js';
|
|
12
|
+
export * from './run-step.js';
|
|
13
|
+
export * from './prepare-request.js';
|
|
14
|
+
export * from './read-env-variables.js';
|
|
15
|
+
export * from './resolve-running-workflows.js';
|
|
16
16
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/modules/flow-runner/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/modules/flow-runner/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC;AACnC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,qBAAqB,CAAC;AACpC,cAAc,mCAAmC,CAAC;AAClD,cAAc,eAAe,CAAC;AAC9B,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,gCAAgC,CAAC"}
|
|
@@ -1,32 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./runner"), exports);
|
|
18
|
-
__exportStar(require("./context"), exports);
|
|
19
|
-
__exportStar(require("./get-workflows-to-run"), exports);
|
|
20
|
-
__exportStar(require("./schema"), exports);
|
|
21
|
-
__exportStar(require("./inputs"), exports);
|
|
22
|
-
__exportStar(require("./outputs"), exports);
|
|
23
|
-
__exportStar(require("../checks"), exports);
|
|
24
|
-
__exportStar(require("./error-message-matcher"), exports);
|
|
25
|
-
__exportStar(require("./success-criteria"), exports);
|
|
26
|
-
__exportStar(require("./get-server-url"), exports);
|
|
27
|
-
__exportStar(require("./call-api-and-analyze-results"), exports);
|
|
28
|
-
__exportStar(require("./run-step"), exports);
|
|
29
|
-
__exportStar(require("./prepare-request"), exports);
|
|
30
|
-
__exportStar(require("./read-env-variables"), exports);
|
|
31
|
-
__exportStar(require("./resolve-running-workflows"), exports);
|
|
1
|
+
export * from './runner.js';
|
|
2
|
+
export * from './context/index.js';
|
|
3
|
+
export * from './get-workflows-to-run.js';
|
|
4
|
+
export * from './schema/index.js';
|
|
5
|
+
export * from './inputs/index.js';
|
|
6
|
+
export * from './outputs/index.js';
|
|
7
|
+
export * from '../checks/index.js';
|
|
8
|
+
export * from './error-message-matcher.js';
|
|
9
|
+
export * from './success-criteria/index.js';
|
|
10
|
+
export * from './get-server-url.js';
|
|
11
|
+
export * from './call-api-and-analyze-results.js';
|
|
12
|
+
export * from './run-step.js';
|
|
13
|
+
export * from './prepare-request.js';
|
|
14
|
+
export * from './read-env-variables.js';
|
|
15
|
+
export * from './resolve-running-workflows.js';
|
|
32
16
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/modules/flow-runner/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/modules/flow-runner/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC;AACnC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,qBAAqB,CAAC;AACpC,cAAc,mCAAmC,CAAC;AAClD,cAAc,eAAe,CAAC;AAC9B,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,gCAAgC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"format-cli-inputs.js","sourceRoot":"","sources":["../../../../src/modules/flow-runner/inputs/format-cli-inputs.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"format-cli-inputs.js","sourceRoot":"","sources":["../../../../src/modules/flow-runner/inputs/format-cli-inputs.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,eAAe,CAAC,KAAoC;IAClE,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QACzB,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE;YACpC,MAAM,MAAM,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC;YACjC,OAAO,EAAE,GAAG,MAAM,EAAE,GAAG,MAAM,EAAE,CAAC;QAClC,CAAC,EAAE,EAA4B,CAAC,CAAC;IACnC,CAAC;IAED,OAAO,UAAU,CAAC,KAAK,CAAC,CAAC;AAC3B,CAAC;AAED,SAAS,UAAU,CAAC,KAAa;IAC/B,IAAI,CAAC;QACH,MAAM,YAAY,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QAEvC,IAAI,OAAO,YAAY,KAAK,QAAQ,IAAI,YAAY,KAAK,IAAI,EAAE,CAAC;YAC9D,OAAO,YAAY,CAAC;QACtB,CAAC;IACH,CAAC;IAAC,MAAM,CAAC;QACP,aAAa;IACf,CAAC;IAED,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC9B,yCAAyC;QACzC,IAAI,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;YACxB,OAAO,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE;gBAC3C,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;gBACrC,IAAI,GAAG,IAAI,KAAK,EAAE,CAAC;oBACjB,GAAG,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC;gBACjC,CAAC;gBACD,OAAO,GAAG,CAAC;YACb,CAAC,EAAE,EAA4B,CAAC,CAAC;QACnC,CAAC;QAED,+BAA+B;QAC/B,IAAI,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;YACxB,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YACtC,OAAO,EAAE,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,CAAC,IAAI,EAAE,EAAE,CAAC;QACxC,CAAC;IACH,CAAC;IAED,OAAO,EAAE,CAAC;AACZ,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './format-cli-inputs';
|
|
2
|
-
export * from './map-input-values-to-schema';
|
|
1
|
+
export * from './format-cli-inputs.js';
|
|
2
|
+
export * from './map-input-values-to-schema.js';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/modules/flow-runner/inputs/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/modules/flow-runner/inputs/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,iCAAiC,CAAC"}
|
|
@@ -1,19 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./format-cli-inputs"), exports);
|
|
18
|
-
__exportStar(require("./map-input-values-to-schema"), exports);
|
|
1
|
+
export * from './format-cli-inputs.js';
|
|
2
|
+
export * from './map-input-values-to-schema.js';
|
|
19
3
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/flow-runner/inputs/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/flow-runner/inputs/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,iCAAiC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"map-input-values-to-schema.d.ts","sourceRoot":"","sources":["../../../../src/modules/flow-runner/inputs/map-input-values-to-schema.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"map-input-values-to-schema.d.ts","sourceRoot":"","sources":["../../../../src/modules/flow-runner/inputs/map-input-values-to-schema.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD,KAAK,WAAW,GAAG;IACjB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB,CAAC;AAEF,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,WAAW,GAAG,WAAW,CAyBvF"}
|
|
@@ -1,15 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.resolveInputValuesToSchema = resolveInputValuesToSchema;
|
|
7
|
-
const _2020_1 = __importDefault(require("@redocly/ajv/dist/2020"));
|
|
8
|
-
function resolveInputValuesToSchema(value, schema) {
|
|
1
|
+
import Ajv from '@redocly/ajv/dist/2020.js';
|
|
2
|
+
export function resolveInputValuesToSchema(value, schema) {
|
|
9
3
|
if (!schema || Object.keys(schema).length === 0) {
|
|
10
4
|
return {};
|
|
11
5
|
}
|
|
12
|
-
const ajv = new
|
|
6
|
+
const ajv = new Ajv({
|
|
13
7
|
useDefaults: true,
|
|
14
8
|
removeAdditional: 'all',
|
|
15
9
|
coerceTypes: true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"map-input-values-to-schema.js","sourceRoot":"","sources":["../../../../src/modules/flow-runner/inputs/map-input-values-to-schema.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"map-input-values-to-schema.js","sourceRoot":"","sources":["../../../../src/modules/flow-runner/inputs/map-input-values-to-schema.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,2BAA2B,CAAC;AAQ5C,MAAM,UAAU,0BAA0B,CAAC,KAAU,EAAE,MAAmB;IACxE,IAAI,CAAC,MAAM,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAChD,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC;QAClB,WAAW,EAAE,IAAI;QACjB,gBAAgB,EAAE,KAAK;QACvB,WAAW,EAAE,IAAI;QACjB,WAAW,EAAE,KAAK;KACnB,CAAC,CAAC;IAEH,qBAAqB;IACrB,GAAG,CAAC,SAAS,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;IAChC,GAAG,CAAC,SAAS,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IAC7B,GAAG,CAAC,SAAS,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IAC7B,GAAG,CAAC,SAAS,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IAC7B,GAAG,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;IAE9B,MAAM,QAAQ,GAAG,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IACrC,MAAM,MAAM,GAAG,EAAE,GAAG,KAAK,EAAE,CAAC;IAE5B,QAAQ,CAAC,MAAM,CAAC,CAAC;IAEjB,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './print-message';
|
|
1
|
+
export * from './print-message.js';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/modules/flow-runner/outputs/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/modules/flow-runner/outputs/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC"}
|
|
@@ -1,18 +1,2 @@
|
|
|
1
|
-
|
|
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./print-message"), exports);
|
|
1
|
+
export * from './print-message.js';
|
|
18
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/flow-runner/outputs/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/flow-runner/outputs/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC"}
|
|
@@ -1,17 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
exports.RECEIVED_COLOR = colorette_1.red;
|
|
9
|
-
exports.EXPECTED_LABEL = 'Expected';
|
|
10
|
-
exports.RECEIVED_LABEL = 'Received';
|
|
11
|
-
function printReceived(received) {
|
|
12
|
-
return (0, exports.RECEIVED_COLOR)(JSON.stringify(received, null, 2));
|
|
1
|
+
import { green, red } from 'colorette';
|
|
2
|
+
export const EXPECTED_COLOR = green;
|
|
3
|
+
export const RECEIVED_COLOR = red;
|
|
4
|
+
export const EXPECTED_LABEL = 'Expected';
|
|
5
|
+
export const RECEIVED_LABEL = 'Received';
|
|
6
|
+
export function printReceived(received) {
|
|
7
|
+
return RECEIVED_COLOR(JSON.stringify(received, null, 2));
|
|
13
8
|
}
|
|
14
|
-
function printExpected(expected) {
|
|
15
|
-
return
|
|
9
|
+
export function printExpected(expected) {
|
|
10
|
+
return EXPECTED_COLOR(JSON.stringify(expected, null, 2));
|
|
16
11
|
}
|
|
17
12
|
//# sourceMappingURL=print-message.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"print-message.js","sourceRoot":"","sources":["../../../../src/modules/flow-runner/outputs/print-message.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"print-message.js","sourceRoot":"","sources":["../../../../src/modules/flow-runner/outputs/print-message.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAEvC,MAAM,CAAC,MAAM,cAAc,GAAG,KAAK,CAAC;AACpC,MAAM,CAAC,MAAM,cAAc,GAAG,GAAG,CAAC;AAClC,MAAM,CAAC,MAAM,cAAc,GAAG,UAAU,CAAC;AACzC,MAAM,CAAC,MAAM,cAAc,GAAG,UAAU,CAAC;AAEzC,MAAM,UAAU,aAAa,CAAC,QAAa;IACzC,OAAO,cAAc,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;AAC3D,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,QAAa;IACzC,OAAO,cAAc,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;AAC3D,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
1
|
+
import type { Oas3SecurityScheme } from 'core/src/typings/openapi.js';
|
|
2
|
+
import type { ParameterWithIn } from '../context-parser/index.js';
|
|
3
|
+
import type { TestContext, Step } from '../../types.js';
|
|
4
|
+
import type { OperationDetails } from '../description-parser/index.js';
|
|
4
5
|
export type RequestData = {
|
|
5
6
|
serverUrl?: {
|
|
6
7
|
url: string;
|
|
@@ -9,7 +10,9 @@ export type RequestData = {
|
|
|
9
10
|
method: string;
|
|
10
11
|
parameters: ParameterWithIn[];
|
|
11
12
|
requestBody: any;
|
|
12
|
-
openapiOperation?: OperationDetails &
|
|
13
|
+
openapiOperation?: OperationDetails & {
|
|
14
|
+
securitySchemes?: Record<string, Oas3SecurityScheme>;
|
|
15
|
+
};
|
|
13
16
|
};
|
|
14
17
|
export declare function prepareRequest(ctx: TestContext, step: Step, workflowName: string): Promise<RequestData>;
|
|
15
18
|
//# sourceMappingURL=prepare-request.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prepare-request.d.ts","sourceRoot":"","sources":["../../../src/modules/flow-runner/prepare-request.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"prepare-request.d.ts","sourceRoot":"","sources":["../../../src/modules/flow-runner/prepare-request.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACtE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,KAAK,EAAE,WAAW,EAAE,IAAI,EAAyB,MAAM,gBAAgB,CAAC;AAC/E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAEvE,MAAM,MAAM,WAAW,GAAG;IACxB,SAAS,CAAC,EAAE;QACV,GAAG,EAAE,MAAM,CAAC;KAEb,CAAC;IACF,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,eAAe,EAAE,CAAC;IAC9B,WAAW,EAAE,GAAG,CAAC;IACjB,gBAAgB,CAAC,EAAE,gBAAgB,GAAG;QAAE,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAA;KAAE,CAAC;CAChG,CAAC;AAEF,wBAAsB,cAAc,CAClC,GAAG,EAAE,WAAW,EAChB,IAAI,EAAE,IAAI,EACV,YAAY,EAAE,MAAM,GACnB,OAAO,CAAC,WAAW,CAAC,CAyKtB"}
|
|
@@ -1,24 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
const runtime_expressions_1 = require("../runtime-expressions");
|
|
9
|
-
async function prepareRequest(ctx, step, workflowName) {
|
|
1
|
+
import { getOperationFromDescriptionBySource, getRequestBodySchema, getRequestDataFromOpenApi, } from '../description-parser/index.js';
|
|
2
|
+
import { parseRequestBody, resolveReusableComponentItem, isParameterWithIn, handlePayloadReplacements, } from '../context-parser/index.js';
|
|
3
|
+
import { getServerUrl } from './get-server-url.js';
|
|
4
|
+
import { createRuntimeExpressionCtx, collectSecretFields } from './context/index.js';
|
|
5
|
+
import { evaluateRuntimeExpressionPayload } from '../runtime-expressions/index.js';
|
|
6
|
+
import { resolveXSecurityParameters } from './resolve-x-security-parameters.js';
|
|
7
|
+
export async function prepareRequest(ctx, step, workflowName) {
|
|
10
8
|
const { stepId, operationId, operationPath, 'x-operation': xOperation } = step;
|
|
11
9
|
const activeWorkflow = ctx.workflows.find((workflow) => workflow.workflowId === workflowName);
|
|
12
10
|
const workflowLevelParameters = (activeWorkflow && activeWorkflow.parameters) || [];
|
|
13
11
|
const openapiOperation = xOperation
|
|
14
12
|
? undefined
|
|
15
|
-
:
|
|
13
|
+
: getOperationFromDescriptionBySource({
|
|
16
14
|
operationId,
|
|
17
15
|
operationPath,
|
|
18
16
|
}, ctx);
|
|
19
17
|
let path = '';
|
|
20
18
|
let method;
|
|
21
|
-
const serverUrl =
|
|
19
|
+
const serverUrl = getServerUrl({
|
|
22
20
|
ctx,
|
|
23
21
|
descriptionName: openapiOperation?.descriptionName,
|
|
24
22
|
openapiOperation,
|
|
@@ -41,10 +39,10 @@ async function prepareRequest(ctx, step, workflowName) {
|
|
|
41
39
|
if (!method) {
|
|
42
40
|
throw new Error('"method" is required to make a request');
|
|
43
41
|
}
|
|
44
|
-
const requestDataFromOpenAPI = openapiOperation &&
|
|
42
|
+
const requestDataFromOpenAPI = openapiOperation && getRequestDataFromOpenApi(openapiOperation);
|
|
45
43
|
const { payload: stepRequestBodyPayload,
|
|
46
44
|
// encoding: stepRequestBodyEncoding,
|
|
47
|
-
contentType: stepRequestBodyContentType, replacements, } = await
|
|
45
|
+
contentType: stepRequestBodyContentType, replacements, } = await parseRequestBody(step['requestBody'], ctx);
|
|
48
46
|
const requestBody = stepRequestBodyPayload || requestDataFromOpenAPI?.requestBody;
|
|
49
47
|
const contentType = stepRequestBodyContentType || requestDataFromOpenAPI?.contentType;
|
|
50
48
|
const parameters = joinParameters(
|
|
@@ -83,15 +81,23 @@ async function prepareRequest(ctx, step, workflowName) {
|
|
|
83
81
|
...(ctx.$workflows[workflowName]?.inputs || {}),
|
|
84
82
|
},
|
|
85
83
|
};
|
|
86
|
-
const expressionContext =
|
|
84
|
+
const expressionContext = createRuntimeExpressionCtx({
|
|
87
85
|
ctx: ctxWithInputs,
|
|
88
86
|
workflowId: workflowName,
|
|
89
87
|
step,
|
|
90
88
|
});
|
|
91
|
-
const
|
|
89
|
+
const workflowLevelXSecurityParameters = activeWorkflow?.['x-security'] || [];
|
|
90
|
+
const xSecurityParameters = resolveXSecurityParameters({
|
|
91
|
+
ctx: ctxWithInputs,
|
|
92
|
+
runtimeContext: expressionContext,
|
|
93
|
+
step,
|
|
94
|
+
operation: openapiOperation,
|
|
95
|
+
workflowLevelXSecurityParameters: workflowLevelXSecurityParameters,
|
|
96
|
+
});
|
|
97
|
+
const evaluatedParameters = joinParameters(parameters, xSecurityParameters).map((parameter) => {
|
|
92
98
|
return {
|
|
93
99
|
...parameter,
|
|
94
|
-
value:
|
|
100
|
+
value: evaluateRuntimeExpressionPayload({
|
|
95
101
|
payload: parameter.value,
|
|
96
102
|
context: expressionContext,
|
|
97
103
|
// contentType,
|
|
@@ -100,20 +106,20 @@ async function prepareRequest(ctx, step, workflowName) {
|
|
|
100
106
|
});
|
|
101
107
|
for (const param of openapiOperation?.parameters || []) {
|
|
102
108
|
const { schema, name } = param;
|
|
103
|
-
|
|
109
|
+
collectSecretFields(ctx, schema, groupParametersValuesByName(parameters, param.in), [name]);
|
|
104
110
|
}
|
|
105
|
-
const evaluatedBody =
|
|
111
|
+
const evaluatedBody = evaluateRuntimeExpressionPayload({
|
|
106
112
|
payload: requestBody,
|
|
107
113
|
context: expressionContext,
|
|
108
114
|
contentType,
|
|
109
115
|
});
|
|
110
116
|
if (replacements && typeof evaluatedBody === 'object') {
|
|
111
|
-
|
|
117
|
+
handlePayloadReplacements(evaluatedBody, replacements, expressionContext);
|
|
112
118
|
}
|
|
113
119
|
if (contentType && openapiOperation?.requestBody) {
|
|
114
|
-
const requestBodySchema =
|
|
120
|
+
const requestBodySchema = getRequestBodySchema(contentType, openapiOperation);
|
|
115
121
|
if (typeof requestBody === 'object') {
|
|
116
|
-
|
|
122
|
+
collectSecretFields(ctx, requestBodySchema, requestBody);
|
|
117
123
|
}
|
|
118
124
|
}
|
|
119
125
|
// set evaluated values to the context
|
|
@@ -137,7 +143,8 @@ async function prepareRequest(ctx, step, workflowName) {
|
|
|
137
143
|
function joinParameters(...parameters) {
|
|
138
144
|
const parametersWithNames = parameters.flat().filter((param) => 'name' in param);
|
|
139
145
|
const parameterMap = parametersWithNames.reduce((map, param) => {
|
|
140
|
-
|
|
146
|
+
const key = `${param.name}:${param.in}`;
|
|
147
|
+
map[key] = param;
|
|
141
148
|
return map;
|
|
142
149
|
}, {});
|
|
143
150
|
return Object.values(parameterMap);
|
|
@@ -153,8 +160,8 @@ function groupParametersValuesByName(parameters, inValue) {
|
|
|
153
160
|
function resolveParameters(parameters, ctx) {
|
|
154
161
|
return parameters
|
|
155
162
|
.map((parameter) => {
|
|
156
|
-
const resolvedParameter =
|
|
157
|
-
if (!
|
|
163
|
+
const resolvedParameter = resolveReusableComponentItem(parameter, ctx);
|
|
164
|
+
if (!isParameterWithIn(resolvedParameter)) {
|
|
158
165
|
return undefined;
|
|
159
166
|
}
|
|
160
167
|
return resolvedParameter;
|