@redocly/respect-core 0.0.0-snapshot.1744801622 → 0.0.0-snapshot.1747225307
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 +32 -35
- package/lib/arazzo-schema.js.map +1 -1
- package/lib/consts.d.ts.map +1 -1
- package/lib/consts.js +3 -6
- 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 +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 +1 -1
- 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 +1 -4
- 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 +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 +1 -4
- 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.js +2 -6
- 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/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 +14 -21
- 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 +4 -7
- 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 +6 -22
- 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 +2 -6
- 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 +15 -38
- 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 +3 -6
- 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 +3 -6
- package/lib/modules/config-parser/resolve-reusable-object-reference.js.map +1 -1
- 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 +4 -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 +5 -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 +11 -14
- 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 +24 -28
- 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 +21 -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 +3 -3
- package/lib/modules/flow-runner/prepare-request.d.ts.map +1 -1
- package/lib/modules/flow-runner/prepare-request.js +19 -22
- 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/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 -51
- 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 +44 -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/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.js +3 -9
- package/lib/modules/timeout-timer/timer.js.map +1 -1
- package/lib/types.d.ts +6 -8
- 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 +2 -2
- package/lib/utils/api-fetcher.d.ts.map +1 -1
- package/lib/utils/api-fetcher.js +195 -210
- 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/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 +6 -6
- 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
package/lib/utils/api-fetcher.js
CHANGED
|
@@ -1,29 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.ApiFetcher = void 0;
|
|
7
|
-
exports.normalizeHeaders = normalizeHeaders;
|
|
8
|
-
exports.isJsonContentType = isJsonContentType;
|
|
9
|
-
exports.isXmlContentType = isXmlContentType;
|
|
10
|
-
exports.trimTrailingSlash = trimTrailingSlash;
|
|
11
|
-
const undici_1 = require("undici");
|
|
12
|
-
const colorette_1 = require("colorette");
|
|
1
|
+
import { fetch } from 'undici';
|
|
2
|
+
import { bgRed, inverse } from 'colorette';
|
|
13
3
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
14
4
|
// @ts-ignore this works but some types are not working
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
const logger =
|
|
26
|
-
function normalizeHeaders(headers) {
|
|
5
|
+
import concat from 'concat-stream';
|
|
6
|
+
import { withHar } from '../utils/har-logs/index.js';
|
|
7
|
+
import { isEmpty } from './is-empty.js';
|
|
8
|
+
import { resolvePath } from '../modules/config-parser/index.js';
|
|
9
|
+
import { getVerboseLogs, maskSecrets } from '../modules/cli-output/index.js';
|
|
10
|
+
import { getResponseSchema } from '../modules/description-parser/index.js';
|
|
11
|
+
import { collectSecretFields } from '../modules/flow-runner/index.js';
|
|
12
|
+
import { createMtlsClient } from './mtls/create-mtls-client.js';
|
|
13
|
+
import { DefaultLogger } from './logger/logger.js';
|
|
14
|
+
import { DEFAULT_RESPECT_MAX_FETCH_TIMEOUT } from '../consts.js';
|
|
15
|
+
const logger = DefaultLogger.getInstance();
|
|
16
|
+
export function normalizeHeaders(headers) {
|
|
27
17
|
if (!headers) {
|
|
28
18
|
return {};
|
|
29
19
|
}
|
|
@@ -37,202 +27,197 @@ function normalizeHeaders(headers) {
|
|
|
37
27
|
}
|
|
38
28
|
return headersToReturn;
|
|
39
29
|
}
|
|
40
|
-
function isJsonContentType(contentType) {
|
|
30
|
+
export function isJsonContentType(contentType) {
|
|
41
31
|
return /^application\/([a-z.-]+\+)?json$/.test(contentType);
|
|
42
32
|
}
|
|
43
|
-
function isXmlContentType(contentType) {
|
|
33
|
+
export function isXmlContentType(contentType) {
|
|
44
34
|
return /^application\/([a-z.-]+\+)?xml$/.test(contentType);
|
|
45
35
|
}
|
|
46
|
-
function trimTrailingSlash(str) {
|
|
36
|
+
export function trimTrailingSlash(str) {
|
|
47
37
|
return str.endsWith('/') ? str.slice(0, -1) : str;
|
|
48
38
|
}
|
|
49
|
-
class ApiFetcher {
|
|
50
|
-
verboseLogs;
|
|
51
|
-
verboseResponseLogs;
|
|
52
|
-
harLogs;
|
|
53
|
-
fetch;
|
|
39
|
+
export class ApiFetcher {
|
|
54
40
|
constructor(params) {
|
|
55
|
-
this.
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
path,
|
|
63
|
-
method,
|
|
64
|
-
body: JSON.stringify(body),
|
|
65
|
-
});
|
|
66
|
-
};
|
|
67
|
-
getVerboseLogs = () => {
|
|
68
|
-
return this.verboseLogs;
|
|
69
|
-
};
|
|
70
|
-
initVerboseResponseLogs = ({ headerParams, host, path, method, body, statusCode, responseTime, }) => {
|
|
71
|
-
this.verboseResponseLogs = (0, cli_output_1.getVerboseLogs)({
|
|
72
|
-
headerParams,
|
|
73
|
-
host,
|
|
74
|
-
path,
|
|
75
|
-
method,
|
|
76
|
-
body,
|
|
77
|
-
statusCode,
|
|
78
|
-
responseTime,
|
|
79
|
-
});
|
|
80
|
-
};
|
|
81
|
-
getVerboseResponseLogs = () => {
|
|
82
|
-
return this.verboseResponseLogs;
|
|
83
|
-
};
|
|
84
|
-
fetchResult = async (ctx, requestData) => {
|
|
85
|
-
const { serverUrl, path, method, parameters, requestBody, openapiOperation } = requestData;
|
|
86
|
-
if (!serverUrl?.url) {
|
|
87
|
-
logger.error((0, colorette_1.bgRed)(` No server url provided `));
|
|
88
|
-
throw new Error('No server url provided');
|
|
89
|
-
}
|
|
90
|
-
const headers = {};
|
|
91
|
-
const searchParams = new URLSearchParams();
|
|
92
|
-
const pathParams = {};
|
|
93
|
-
const cookies = {};
|
|
94
|
-
for (const param of parameters) {
|
|
95
|
-
switch (param.in) {
|
|
96
|
-
case 'header':
|
|
97
|
-
headers[param.name.toLowerCase()] = String(param.value);
|
|
98
|
-
break;
|
|
99
|
-
case 'query':
|
|
100
|
-
searchParams.set(param.name, String(param.value));
|
|
101
|
-
break;
|
|
102
|
-
case 'path':
|
|
103
|
-
pathParams[param.name] = String(param.value);
|
|
104
|
-
break;
|
|
105
|
-
case 'cookie':
|
|
106
|
-
cookies[param.name] = String(param.value);
|
|
107
|
-
break;
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
if (typeof requestBody === 'object' && !headers['content-type']) {
|
|
111
|
-
headers['content-type'] = 'application/json';
|
|
112
|
-
}
|
|
113
|
-
if (Object.keys(cookies).length) {
|
|
114
|
-
headers['cookie'] = Object.entries(cookies)
|
|
115
|
-
.map(([key, value]) => `${key}=${value}`)
|
|
116
|
-
.join('; ');
|
|
117
|
-
}
|
|
118
|
-
const resolvedPath = (0, config_parser_1.resolvePath)(path, pathParams) || '';
|
|
119
|
-
const pathWithSearchParams = `${resolvedPath}${searchParams.toString() ? '?' + searchParams.toString() : ''}`;
|
|
120
|
-
const resolvedServerUrl = (0, config_parser_1.resolvePath)(serverUrl.url, pathParams) || '';
|
|
121
|
-
const urlToFetch = `${trimTrailingSlash(resolvedServerUrl)}${pathWithSearchParams}`;
|
|
122
|
-
if (urlToFetch.startsWith('/')) {
|
|
123
|
-
logger.error((0, colorette_1.bgRed)(` Wrong url: ${(0, colorette_1.inverse)(urlToFetch)} `) +
|
|
124
|
-
` Did you forget to provide a correct "serverUrl"?\n`);
|
|
125
|
-
}
|
|
126
|
-
const contentType = headers['content-type'] || '';
|
|
127
|
-
if (requestBody && !contentType) {
|
|
128
|
-
logger.error((0, colorette_1.bgRed)(` Incorrect request `) +
|
|
129
|
-
` Please provide a correct "content-type" header or specify the "content-type" field in the test case itself. \n`);
|
|
130
|
-
}
|
|
131
|
-
let encodedBody;
|
|
132
|
-
if (contentType === 'application/x-www-form-urlencoded') {
|
|
133
|
-
encodedBody = new URLSearchParams(requestBody).toString();
|
|
134
|
-
}
|
|
135
|
-
else if (isJsonContentType(contentType || '')) {
|
|
136
|
-
encodedBody = JSON.stringify(requestBody);
|
|
137
|
-
}
|
|
138
|
-
else if (isXmlContentType(contentType)) {
|
|
139
|
-
encodedBody = requestBody;
|
|
140
|
-
}
|
|
141
|
-
else if (contentType.includes('multipart/form-data')) {
|
|
142
|
-
// Get the form data buffer
|
|
143
|
-
encodedBody = await new Promise((resolve, reject) => {
|
|
144
|
-
requestBody.pipe((0, concat_stream_1.default)((data) => {
|
|
145
|
-
resolve(data);
|
|
146
|
-
}));
|
|
147
|
-
requestBody.on('error', reject);
|
|
41
|
+
this.initVerboseLogs = ({ headerParams, host, path, method, body }) => {
|
|
42
|
+
this.verboseLogs = getVerboseLogs({
|
|
43
|
+
headerParams,
|
|
44
|
+
host,
|
|
45
|
+
path,
|
|
46
|
+
method,
|
|
47
|
+
body: JSON.stringify(body),
|
|
148
48
|
});
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
49
|
+
};
|
|
50
|
+
this.getVerboseLogs = () => {
|
|
51
|
+
return this.verboseLogs;
|
|
52
|
+
};
|
|
53
|
+
this.initVerboseResponseLogs = ({ headerParams, host, path, method, body, statusCode, responseTime, }) => {
|
|
54
|
+
this.verboseResponseLogs = getVerboseLogs({
|
|
55
|
+
headerParams,
|
|
56
|
+
host,
|
|
57
|
+
path,
|
|
58
|
+
method,
|
|
59
|
+
body,
|
|
60
|
+
statusCode,
|
|
61
|
+
responseTime,
|
|
62
|
+
});
|
|
63
|
+
};
|
|
64
|
+
this.getVerboseResponseLogs = () => {
|
|
65
|
+
return this.verboseResponseLogs;
|
|
66
|
+
};
|
|
67
|
+
this.fetchResult = async (ctx, requestData) => {
|
|
68
|
+
const { serverUrl, path, method, parameters, requestBody, openapiOperation } = requestData;
|
|
69
|
+
if (!serverUrl?.url) {
|
|
70
|
+
logger.error(bgRed(` No server url provided `));
|
|
71
|
+
throw new Error('No server url provided');
|
|
72
|
+
}
|
|
73
|
+
const headers = {};
|
|
74
|
+
const searchParams = new URLSearchParams();
|
|
75
|
+
const pathParams = {};
|
|
76
|
+
const cookies = {};
|
|
77
|
+
for (const param of parameters) {
|
|
78
|
+
switch (param.in) {
|
|
79
|
+
case 'header':
|
|
80
|
+
headers[param.name.toLowerCase()] = String(param.value);
|
|
81
|
+
break;
|
|
82
|
+
case 'query':
|
|
83
|
+
searchParams.set(param.name, String(param.value));
|
|
84
|
+
break;
|
|
85
|
+
case 'path':
|
|
86
|
+
pathParams[param.name] = String(param.value);
|
|
87
|
+
break;
|
|
88
|
+
case 'cookie':
|
|
89
|
+
cookies[param.name] = String(param.value);
|
|
90
|
+
break;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
if (typeof requestBody === 'object' && !headers['content-type']) {
|
|
94
|
+
headers['content-type'] = 'application/json';
|
|
95
|
+
}
|
|
96
|
+
if (Object.keys(cookies).length) {
|
|
97
|
+
headers['cookie'] = Object.entries(cookies)
|
|
98
|
+
.map(([key, value]) => `${key}=${value}`)
|
|
99
|
+
.join('; ');
|
|
100
|
+
}
|
|
101
|
+
const resolvedPath = resolvePath(path, pathParams) || '';
|
|
102
|
+
const pathWithSearchParams = `${resolvedPath}${searchParams.toString() ? '?' + searchParams.toString() : ''}`;
|
|
103
|
+
const resolvedServerUrl = resolvePath(serverUrl.url, pathParams) || '';
|
|
104
|
+
const urlToFetch = `${trimTrailingSlash(resolvedServerUrl)}${pathWithSearchParams}`;
|
|
105
|
+
if (urlToFetch.startsWith('/')) {
|
|
106
|
+
logger.error(bgRed(` Wrong url: ${inverse(urlToFetch)} `) +
|
|
107
|
+
` Did you forget to provide a correct "serverUrl"?\n`);
|
|
108
|
+
}
|
|
109
|
+
const contentType = headers['content-type'] || '';
|
|
110
|
+
if (requestBody && !contentType) {
|
|
111
|
+
logger.error(bgRed(` Incorrect request `) +
|
|
112
|
+
` Please provide a correct "content-type" header or specify the "content-type" field in the test case itself. \n`);
|
|
113
|
+
}
|
|
114
|
+
let encodedBody;
|
|
115
|
+
if (contentType === 'application/x-www-form-urlencoded') {
|
|
116
|
+
encodedBody = new URLSearchParams(requestBody).toString();
|
|
117
|
+
}
|
|
118
|
+
else if (isJsonContentType(contentType || '')) {
|
|
119
|
+
encodedBody = JSON.stringify(requestBody);
|
|
120
|
+
}
|
|
121
|
+
else if (isXmlContentType(contentType)) {
|
|
122
|
+
encodedBody = requestBody;
|
|
123
|
+
}
|
|
124
|
+
else if (contentType.includes('multipart/form-data')) {
|
|
125
|
+
// Get the form data buffer
|
|
126
|
+
encodedBody = await new Promise((resolve, reject) => {
|
|
127
|
+
requestBody.pipe(concat((data) => {
|
|
128
|
+
resolve(data);
|
|
129
|
+
}));
|
|
130
|
+
requestBody.on('error', reject);
|
|
131
|
+
});
|
|
132
|
+
// Ensure the content-type header includes the boundary
|
|
133
|
+
headers['content-type'] = `multipart/form-data; boundary=${requestBody._boundary}`;
|
|
134
|
+
}
|
|
135
|
+
else if (contentType === 'application/octet-stream') {
|
|
136
|
+
// Convert ReadStream to Blob for undici fetch
|
|
137
|
+
encodedBody = await new Promise((resolve, reject) => {
|
|
138
|
+
const chunks = [];
|
|
139
|
+
requestBody.on('data', (chunk) => {
|
|
140
|
+
chunks.push(new Uint8Array(chunk.buffer));
|
|
141
|
+
});
|
|
142
|
+
requestBody.on('end', () => resolve(Buffer.concat(chunks)));
|
|
143
|
+
requestBody.on('error', reject);
|
|
158
144
|
});
|
|
159
|
-
requestBody.
|
|
160
|
-
|
|
145
|
+
const fileName = requestBody.path.split('/').pop();
|
|
146
|
+
headers['content-disposition'] = `attachment; filename=${fileName}`;
|
|
147
|
+
}
|
|
148
|
+
else {
|
|
149
|
+
encodedBody = requestBody;
|
|
150
|
+
}
|
|
151
|
+
// Mask the secrets in the header params and the body
|
|
152
|
+
const maskedHeaderParams = maskSecrets(headers, ctx.secretFields || new Set());
|
|
153
|
+
const maskedBody = isJsonContentType(contentType) && encodedBody
|
|
154
|
+
? maskSecrets(JSON.parse(encodedBody), ctx.secretFields || new Set())
|
|
155
|
+
: encodedBody;
|
|
156
|
+
const maskedPathParams = maskSecrets(pathWithSearchParams, ctx.secretFields || new Set());
|
|
157
|
+
// Start of the verbose logs
|
|
158
|
+
this.initVerboseLogs({
|
|
159
|
+
headerParams: maskedHeaderParams,
|
|
160
|
+
host: resolvedServerUrl,
|
|
161
|
+
method: (method || 'get').toUpperCase(),
|
|
162
|
+
path: maskedPathParams || '',
|
|
163
|
+
body: maskedBody,
|
|
161
164
|
});
|
|
162
|
-
const
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
? (0, cli_output_1.maskSecrets)(transformedBody, ctx.secretFields || new Set())
|
|
216
|
-
: transformedBody;
|
|
217
|
-
this.initVerboseResponseLogs({
|
|
218
|
-
body: isJsonContentType(responseContentType)
|
|
219
|
-
? JSON.stringify(maskedResponseBody)
|
|
220
|
-
: maskedResponseBody,
|
|
221
|
-
method: (method || 'get'),
|
|
222
|
-
host: serverUrl.url,
|
|
223
|
-
path: pathWithSearchParams || '',
|
|
224
|
-
statusCode: result.status,
|
|
225
|
-
responseTime,
|
|
226
|
-
});
|
|
227
|
-
return {
|
|
228
|
-
body: transformedBody,
|
|
229
|
-
statusCode: result.status,
|
|
230
|
-
time: responseTime,
|
|
231
|
-
header: Object.fromEntries(result.headers?.entries() || []),
|
|
232
|
-
contentType: responseContentType,
|
|
233
|
-
requestUrl: urlToFetch,
|
|
165
|
+
const wrappedFetch = this.harLogs ? withHar(this.fetch, { har: this.harLogs }) : fetch;
|
|
166
|
+
const startTime = performance.now();
|
|
167
|
+
const result = await wrappedFetch(urlToFetch, {
|
|
168
|
+
method: (method || 'get').toUpperCase(),
|
|
169
|
+
headers,
|
|
170
|
+
...(!isEmpty(requestBody) && {
|
|
171
|
+
body: encodedBody,
|
|
172
|
+
}),
|
|
173
|
+
redirect: 'follow',
|
|
174
|
+
signal: AbortSignal.timeout(DEFAULT_RESPECT_MAX_FETCH_TIMEOUT),
|
|
175
|
+
// Required for application/octet-stream content type requests
|
|
176
|
+
...(headers['content-type'] === 'application/octet-stream' && {
|
|
177
|
+
duplex: 'half',
|
|
178
|
+
}),
|
|
179
|
+
dispatcher: ctx.mtlsCerts ? createMtlsClient(urlToFetch, ctx.mtlsCerts) : undefined,
|
|
180
|
+
});
|
|
181
|
+
const responseTime = Math.ceil(performance.now() - startTime);
|
|
182
|
+
const res = await result.text();
|
|
183
|
+
const [responseContentType] = result.headers.get('content-type')?.split(';') || [
|
|
184
|
+
'application/json',
|
|
185
|
+
];
|
|
186
|
+
const transformedBody = res
|
|
187
|
+
? isJsonContentType(responseContentType)
|
|
188
|
+
? JSON.parse(res)
|
|
189
|
+
: res
|
|
190
|
+
: {};
|
|
191
|
+
const responseSchema = getResponseSchema({
|
|
192
|
+
statusCode: result.status,
|
|
193
|
+
contentType: responseContentType,
|
|
194
|
+
descriptionResponses: openapiOperation?.responses,
|
|
195
|
+
});
|
|
196
|
+
collectSecretFields(ctx, responseSchema, transformedBody);
|
|
197
|
+
const maskedResponseBody = isJsonContentType(responseContentType)
|
|
198
|
+
? maskSecrets(transformedBody, ctx.secretFields || new Set())
|
|
199
|
+
: transformedBody;
|
|
200
|
+
this.initVerboseResponseLogs({
|
|
201
|
+
body: isJsonContentType(responseContentType)
|
|
202
|
+
? JSON.stringify(maskedResponseBody)
|
|
203
|
+
: maskedResponseBody,
|
|
204
|
+
method: (method || 'get'),
|
|
205
|
+
host: serverUrl.url,
|
|
206
|
+
path: pathWithSearchParams || '',
|
|
207
|
+
statusCode: result.status,
|
|
208
|
+
responseTime,
|
|
209
|
+
});
|
|
210
|
+
return {
|
|
211
|
+
body: transformedBody,
|
|
212
|
+
statusCode: result.status,
|
|
213
|
+
time: responseTime,
|
|
214
|
+
header: Object.fromEntries(result.headers?.entries() || []),
|
|
215
|
+
contentType: responseContentType,
|
|
216
|
+
requestUrl: urlToFetch,
|
|
217
|
+
};
|
|
234
218
|
};
|
|
235
|
-
|
|
219
|
+
this.harLogs = params.harLogs;
|
|
220
|
+
this.fetch = params.fetch || fetch;
|
|
221
|
+
}
|
|
236
222
|
}
|
|
237
|
-
exports.ApiFetcher = ApiFetcher;
|
|
238
223
|
//# sourceMappingURL=api-fetcher.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-fetcher.js","sourceRoot":"","sources":["../../src/utils/api-fetcher.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"api-fetcher.js","sourceRoot":"","sources":["../../src/utils/api-fetcher.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAC/B,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC3C,6DAA6D;AAC7D,uDAAuD;AACvD,OAAO,MAAM,MAAM,eAAe,CAAC;AAOnC,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,m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gBAC3B,IAAI,EAAE,iBAAiB,CAAC,mBAAmB,CAAC;oBAC1C,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,kBAAkB,CAAC;oBACpC,CAAC,CAAC,kBAAkB;gBACtB,MAAM,EAAE,CAAC,MAAM,IAAI,KAAK,CAAoB;gBAC5C,IAAI,EAAE,SAAS,CAAC,GAAG;gBACnB,IAAI,EAAE,oBAAoB,IAAI,EAAE;gBAChC,UAAU,EAAE,MAAM,CAAC,MAAM;gBACzB,YAAY;aACb,CAAC,CAAC;YAEH,OAAO;gBACL,IAAI,EAAE,eAAe;gBACrB,UAAU,EAAE,MAAM,CAAC,MAAM;gBACzB,IAAI,EAAE,YAAY;gBAClB,MAAM,EAAE,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;gBAC3D,WAAW,EAAE,mBAAmB;gBAChC,UAAU,EAAE,UAAU;aACvB,CAAC;QACJ,CAAC,CAAC;QA5NA,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC;QAC9B,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,KAAK,IAAI,KAAK,CAAC;IACrC,CAAC;CA2NF"}
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.checkCircularRefsInSchema = checkCircularRefsInSchema;
|
|
4
|
-
function checkCircularRefsInSchema(schema) {
|
|
1
|
+
export function checkCircularRefsInSchema(schema) {
|
|
5
2
|
try {
|
|
6
3
|
JSON.stringify(schema);
|
|
7
4
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"check-circular-refs-in-schema.js","sourceRoot":"","sources":["../../src/utils/check-circular-refs-in-schema.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"check-circular-refs-in-schema.js","sourceRoot":"","sources":["../../src/utils/check-circular-refs-in-schema.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,yBAAyB,CAAC,MAAW;IACnD,IAAI,CAAC;QACH,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;IACzB,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC"}
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.cleanColors = cleanColors;
|
|
4
|
-
function cleanColors(input) {
|
|
1
|
+
export function cleanColors(input) {
|
|
5
2
|
// eslint-disable-next-line no-control-regex
|
|
6
3
|
return input.replace(/\x1b\[\d+m/g, '');
|
|
7
4
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clean-colors.js","sourceRoot":"","sources":["../../src/utils/clean-colors.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"clean-colors.js","sourceRoot":"","sources":["../../src/utils/clean-colors.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,WAAW,CAAC,KAAa;IACvC,4CAA4C;IAC5C,OAAO,KAAK,CAAC,OAAO,CAAC,aAAa,EAAE,EAAE,CAAC,CAAC;AAC1C,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type Totals } from '@redocly/openapi-core';
|
|
2
|
-
import { type Check, type VerboseLog, type Step } from '../types';
|
|
2
|
+
import { type Check, type VerboseLog, type Step } from '../types.js';
|
|
3
3
|
export declare const RESET_ESCAPE_CODE: string;
|
|
4
4
|
export declare function removeExtraIndentation(message: string | undefined): string;
|
|
5
5
|
export declare function indent(str: string, level: number): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli-outputs.d.ts","sourceRoot":"","sources":["../../src/utils/cli-outputs.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,KAAK,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EAAE,IAAI,QAG1C"}
|
package/lib/utils/cli-outputs.js
CHANGED
|
@@ -1,24 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
exports.printRequiredWorkflowSeparator = printRequiredWorkflowSeparator;
|
|
9
|
-
exports.printChildWorkflowSeparator = printChildWorkflowSeparator;
|
|
10
|
-
exports.printActionsSeparator = printActionsSeparator;
|
|
11
|
-
exports.printStepSeparatorLine = printStepSeparatorLine;
|
|
12
|
-
exports.printConfigLintTotals = printConfigLintTotals;
|
|
13
|
-
exports.printStepDetails = printStepDetails;
|
|
14
|
-
exports.printUnknownStep = printUnknownStep;
|
|
15
|
-
const jest_matcher_utils_1 = require("jest-matcher-utils");
|
|
16
|
-
const colorette_1 = require("colorette");
|
|
17
|
-
const cli_output_1 = require("../modules/cli-output");
|
|
18
|
-
const logger_1 = require("./logger/logger");
|
|
19
|
-
const logger = logger_1.DefaultLogger.getInstance();
|
|
20
|
-
exports.RESET_ESCAPE_CODE = process.env.NO_COLOR ? '' : '\x1B[0m';
|
|
21
|
-
function removeExtraIndentation(message) {
|
|
1
|
+
import { pluralize } from 'jest-matcher-utils'; // TODO: decide what to use: jest-matcher-utils or pluralize
|
|
2
|
+
import { red, yellow, bold, blue } from 'colorette';
|
|
3
|
+
import { displayChecks } from '../modules/cli-output/index.js';
|
|
4
|
+
import { DefaultLogger } from './logger/logger.js';
|
|
5
|
+
const logger = DefaultLogger.getInstance();
|
|
6
|
+
export const RESET_ESCAPE_CODE = process.env.NO_COLOR ? '' : '\x1B[0m';
|
|
7
|
+
export function removeExtraIndentation(message) {
|
|
22
8
|
if (!message) {
|
|
23
9
|
return '';
|
|
24
10
|
}
|
|
@@ -29,55 +15,55 @@ function removeExtraIndentation(message) {
|
|
|
29
15
|
// Join the trimmed lines back into a single string
|
|
30
16
|
return trimmedLines.join('\n');
|
|
31
17
|
}
|
|
32
|
-
function indent(str, level) {
|
|
18
|
+
export function indent(str, level) {
|
|
33
19
|
return str
|
|
34
20
|
.split('\n')
|
|
35
21
|
.map((line) => '\xa0'.repeat(level) + line)
|
|
36
22
|
.join('\n');
|
|
37
23
|
}
|
|
38
|
-
function printWorkflowSeparatorLine() {
|
|
24
|
+
export function printWorkflowSeparatorLine() {
|
|
39
25
|
logger.printSeparator('\u2500');
|
|
40
26
|
logger.printNewLine();
|
|
41
27
|
logger.printNewLine();
|
|
42
28
|
}
|
|
43
|
-
function printWorkflowSeparator(fileName, workflowName, skipLineSeparator) {
|
|
29
|
+
export function printWorkflowSeparator(fileName, workflowName, skipLineSeparator) {
|
|
44
30
|
if (!skipLineSeparator) {
|
|
45
31
|
printWorkflowSeparatorLine();
|
|
46
32
|
}
|
|
47
|
-
logger.log(` ${
|
|
33
|
+
logger.log(` ${bold('Running workflow')} ${blue(`${fileName} / ${workflowName}`)}`);
|
|
48
34
|
logger.printNewLine();
|
|
49
35
|
}
|
|
50
|
-
function printRequiredWorkflowSeparator(parentWorkflowId) {
|
|
36
|
+
export function printRequiredWorkflowSeparator(parentWorkflowId) {
|
|
51
37
|
logger.printNewLine();
|
|
52
|
-
logger.log(` ${
|
|
38
|
+
logger.log(` ${bold('Running required')} workflow for ${blue(parentWorkflowId)}${RESET_ESCAPE_CODE}\n`);
|
|
53
39
|
}
|
|
54
|
-
function printChildWorkflowSeparator(parentStepId) {
|
|
40
|
+
export function printChildWorkflowSeparator(parentStepId) {
|
|
55
41
|
logger.printNewLine();
|
|
56
|
-
logger.log(` ${
|
|
42
|
+
logger.log(` ${bold('Running child')} workflow for the step ${blue(parentStepId)}${RESET_ESCAPE_CODE}`);
|
|
57
43
|
logger.printNewLine();
|
|
58
44
|
}
|
|
59
|
-
function printActionsSeparator(stepId, actionName, kind) {
|
|
45
|
+
export function printActionsSeparator(stepId, actionName, kind) {
|
|
60
46
|
logger.printNewLine();
|
|
61
|
-
logger.log(` ${
|
|
47
|
+
logger.log(` ${bold(`Running ${kind} action`)} ${blue(actionName)} for the step ${blue(stepId)}${RESET_ESCAPE_CODE}`);
|
|
62
48
|
logger.printNewLine();
|
|
63
49
|
}
|
|
64
|
-
function printStepSeparatorLine() {
|
|
50
|
+
export function printStepSeparatorLine() {
|
|
65
51
|
logger.printNewLine();
|
|
66
52
|
}
|
|
67
|
-
function printConfigLintTotals(totals) {
|
|
53
|
+
export function printConfigLintTotals(totals) {
|
|
68
54
|
if (totals.errors > 0) {
|
|
69
|
-
logger.error(
|
|
55
|
+
logger.error(red(`❌ Your config has ${totals.errors} ${pluralize('error', totals.errors)}.${RESET_ESCAPE_CODE}`));
|
|
70
56
|
}
|
|
71
57
|
else if (totals.warnings > 0) {
|
|
72
|
-
logger.error(
|
|
58
|
+
logger.error(yellow(`⚠️ Your config has ${totals.warnings} ${pluralize('warning', totals.warnings)}.${RESET_ESCAPE_CODE}`));
|
|
73
59
|
}
|
|
74
60
|
}
|
|
75
|
-
function printStepDetails({ testNameToDisplay, checks, verboseLogs, verboseResponseLogs, }) {
|
|
61
|
+
export function printStepDetails({ testNameToDisplay, checks, verboseLogs, verboseResponseLogs, }) {
|
|
76
62
|
printStepSeparatorLine();
|
|
77
|
-
|
|
63
|
+
displayChecks(testNameToDisplay, checks, verboseLogs, verboseResponseLogs);
|
|
78
64
|
}
|
|
79
|
-
function printUnknownStep(step) {
|
|
65
|
+
export function printUnknownStep(step) {
|
|
80
66
|
printStepSeparatorLine();
|
|
81
|
-
|
|
67
|
+
displayChecks(step.stepId, step.checks);
|
|
82
68
|
}
|
|
83
69
|
//# sourceMappingURL=cli-outputs.js.map
|