@redocly/cli 0.0.0-snapshot.1777557756 → 0.0.0-snapshot.1777564281
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 +46 -8
- package/bin/cli.js +1 -1
- package/lib/auth/device-flow.d.ts +10 -12
- package/lib/auth/device-flow.d.ts.map +1 -0
- package/lib/auth/device-flow.js +32 -25
- package/lib/auth/device-flow.js.map +1 -0
- package/lib/auth/oauth-client.d.ts +14 -10
- package/lib/auth/oauth-client.d.ts.map +1 -0
- package/lib/auth/oauth-client.js +83 -59
- package/lib/auth/oauth-client.js.map +1 -0
- package/lib/commands/auth.d.ts +7 -8
- package/lib/commands/auth.d.ts.map +1 -0
- package/lib/commands/auth.js +26 -43
- package/lib/commands/auth.js.map +1 -0
- package/lib/commands/build-docs/index.d.ts +4 -3
- package/lib/commands/build-docs/index.d.ts.map +1 -0
- package/lib/commands/build-docs/index.js +24 -25
- package/lib/commands/build-docs/index.js.map +1 -0
- package/lib/commands/build-docs/types.d.ts +2 -1
- package/lib/commands/build-docs/types.d.ts.map +1 -0
- package/lib/commands/build-docs/types.js +2 -2
- package/lib/commands/build-docs/types.js.map +1 -0
- package/lib/commands/build-docs/utils.d.ts +3 -2
- package/lib/commands/build-docs/utils.d.ts.map +1 -0
- package/lib/commands/build-docs/utils.js +35 -38
- package/lib/commands/build-docs/utils.js.map +1 -0
- package/lib/commands/bundle.d.ts +11 -6
- package/lib/commands/bundle.d.ts.map +1 -0
- package/lib/commands/bundle.js +41 -40
- package/lib/commands/bundle.js.map +1 -0
- package/lib/commands/eject.d.ts +5 -4
- package/lib/commands/eject.d.ts.map +1 -0
- package/lib/commands/eject.js +11 -13
- package/lib/commands/eject.js.map +1 -0
- package/lib/commands/generate-arazzo.d.ts +8 -0
- package/lib/commands/generate-arazzo.d.ts.map +1 -0
- package/lib/commands/generate-arazzo.js +25 -0
- package/lib/commands/generate-arazzo.js.map +1 -0
- package/lib/commands/join/index.d.ts +4 -0
- package/lib/commands/join/index.d.ts.map +1 -0
- package/lib/commands/join/index.js +141 -0
- package/lib/commands/join/index.js.map +1 -0
- package/lib/commands/join/types.d.ts +22 -0
- package/lib/commands/join/types.d.ts.map +1 -0
- package/lib/commands/join/types.js +2 -0
- package/lib/commands/join/types.js.map +1 -0
- package/lib/commands/join/utils/add-components-prefix.d.ts +2 -0
- package/lib/commands/join/utils/add-components-prefix.d.ts.map +1 -0
- package/lib/commands/join/utils/add-components-prefix.js +9 -0
- package/lib/commands/join/utils/add-components-prefix.js.map +1 -0
- package/lib/commands/join/utils/add-info-section.d.ts +2 -0
- package/lib/commands/join/utils/add-info-section.d.ts.map +1 -0
- package/lib/commands/join/utils/add-info-section.js +19 -0
- package/lib/commands/join/utils/add-info-section.js.map +1 -0
- package/lib/commands/join/utils/add-prefix.d.ts +2 -0
- package/lib/commands/join/utils/add-prefix.d.ts.map +1 -0
- package/lib/commands/join/utils/add-prefix.js +4 -0
- package/lib/commands/join/utils/add-prefix.js.map +1 -0
- package/lib/commands/join/utils/add-security-prefix.d.ts +2 -0
- package/lib/commands/join/utils/add-security-prefix.d.ts.map +1 -0
- package/lib/commands/join/utils/add-security-prefix.js +12 -0
- package/lib/commands/join/utils/add-security-prefix.js.map +1 -0
- package/lib/commands/join/utils/collect-components.d.ts +7 -0
- package/lib/commands/join/utils/collect-components.d.ts.map +1 -0
- package/lib/commands/join/utils/collect-components.js +26 -0
- package/lib/commands/join/utils/collect-components.js.map +1 -0
- package/lib/commands/join/utils/collect-external-docs.d.ts +7 -0
- package/lib/commands/join/utils/collect-external-docs.d.ts.map +1 -0
- package/lib/commands/join/utils/collect-external-docs.js +15 -0
- package/lib/commands/join/utils/collect-external-docs.js.map +1 -0
- package/lib/commands/join/utils/collect-paths.d.ts +9 -0
- package/lib/commands/join/utils/collect-paths.d.ts.map +1 -0
- package/lib/commands/join/utils/collect-paths.js +172 -0
- package/lib/commands/join/utils/collect-paths.js.map +1 -0
- package/lib/commands/join/utils/collect-webhooks.d.ts +8 -0
- package/lib/commands/join/utils/collect-webhooks.d.ts.map +1 -0
- package/lib/commands/join/utils/collect-webhooks.js +46 -0
- package/lib/commands/join/utils/collect-webhooks.js.map +1 -0
- package/lib/commands/join/utils/duplicate-tag-description-warning.d.ts +2 -0
- package/lib/commands/join/utils/duplicate-tag-description-warning.d.ts.map +1 -0
- package/lib/commands/join/utils/duplicate-tag-description-warning.js +8 -0
- package/lib/commands/join/utils/duplicate-tag-description-warning.js.map +1 -0
- package/lib/commands/join/utils/filter-conflicts.d.ts +2 -0
- package/lib/commands/join/utils/filter-conflicts.d.ts.map +1 -0
- package/lib/commands/join/utils/filter-conflicts.js +4 -0
- package/lib/commands/join/utils/filter-conflicts.js.map +1 -0
- package/lib/commands/join/utils/format-tags.d.ts +4 -0
- package/lib/commands/join/utils/format-tags.d.ts.map +1 -0
- package/lib/commands/join/utils/format-tags.js +4 -0
- package/lib/commands/join/utils/format-tags.js.map +1 -0
- package/lib/commands/join/utils/get-api-filename.d.ts +2 -0
- package/lib/commands/join/utils/get-api-filename.d.ts.map +1 -0
- package/lib/commands/join/utils/get-api-filename.js +5 -0
- package/lib/commands/join/utils/get-api-filename.js.map +1 -0
- package/lib/commands/join/utils/get-info-prefix.d.ts +2 -0
- package/lib/commands/join/utils/get-info-prefix.d.ts.map +1 -0
- package/lib/commands/join/utils/get-info-prefix.js +17 -0
- package/lib/commands/join/utils/get-info-prefix.js.map +1 -0
- package/lib/commands/join/utils/index.d.ts +19 -0
- package/lib/commands/join/utils/index.d.ts.map +1 -0
- package/lib/commands/join/utils/index.js +19 -0
- package/lib/commands/join/utils/index.js.map +1 -0
- package/lib/commands/join/utils/iterate-potential-conflicts.d.ts +5 -0
- package/lib/commands/join/utils/iterate-potential-conflicts.d.ts.map +1 -0
- package/lib/commands/join/utils/iterate-potential-conflicts.js +53 -0
- package/lib/commands/join/utils/iterate-potential-conflicts.js.map +1 -0
- package/lib/commands/join/utils/populate-tags.d.ts +7 -0
- package/lib/commands/join/utils/populate-tags.d.ts.map +1 -0
- package/lib/commands/join/utils/populate-tags.js +77 -0
- package/lib/commands/join/utils/populate-tags.js.map +1 -0
- package/lib/commands/join/utils/prefix-tag-suggestion.d.ts +2 -0
- package/lib/commands/join/utils/prefix-tag-suggestion.d.ts.map +1 -0
- package/lib/commands/join/utils/prefix-tag-suggestion.js +6 -0
- package/lib/commands/join/utils/prefix-tag-suggestion.js.map +1 -0
- package/lib/commands/join/utils/replace-$-refs.d.ts +2 -0
- package/lib/commands/join/utils/replace-$-refs.d.ts.map +1 -0
- package/lib/commands/join/utils/replace-$-refs.js +29 -0
- package/lib/commands/join/utils/replace-$-refs.js.map +1 -0
- package/lib/commands/join/utils/show-conflicts.d.ts +2 -0
- package/lib/commands/join/utils/show-conflicts.d.ts.map +1 -0
- package/lib/commands/join/utils/show-conflicts.js +8 -0
- package/lib/commands/join/utils/show-conflicts.js.map +1 -0
- package/lib/commands/lint.d.ts +10 -8
- package/lib/commands/lint.d.ts.map +1 -0
- package/lib/commands/lint.js +57 -64
- package/lib/commands/lint.js.map +1 -0
- package/lib/commands/preview-project/constants.d.ts +2 -1
- package/lib/commands/preview-project/constants.d.ts.map +1 -0
- package/lib/commands/preview-project/constants.js +4 -6
- package/lib/commands/preview-project/constants.js.map +1 -0
- package/lib/commands/preview-project/index.d.ts +4 -3
- package/lib/commands/preview-project/index.d.ts.map +1 -0
- package/lib/commands/preview-project/index.js +21 -23
- package/lib/commands/preview-project/index.js.map +1 -0
- package/lib/commands/preview-project/types.d.ts +5 -4
- package/lib/commands/preview-project/types.d.ts.map +1 -0
- package/lib/commands/preview-project/types.js +2 -2
- package/lib/commands/preview-project/types.js.map +1 -0
- package/lib/commands/respect/connection-client.d.ts +12 -0
- package/lib/commands/respect/connection-client.d.ts.map +1 -0
- package/lib/commands/respect/connection-client.js +73 -0
- package/lib/commands/respect/connection-client.js.map +1 -0
- package/lib/commands/respect/display-files-summary-table.d.ts +12 -0
- package/lib/commands/respect/display-files-summary-table.d.ts.map +1 -0
- package/lib/commands/respect/display-files-summary-table.js +65 -0
- package/lib/commands/respect/display-files-summary-table.js.map +1 -0
- package/lib/commands/respect/har-logs/har-logs.d.ts +6 -0
- package/lib/commands/respect/har-logs/har-logs.d.ts.map +1 -0
- package/lib/commands/respect/har-logs/har-logs.js +28 -0
- package/lib/commands/respect/har-logs/har-logs.js.map +1 -0
- package/lib/commands/respect/har-logs/helpers/add-headers.d.ts +2 -0
- package/lib/commands/respect/har-logs/helpers/add-headers.d.ts.map +1 -0
- package/lib/commands/respect/har-logs/helpers/add-headers.js +17 -0
- package/lib/commands/respect/har-logs/helpers/add-headers.js.map +1 -0
- package/lib/commands/respect/har-logs/helpers/build-headers.d.ts +10 -0
- package/lib/commands/respect/har-logs/helpers/build-headers.d.ts.map +1 -0
- package/lib/commands/respect/har-logs/helpers/build-headers.js +33 -0
- package/lib/commands/respect/har-logs/helpers/build-headers.js.map +1 -0
- package/lib/commands/respect/har-logs/helpers/build-request-cookies.d.ts +2 -0
- package/lib/commands/respect/har-logs/helpers/build-request-cookies.d.ts.map +1 -0
- package/lib/commands/respect/har-logs/helpers/build-request-cookies.js +18 -0
- package/lib/commands/respect/har-logs/helpers/build-request-cookies.js.map +1 -0
- package/lib/commands/respect/har-logs/helpers/build-response-cookies.d.ts +2 -0
- package/lib/commands/respect/har-logs/helpers/build-response-cookies.d.ts.map +1 -0
- package/lib/commands/respect/har-logs/helpers/build-response-cookies.js +40 -0
- package/lib/commands/respect/har-logs/helpers/build-response-cookies.js.map +1 -0
- package/lib/commands/respect/har-logs/helpers/get-duration.d.ts +2 -0
- package/lib/commands/respect/har-logs/helpers/get-duration.d.ts.map +1 -0
- package/lib/commands/respect/har-logs/helpers/get-duration.js +6 -0
- package/lib/commands/respect/har-logs/helpers/get-duration.js.map +1 -0
- package/lib/commands/respect/har-logs/index.d.ts +2 -0
- package/lib/commands/respect/har-logs/index.d.ts.map +1 -0
- package/lib/commands/respect/har-logs/index.js +2 -0
- package/lib/commands/respect/har-logs/index.js.map +1 -0
- package/lib/commands/respect/har-logs/with-har.d.ts +7 -0
- package/lib/commands/respect/har-logs/with-har.d.ts.map +1 -0
- package/lib/commands/respect/har-logs/with-har.js +188 -0
- package/lib/commands/respect/har-logs/with-har.js.map +1 -0
- package/lib/commands/respect/index.d.ts +27 -0
- package/lib/commands/respect/index.d.ts.map +1 -0
- package/lib/commands/respect/index.js +108 -0
- package/lib/commands/respect/index.js.map +1 -0
- package/lib/commands/respect/json-logs.d.ts +11 -0
- package/lib/commands/respect/json-logs.d.ts.map +1 -0
- package/lib/commands/respect/json-logs.js +85 -0
- package/lib/commands/respect/json-logs.js.map +1 -0
- package/lib/commands/respect/mtls/resolve-mtls-certificates.d.ts +9 -0
- package/lib/commands/respect/mtls/resolve-mtls-certificates.d.ts.map +1 -0
- package/lib/commands/respect/mtls/resolve-mtls-certificates.js +48 -0
- package/lib/commands/respect/mtls/resolve-mtls-certificates.js.map +1 -0
- package/lib/commands/respect/mtls/validate-mtls-command-option.d.ts +3 -0
- package/lib/commands/respect/mtls/validate-mtls-command-option.d.ts.map +1 -0
- package/lib/commands/respect/mtls/validate-mtls-command-option.js +55 -0
- package/lib/commands/respect/mtls/validate-mtls-command-option.js.map +1 -0
- package/lib/commands/score/collect-metrics.d.ts +17 -0
- package/lib/commands/score/collect-metrics.d.ts.map +1 -0
- package/lib/commands/score/collect-metrics.js +195 -0
- package/lib/commands/score/collect-metrics.js.map +1 -0
- package/lib/commands/score/collectors/dependency-graph.d.ts +9 -0
- package/lib/commands/score/collectors/dependency-graph.d.ts.map +1 -0
- package/lib/commands/score/collectors/dependency-graph.js +61 -0
- package/lib/commands/score/collectors/dependency-graph.js.map +1 -0
- package/lib/commands/score/collectors/document-metrics.d.ts +69 -0
- package/lib/commands/score/collectors/document-metrics.d.ts.map +1 -0
- package/lib/commands/score/collectors/document-metrics.js +343 -0
- package/lib/commands/score/collectors/document-metrics.js.map +1 -0
- package/lib/commands/score/constants.d.ts +4 -0
- package/lib/commands/score/constants.d.ts.map +1 -0
- package/lib/commands/score/constants.js +47 -0
- package/lib/commands/score/constants.js.map +1 -0
- package/lib/commands/score/formatters/json.d.ts +3 -0
- package/lib/commands/score/formatters/json.d.ts.map +1 -0
- package/lib/commands/score/formatters/json.js +20 -0
- package/lib/commands/score/formatters/json.js.map +1 -0
- package/lib/commands/score/formatters/stylish.d.ts +4 -0
- package/lib/commands/score/formatters/stylish.d.ts.map +1 -0
- package/lib/commands/score/formatters/stylish.js +235 -0
- package/lib/commands/score/formatters/stylish.js.map +1 -0
- package/lib/commands/score/hotspots.d.ts +3 -0
- package/lib/commands/score/hotspots.d.ts.map +1 -0
- package/lib/commands/score/hotspots.js +70 -0
- package/lib/commands/score/hotspots.js.map +1 -0
- package/lib/commands/score/index.d.ts +11 -0
- package/lib/commands/score/index.d.ts.map +1 -0
- package/lib/commands/score/index.js +69 -0
- package/lib/commands/score/index.js.map +1 -0
- package/lib/commands/score/scoring.d.ts +14 -0
- package/lib/commands/score/scoring.d.ts.map +1 -0
- package/lib/commands/score/scoring.js +136 -0
- package/lib/commands/score/scoring.js.map +1 -0
- package/lib/commands/score/types.d.ts +119 -0
- package/lib/commands/score/types.d.ts.map +1 -0
- package/lib/commands/score/types.js +2 -0
- package/lib/commands/score/types.js.map +1 -0
- package/lib/commands/score/utils.d.ts +2 -0
- package/lib/commands/score/utils.d.ts.map +1 -0
- package/lib/commands/score/utils.js +8 -0
- package/lib/commands/score/utils.js.map +1 -0
- package/lib/commands/scorecard-classic/auth/login-handler.d.ts +3 -0
- package/lib/commands/scorecard-classic/auth/login-handler.d.ts.map +1 -0
- package/lib/commands/scorecard-classic/auth/login-handler.js +31 -0
- package/lib/commands/scorecard-classic/auth/login-handler.js.map +1 -0
- package/lib/commands/scorecard-classic/formatters/checkstyle-formatter.d.ts +3 -0
- package/lib/commands/scorecard-classic/formatters/checkstyle-formatter.d.ts.map +1 -0
- package/lib/commands/scorecard-classic/formatters/checkstyle-formatter.js +28 -0
- package/lib/commands/scorecard-classic/formatters/checkstyle-formatter.js.map +1 -0
- package/lib/commands/scorecard-classic/formatters/json-formatter.d.ts +27 -0
- package/lib/commands/scorecard-classic/formatters/json-formatter.d.ts.map +1 -0
- package/lib/commands/scorecard-classic/formatters/json-formatter.js +67 -0
- package/lib/commands/scorecard-classic/formatters/json-formatter.js.map +1 -0
- package/lib/commands/scorecard-classic/formatters/junit-formatter.d.ts +3 -0
- package/lib/commands/scorecard-classic/formatters/junit-formatter.d.ts.map +1 -0
- package/lib/commands/scorecard-classic/formatters/junit-formatter.js +67 -0
- package/lib/commands/scorecard-classic/formatters/junit-formatter.js.map +1 -0
- package/lib/commands/scorecard-classic/formatters/stylish-formatter.d.ts +3 -0
- package/lib/commands/scorecard-classic/formatters/stylish-formatter.d.ts.map +1 -0
- package/lib/commands/scorecard-classic/formatters/stylish-formatter.js +57 -0
- package/lib/commands/scorecard-classic/formatters/stylish-formatter.js.map +1 -0
- package/lib/commands/scorecard-classic/index.d.ts +4 -0
- package/lib/commands/scorecard-classic/index.d.ts.map +1 -0
- package/lib/commands/scorecard-classic/index.js +123 -0
- package/lib/commands/scorecard-classic/index.js.map +1 -0
- package/lib/commands/scorecard-classic/remote/fetch-scorecard.d.ts +9 -0
- package/lib/commands/scorecard-classic/remote/fetch-scorecard.d.ts.map +1 -0
- package/lib/commands/scorecard-classic/remote/fetch-scorecard.js +126 -0
- package/lib/commands/scorecard-classic/remote/fetch-scorecard.js.map +1 -0
- package/lib/commands/scorecard-classic/targets-handler/targets-handler.d.ts +13 -0
- package/lib/commands/scorecard-classic/targets-handler/targets-handler.d.ts.map +1 -0
- package/lib/commands/scorecard-classic/targets-handler/targets-handler.js +55 -0
- package/lib/commands/scorecard-classic/targets-handler/targets-handler.js.map +1 -0
- package/lib/commands/scorecard-classic/types.d.ts +27 -0
- package/lib/commands/scorecard-classic/types.d.ts.map +1 -0
- package/lib/commands/scorecard-classic/types.js +2 -0
- package/lib/commands/scorecard-classic/types.js.map +1 -0
- package/lib/commands/scorecard-classic/validation/plugin-evaluator.d.ts +3 -0
- package/lib/commands/scorecard-classic/validation/plugin-evaluator.d.ts.map +1 -0
- package/lib/commands/scorecard-classic/validation/plugin-evaluator.js +45 -0
- package/lib/commands/scorecard-classic/validation/plugin-evaluator.js.map +1 -0
- package/lib/commands/scorecard-classic/validation/project-url.d.ts +2 -0
- package/lib/commands/scorecard-classic/validation/project-url.d.ts.map +1 -0
- package/lib/commands/scorecard-classic/validation/project-url.js +11 -0
- package/lib/commands/scorecard-classic/validation/project-url.js.map +1 -0
- package/lib/commands/scorecard-classic/validation/validate-scorecard.d.ts +21 -0
- package/lib/commands/scorecard-classic/validation/validate-scorecard.d.ts.map +1 -0
- package/lib/commands/scorecard-classic/validation/validate-scorecard.js +87 -0
- package/lib/commands/scorecard-classic/validation/validate-scorecard.js.map +1 -0
- package/lib/commands/split/asyncapi/constants.d.ts +6 -0
- package/lib/commands/split/asyncapi/constants.d.ts.map +1 -0
- package/lib/commands/split/asyncapi/constants.js +71 -0
- package/lib/commands/split/asyncapi/constants.js.map +1 -0
- package/lib/commands/split/asyncapi/find-asyncapi-component-types.d.ts +2 -0
- package/lib/commands/split/asyncapi/find-asyncapi-component-types.d.ts.map +1 -0
- package/lib/commands/split/asyncapi/find-asyncapi-component-types.js +8 -0
- package/lib/commands/split/asyncapi/find-asyncapi-component-types.js.map +1 -0
- package/lib/commands/split/asyncapi/gather-asyncapi-component-files.d.ts +9 -0
- package/lib/commands/split/asyncapi/gather-asyncapi-component-files.d.ts.map +1 -0
- package/lib/commands/split/asyncapi/gather-asyncapi-component-files.js +28 -0
- package/lib/commands/split/asyncapi/gather-asyncapi-component-files.js.map +1 -0
- package/lib/commands/split/asyncapi/iterate-asyncapi-channels.d.ts +10 -0
- package/lib/commands/split/asyncapi/iterate-asyncapi-channels.d.ts.map +1 -0
- package/lib/commands/split/asyncapi/iterate-asyncapi-channels.js +27 -0
- package/lib/commands/split/asyncapi/iterate-asyncapi-channels.js.map +1 -0
- package/lib/commands/split/asyncapi/iterate-asyncapi-components.d.ts +10 -0
- package/lib/commands/split/asyncapi/iterate-asyncapi-components.d.ts.map +1 -0
- package/lib/commands/split/asyncapi/iterate-asyncapi-components.js +41 -0
- package/lib/commands/split/asyncapi/iterate-asyncapi-components.js.map +1 -0
- package/lib/commands/split/asyncapi/iterate-asyncapi-operations.d.ts +11 -0
- package/lib/commands/split/asyncapi/iterate-asyncapi-operations.d.ts.map +1 -0
- package/lib/commands/split/asyncapi/iterate-asyncapi-operations.js +26 -0
- package/lib/commands/split/asyncapi/iterate-asyncapi-operations.js.map +1 -0
- package/lib/commands/split/asyncapi/remove-asyncapi-empty-components.d.ts +3 -0
- package/lib/commands/split/asyncapi/remove-asyncapi-empty-components.d.ts.map +1 -0
- package/lib/commands/split/asyncapi/remove-asyncapi-empty-components.js +13 -0
- package/lib/commands/split/asyncapi/remove-asyncapi-empty-components.js.map +1 -0
- package/lib/commands/split/asyncapi/split-asyncapi-definition.d.ts +9 -0
- package/lib/commands/split/asyncapi/split-asyncapi-definition.d.ts.map +1 -0
- package/lib/commands/split/asyncapi/split-asyncapi-definition.js +51 -0
- package/lib/commands/split/asyncapi/split-asyncapi-definition.js.map +1 -0
- package/lib/commands/split/constants.d.ts +7 -0
- package/lib/commands/split/constants.d.ts.map +1 -0
- package/lib/commands/split/constants.js +7 -0
- package/lib/commands/split/constants.js.map +1 -0
- package/lib/commands/split/index.d.ts +5 -12
- package/lib/commands/split/index.d.ts.map +1 -0
- package/lib/commands/split/index.js +45 -258
- package/lib/commands/split/index.js.map +1 -0
- package/lib/commands/split/oas/constants.d.ts +3 -0
- package/lib/commands/split/oas/constants.d.ts.map +1 -0
- package/lib/commands/split/oas/constants.js +23 -0
- package/lib/commands/split/oas/constants.js.map +1 -0
- package/lib/commands/split/oas/split-oas-definition.d.ts +3 -0
- package/lib/commands/split/oas/split-oas-definition.d.ts.map +1 -0
- package/lib/commands/split/oas/split-oas-definition.js +19 -0
- package/lib/commands/split/oas/split-oas-definition.js.map +1 -0
- package/lib/commands/split/types.d.ts +22 -30
- package/lib/commands/split/types.d.ts.map +1 -0
- package/lib/commands/split/types.js +2 -51
- package/lib/commands/split/types.js.map +1 -0
- package/lib/commands/split/utils/crawl.d.ts +2 -0
- package/lib/commands/split/utils/crawl.d.ts.map +1 -0
- package/lib/commands/split/utils/crawl.js +15 -0
- package/lib/commands/split/utils/crawl.js.map +1 -0
- package/lib/commands/split/utils/create-component-dir.d.ts +2 -0
- package/lib/commands/split/utils/create-component-dir.d.ts.map +1 -0
- package/lib/commands/split/utils/create-component-dir.js +8 -0
- package/lib/commands/split/utils/create-component-dir.js.map +1 -0
- package/lib/commands/split/utils/does-file-differ.d.ts +2 -0
- package/lib/commands/split/utils/does-file-differ.d.ts.map +1 -0
- package/lib/commands/split/utils/does-file-differ.js +7 -0
- package/lib/commands/split/utils/does-file-differ.js.map +1 -0
- package/lib/commands/split/utils/extract-filename-from-path.d.ts +2 -0
- package/lib/commands/split/utils/extract-filename-from-path.d.ts.map +1 -0
- package/lib/commands/split/utils/extract-filename-from-path.js +5 -0
- package/lib/commands/split/utils/extract-filename-from-path.js.map +1 -0
- package/lib/commands/split/utils/find-component-type.d.ts +3 -0
- package/lib/commands/split/utils/find-component-type.d.ts.map +1 -0
- package/lib/commands/split/utils/find-component-type.js +8 -0
- package/lib/commands/split/utils/find-component-type.js.map +1 -0
- package/lib/commands/split/utils/gather-components-files.d.ts +4 -0
- package/lib/commands/split/utils/gather-components-files.d.ts.map +1 -0
- package/lib/commands/split/utils/gather-components-files.js +12 -0
- package/lib/commands/split/utils/gather-components-files.js.map +1 -0
- package/lib/commands/split/utils/get-file-name-path.d.ts +2 -0
- package/lib/commands/split/utils/get-file-name-path.d.ts.map +1 -0
- package/lib/commands/split/utils/get-file-name-path.js +5 -0
- package/lib/commands/split/utils/get-file-name-path.js.map +1 -0
- package/lib/commands/split/utils/implicitly-reference-discriminator.d.ts +2 -0
- package/lib/commands/split/utils/implicitly-reference-discriminator.d.ts.map +1 -0
- package/lib/commands/split/utils/implicitly-reference-discriminator.js +31 -0
- package/lib/commands/split/utils/implicitly-reference-discriminator.js.map +1 -0
- package/lib/commands/split/utils/is-not-security-component-type.d.ts +2 -0
- package/lib/commands/split/utils/is-not-security-component-type.d.ts.map +1 -0
- package/lib/commands/split/utils/is-not-security-component-type.js +4 -0
- package/lib/commands/split/utils/is-not-security-component-type.js.map +1 -0
- package/lib/commands/split/utils/is-supported-extension.d.ts +2 -0
- package/lib/commands/split/utils/is-supported-extension.d.ts.map +1 -0
- package/lib/commands/split/utils/is-supported-extension.js +4 -0
- package/lib/commands/split/utils/is-supported-extension.js.map +1 -0
- package/lib/commands/split/utils/iterate-components.d.ts +3 -0
- package/lib/commands/split/utils/iterate-components.d.ts.map +1 -0
- package/lib/commands/split/utils/iterate-components.js +55 -0
- package/lib/commands/split/utils/iterate-components.js.map +1 -0
- package/lib/commands/split/utils/iterate-path-items.d.ts +3 -0
- package/lib/commands/split/utils/iterate-path-items.d.ts.map +1 -0
- package/lib/commands/split/utils/iterate-path-items.js +42 -0
- package/lib/commands/split/utils/iterate-path-items.js.map +1 -0
- package/lib/commands/split/utils/remove-empty-components.d.ts +4 -0
- package/lib/commands/split/utils/remove-empty-components.d.ts.map +1 -0
- package/lib/commands/split/utils/remove-empty-components.js +10 -0
- package/lib/commands/split/utils/remove-empty-components.js.map +1 -0
- package/lib/commands/split/utils/replace-$-refs.d.ts +3 -0
- package/lib/commands/split/utils/replace-$-refs.d.ts.map +1 -0
- package/lib/commands/split/utils/replace-$-refs.js +34 -0
- package/lib/commands/split/utils/replace-$-refs.js.map +1 -0
- package/lib/commands/split/utils/replace-channel-refs.d.ts +3 -0
- package/lib/commands/split/utils/replace-channel-refs.d.ts.map +1 -0
- package/lib/commands/split/utils/replace-channel-refs.js +30 -0
- package/lib/commands/split/utils/replace-channel-refs.js.map +1 -0
- package/lib/commands/split/utils/starts-with-components.d.ts +2 -0
- package/lib/commands/split/utils/starts-with-components.d.ts.map +1 -0
- package/lib/commands/split/utils/starts-with-components.js +5 -0
- package/lib/commands/split/utils/starts-with-components.js.map +1 -0
- package/lib/commands/split/utils/traverse-directory-deep.d.ts +3 -0
- package/lib/commands/split/utils/traverse-directory-deep.d.ts.map +1 -0
- package/lib/commands/split/utils/traverse-directory-deep.js +27 -0
- package/lib/commands/split/utils/traverse-directory-deep.js.map +1 -0
- package/lib/commands/stats/index.d.ts +9 -0
- package/lib/commands/stats/index.d.ts.map +1 -0
- package/lib/commands/stats/index.js +42 -0
- package/lib/commands/stats/index.js.map +1 -0
- package/lib/commands/stats/print-stats/index.d.ts +3 -0
- package/lib/commands/stats/print-stats/index.d.ts.map +1 -0
- package/lib/commands/stats/print-stats/index.js +22 -0
- package/lib/commands/stats/print-stats/index.js.map +1 -0
- package/lib/commands/stats/print-stats/json.d.ts +3 -0
- package/lib/commands/stats/print-stats/json.d.ts.map +1 -0
- package/lib/commands/stats/print-stats/json.js +13 -0
- package/lib/commands/stats/print-stats/json.js.map +1 -0
- package/lib/commands/stats/print-stats/markdown.d.ts +3 -0
- package/lib/commands/stats/print-stats/markdown.d.ts.map +1 -0
- package/lib/commands/stats/print-stats/markdown.js +10 -0
- package/lib/commands/stats/print-stats/markdown.js.map +1 -0
- package/lib/commands/stats/print-stats/stylish.d.ts +3 -0
- package/lib/commands/stats/print-stats/stylish.d.ts.map +1 -0
- package/lib/commands/stats/print-stats/stylish.js +11 -0
- package/lib/commands/stats/print-stats/stylish.js.map +1 -0
- package/lib/commands/stats/visitor-and-accumulator-resolver.d.ts +103 -0
- package/lib/commands/stats/visitor-and-accumulator-resolver.d.ts.map +1 -0
- package/lib/commands/stats/visitor-and-accumulator-resolver.js +46 -0
- package/lib/commands/stats/visitor-and-accumulator-resolver.js.map +1 -0
- package/lib/commands/translations.d.ts +5 -4
- package/lib/commands/translations.d.ts.map +1 -0
- package/lib/commands/translations.js +11 -13
- package/lib/commands/translations.js.map +1 -0
- package/lib/index.d.ts +2 -1
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +189 -260
- package/lib/index.js.map +1 -0
- package/lib/reunite/api/api-client.d.ts +6 -8
- package/lib/reunite/api/api-client.d.ts.map +1 -0
- package/lib/reunite/api/api-client.js +61 -78
- package/lib/reunite/api/api-client.js.map +1 -0
- package/lib/reunite/api/api-keys.d.ts +2 -1
- package/lib/reunite/api/api-keys.d.ts.map +1 -0
- package/lib/reunite/api/api-keys.js +4 -20
- package/lib/reunite/api/api-keys.js.map +1 -0
- package/lib/reunite/api/domains.d.ts +11 -3
- package/lib/reunite/api/domains.d.ts.map +1 -0
- package/lib/reunite/api/domains.js +46 -16
- package/lib/reunite/api/domains.js.map +1 -0
- package/lib/reunite/api/index.d.ts +4 -3
- package/lib/reunite/api/index.d.ts.map +1 -0
- package/lib/reunite/api/index.js +4 -19
- package/lib/reunite/api/index.js.map +1 -0
- package/lib/reunite/api/types.d.ts +1 -0
- package/lib/reunite/api/types.d.ts.map +1 -0
- package/lib/reunite/api/types.js +2 -2
- package/lib/reunite/api/types.js.map +1 -0
- package/lib/reunite/commands/push-status.d.ts +8 -7
- package/lib/reunite/commands/push-status.d.ts.map +1 -0
- package/lib/reunite/commands/push-status.js +30 -37
- package/lib/reunite/commands/push-status.js.map +1 -0
- package/lib/reunite/commands/push.d.ts +9 -9
- package/lib/reunite/commands/push.d.ts.map +1 -0
- package/lib/reunite/commands/push.js +34 -41
- package/lib/reunite/commands/push.js.map +1 -0
- package/lib/reunite/commands/utils.d.ts +4 -3
- package/lib/reunite/commands/utils.d.ts.map +1 -0
- package/lib/reunite/commands/utils.js +15 -12
- package/lib/reunite/commands/utils.js.map +1 -0
- package/lib/reunite/utils.d.ts +1 -0
- package/lib/reunite/utils.d.ts.map +1 -0
- package/lib/reunite/utils.js +2 -5
- package/lib/reunite/utils.js.map +1 -0
- package/lib/types.d.ts +19 -30
- package/lib/types.d.ts.map +1 -0
- package/lib/types.js +2 -5
- package/lib/types.js.map +1 -0
- package/lib/utils/assert-node-version.d.ts +1 -0
- package/lib/utils/assert-node-version.d.ts.map +1 -0
- package/lib/utils/assert-node-version.js +8 -10
- package/lib/utils/assert-node-version.js.map +1 -0
- package/lib/utils/constants.d.ts +5 -0
- package/lib/utils/constants.d.ts.map +1 -0
- package/lib/utils/constants.js +5 -0
- package/lib/utils/constants.js.map +1 -0
- package/lib/utils/error.d.ts +4 -0
- package/lib/utils/error.d.ts.map +1 -0
- package/lib/utils/error.js +8 -0
- package/lib/utils/error.js.map +1 -0
- package/lib/utils/fetch-with-timeout.d.ts +1 -1
- package/lib/utils/fetch-with-timeout.d.ts.map +1 -0
- package/lib/utils/fetch-with-timeout.js +17 -17
- package/lib/utils/fetch-with-timeout.js.map +1 -0
- package/lib/utils/{getCommandNameFromArgs.d.ts → get-command-name-from-args.d.ts} +1 -0
- package/lib/utils/get-command-name-from-args.d.ts.map +1 -0
- package/lib/utils/get-command-name-from-args.js +4 -0
- package/lib/utils/get-command-name-from-args.js.map +1 -0
- package/lib/utils/json-stringify-with-array-buffer.d.ts +2 -0
- package/lib/utils/json-stringify-with-array-buffer.d.ts.map +1 -0
- package/lib/utils/json-stringify-with-array-buffer.js +32 -0
- package/lib/utils/json-stringify-with-array-buffer.js.map +1 -0
- package/lib/utils/miscellaneous.d.ts +18 -56
- package/lib/utils/miscellaneous.d.ts.map +1 -0
- package/lib/utils/miscellaneous.js +200 -323
- package/lib/utils/miscellaneous.js.map +1 -0
- package/lib/utils/network-check.d.ts +2 -0
- package/lib/utils/network-check.d.ts.map +1 -0
- package/lib/utils/network-check.js +12 -0
- package/lib/utils/network-check.js.map +1 -0
- package/lib/utils/otel.d.ts +8 -0
- package/lib/utils/otel.d.ts.map +1 -0
- package/lib/utils/otel.js +40 -0
- package/lib/utils/otel.js.map +1 -0
- 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/platform.d.ts +1 -0
- package/lib/utils/platform.d.ts.map +1 -0
- package/lib/utils/platform.js +5 -9
- package/lib/utils/platform.js.map +1 -0
- package/lib/utils/proxy-agent.d.ts +5 -0
- package/lib/utils/proxy-agent.d.ts.map +1 -0
- package/lib/utils/proxy-agent.js +41 -0
- package/lib/utils/proxy-agent.js.map +1 -0
- package/lib/utils/read-env-variables.d.ts +2 -0
- package/lib/utils/read-env-variables.d.ts.map +1 -0
- package/lib/utils/read-env-variables.js +18 -0
- package/lib/utils/read-env-variables.js.map +1 -0
- package/lib/utils/spinner.d.ts +1 -0
- package/lib/utils/spinner.d.ts.map +1 -0
- package/lib/utils/spinner.js +12 -10
- package/lib/utils/spinner.js.map +1 -0
- package/lib/utils/strip-ansi-codes.d.ts +2 -0
- package/lib/utils/strip-ansi-codes.d.ts.map +1 -0
- package/lib/utils/strip-ansi-codes.js +6 -0
- package/lib/utils/strip-ansi-codes.js.map +1 -0
- package/lib/utils/telemetry.d.ts +22 -0
- package/lib/utils/telemetry.d.ts.map +1 -0
- package/lib/utils/telemetry.js +236 -0
- package/lib/utils/telemetry.js.map +1 -0
- package/lib/utils/update-version-notifier.d.ts +1 -1
- package/lib/utils/update-version-notifier.d.ts.map +1 -0
- package/lib/utils/update-version-notifier.js +36 -38
- package/lib/utils/update-version-notifier.js.map +1 -0
- package/lib/utils/validate-mount-path.d.ts +2 -0
- package/lib/utils/validate-mount-path.d.ts.map +1 -0
- package/lib/utils/validate-mount-path.js +7 -0
- package/lib/utils/validate-mount-path.js.map +1 -0
- package/lib/utils/validate-positive-number.d.ts +2 -0
- package/lib/utils/validate-positive-number.d.ts.map +1 -0
- package/lib/utils/validate-positive-number.js +13 -0
- package/lib/utils/validate-positive-number.js.map +1 -0
- package/lib/wrapper.d.ts +5 -5
- package/lib/wrapper.d.ts.map +1 -0
- package/lib/wrapper.js +52 -27
- package/lib/wrapper.js.map +1 -0
- package/package.json +35 -31
- package/lib/__mocks__/@redocly/openapi-core.d.ts +0 -99
- package/lib/__mocks__/@redocly/openapi-core.js +0 -84
- package/lib/__mocks__/documents.d.ts +0 -150
- package/lib/__mocks__/documents.js +0 -123
- package/lib/__mocks__/fs.d.ts +0 -8
- package/lib/__mocks__/fs.js +0 -9
- package/lib/__mocks__/perf_hooks.d.ts +0 -3
- package/lib/__mocks__/perf_hooks.js +0 -6
- package/lib/__mocks__/redoc.d.ts +0 -6
- package/lib/__mocks__/redoc.js +0 -5
- package/lib/__tests__/commands/build-docs.test.d.ts +0 -1
- package/lib/__tests__/commands/build-docs.test.js +0 -54
- package/lib/__tests__/commands/bundle.test.d.ts +0 -1
- package/lib/__tests__/commands/bundle.test.js +0 -235
- package/lib/__tests__/commands/join.test.d.ts +0 -1
- package/lib/__tests__/commands/join.test.js +0 -274
- package/lib/__tests__/commands/lint.test.d.ts +0 -1
- package/lib/__tests__/commands/lint.test.js +0 -149
- package/lib/__tests__/commands/push-region.test.d.ts +0 -1
- package/lib/__tests__/commands/push-region.test.js +0 -90
- package/lib/__tests__/commands/push.test.d.ts +0 -1
- package/lib/__tests__/commands/push.test.js +0 -496
- package/lib/__tests__/fetch-with-timeout.test.d.ts +0 -1
- package/lib/__tests__/fetch-with-timeout.test.js +0 -64
- package/lib/__tests__/fixtures/config.d.ts +0 -21
- package/lib/__tests__/fixtures/config.js +0 -24
- package/lib/__tests__/spinner.test.d.ts +0 -1
- package/lib/__tests__/spinner.test.js +0 -43
- package/lib/__tests__/utils.test.d.ts +0 -1
- package/lib/__tests__/utils.test.js +0 -651
- package/lib/__tests__/wrapper.test.d.ts +0 -1
- package/lib/__tests__/wrapper.test.js +0 -76
- package/lib/auth/__tests__/device-flow.test.d.ts +0 -1
- package/lib/auth/__tests__/device-flow.test.js +0 -62
- package/lib/auth/__tests__/oauth-client.test.d.ts +0 -1
- package/lib/auth/__tests__/oauth-client.test.js +0 -93
- package/lib/commands/join.d.ts +0 -11
- package/lib/commands/join.js +0 -566
- package/lib/commands/preview-docs/index.d.ts +0 -12
- package/lib/commands/preview-docs/index.js +0 -127
- package/lib/commands/preview-docs/preview-server/default.hbs +0 -24
- package/lib/commands/preview-docs/preview-server/hot.js +0 -59
- package/lib/commands/preview-docs/preview-server/oauth2-redirect.html +0 -21
- package/lib/commands/preview-docs/preview-server/preview-server.d.ts +0 -5
- package/lib/commands/preview-docs/preview-server/preview-server.js +0 -113
- package/lib/commands/preview-docs/preview-server/server.d.ts +0 -22
- package/lib/commands/preview-docs/preview-server/server.js +0 -85
- package/lib/commands/push.d.ts +0 -44
- package/lib/commands/push.js +0 -301
- package/lib/commands/split/__tests__/index.test.d.ts +0 -1
- package/lib/commands/split/__tests__/index.test.js +0 -91
- package/lib/commands/stats.d.ts +0 -8
- package/lib/commands/stats.js +0 -96
- package/lib/otel.d.ts +0 -10
- package/lib/otel.js +0 -47
- package/lib/reunite/api/__tests__/api-keys.test.d.ts +0 -1
- package/lib/reunite/api/__tests__/api-keys.test.js +0 -26
- package/lib/reunite/api/__tests__/api.client.test.d.ts +0 -1
- package/lib/reunite/api/__tests__/api.client.test.js +0 -385
- package/lib/reunite/api/__tests__/domains.test.d.ts +0 -1
- package/lib/reunite/api/__tests__/domains.test.js +0 -32
- package/lib/reunite/commands/__tests__/push-status.test.d.ts +0 -1
- package/lib/reunite/commands/__tests__/push-status.test.js +0 -563
- package/lib/reunite/commands/__tests__/push.test.d.ts +0 -1
- package/lib/reunite/commands/__tests__/push.test.js +0 -315
- package/lib/reunite/commands/__tests__/utils.test.d.ts +0 -1
- package/lib/reunite/commands/__tests__/utils.test.js +0 -51
- package/lib/utils/__mocks__/miscellaneous.d.ts +0 -43
- package/lib/utils/__mocks__/miscellaneous.js +0 -24
- package/lib/utils/getCommandNameFromArgs.js +0 -6
- package/lib/utils/js-utils.d.ts +0 -5
- package/lib/utils/js-utils.js +0 -28
package/README.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# Redocly CLI
|
|
2
2
|
|
|
3
|
-
[@Redocly](https://redocly.com) CLI is your all-in-one
|
|
4
|
-
It builds, manages, improves, and quality-checks your
|
|
3
|
+
[@Redocly](https://redocly.com) CLI is your all-in-one API documentation utility.
|
|
4
|
+
It builds, manages, improves, and quality-checks your API descriptions, all of which comes in handy for various phases of the API Lifecycle.
|
|
5
5
|
Create your own rulesets to make API governance easy, publish beautiful API reference documentation, and more.
|
|
6
|
-
Supports OpenAPI 3.1, 3.0 and OpenAPI 2.0 (legacy Swagger), AsyncAPI 3.0 and 2.6, Arazzo 1.0.
|
|
6
|
+
Supports OpenAPI 3.2, 3.1, 3.0 and OpenAPI 2.0 (legacy Swagger), AsyncAPI 3.0 and 2.6, Arazzo 1.0.
|
|
7
7
|
|
|
8
8
|

|
|
9
9
|

|
|
@@ -11,18 +11,23 @@ Supports OpenAPI 3.1, 3.0 and OpenAPI 2.0 (legacy Swagger), AsyncAPI 3.0 and 2.6
|
|
|
11
11
|
|
|
12
12
|

|
|
13
13
|
|
|
14
|
+
## Migration
|
|
15
|
+
|
|
16
|
+
Migrating from Redocly CLI v1 to v2?
|
|
17
|
+
Here's the [guide](https://redocly.com/docs/cli/guides/migrate-to-v2) to make the transition smoother.
|
|
18
|
+
|
|
14
19
|
## Usage
|
|
15
20
|
|
|
16
21
|
### Node
|
|
17
22
|
|
|
18
23
|
```sh
|
|
19
|
-
npx @redocly/cli@
|
|
24
|
+
npx @redocly/cli@latest lint path-to-root-file.yaml
|
|
20
25
|
```
|
|
21
26
|
|
|
22
27
|
Alternatively, install it globally with `npm`:
|
|
23
28
|
|
|
24
29
|
```sh
|
|
25
|
-
npm install @redocly/cli
|
|
30
|
+
npm install @redocly/cli -g
|
|
26
31
|
```
|
|
27
32
|
|
|
28
33
|
Then you can use it as `redocly [command] [options]`, for example:
|
|
@@ -31,7 +36,7 @@ Then you can use it as `redocly [command] [options]`, for example:
|
|
|
31
36
|
redocly lint path-to-root-file.yaml
|
|
32
37
|
```
|
|
33
38
|
|
|
34
|
-
The minimum required versions of Node.js and NPM are
|
|
39
|
+
The minimum required versions of Node.js and NPM are 22.12.0 and 10.9.2 respectively.
|
|
35
40
|
|
|
36
41
|
### Docker
|
|
37
42
|
|
|
@@ -91,8 +96,8 @@ redocly lint openapi.yaml
|
|
|
91
96
|
```
|
|
92
97
|
|
|
93
98
|
**Configure the rules** as you wish.
|
|
94
|
-
Other API Linters use complicated identifiers like JSONPath, but Redocly makes life easy with simple expressions that understand the
|
|
95
|
-
You can either use the [built-in rules](https://redocly.com/docs/cli/rules) to mix-and-match your ideal API guidelines, or break out the tools to build your own.
|
|
99
|
+
Other API Linters use complicated identifiers like JSONPath, but Redocly makes life easy with simple expressions that understand the API specification structure.
|
|
100
|
+
You can either use the [built-in rules](https://redocly.com/docs/cli/rules) to mix-and-match your ideal API guidelines, or break out the tools to [build your own](https://redocly.com/docs/cli/rules#rule-ideas).
|
|
96
101
|
|
|
97
102
|
**Format the output** in whatever way you need.
|
|
98
103
|
The `stylish` output is as good as it sounds, but if you need JSON, Markdown, Checkstyle and other outputs to integrate with other tools, the `lint` command can output those too.
|
|
@@ -101,6 +106,39 @@ The `stylish` output is as good as it sounds, but if you need JSON, Markdown, Ch
|
|
|
101
106
|
|
|
102
107
|
[Learn more about API standards and configuring Redocly rules](https://redocly.com/docs/cli/api-standards).
|
|
103
108
|
|
|
109
|
+
Looking for more examples? Check out our [Cookbook](https://github.com/Redocly/redocly-cli-cookbook).
|
|
110
|
+
|
|
111
|
+
### API contract testing with Respect
|
|
112
|
+
|
|
113
|
+
Ensure your APIs match their OpenAPI descriptions with **Respect**, Redocly's API contract testing system. Respect sends real HTTP requests to your API server and validates that responses match the expectations defined in your OpenAPI description and Arazzo workflows.
|
|
114
|
+
|
|
115
|
+
- Verify API responses match your OpenAPI schema
|
|
116
|
+
- Test complex API sequences using OpenAPI Arazzo format
|
|
117
|
+
- Catch API drift early in development and CI/CD
|
|
118
|
+
- Ensure external APIs you depend on behave as expected
|
|
119
|
+
- Track response times and detect anomalies
|
|
120
|
+
|
|
121
|
+
#### Quick start
|
|
122
|
+
|
|
123
|
+
```sh
|
|
124
|
+
# Generate test workflows from your OpenAPI spec
|
|
125
|
+
redocly generate-arazzo openapi.yaml
|
|
126
|
+
|
|
127
|
+
# Run contract tests against your API
|
|
128
|
+
redocly respect auto-generated.arazzo.yaml --verbose
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
#### Respect vs. Respect Monitoring
|
|
132
|
+
|
|
133
|
+
Respect is Redocly's community-edition product. Looking for something more? We also offer continuous API monitoring with additional features including:
|
|
134
|
+
|
|
135
|
+
- Real-time insights
|
|
136
|
+
- Automated alerts via email or Slack
|
|
137
|
+
- Automated API checks
|
|
138
|
+
- Proactive API quality assurance
|
|
139
|
+
|
|
140
|
+
Learn more about [Respect](https://redocly.com/respect) and [get started with API contract testing](https://redocly.com/docs/respect/get-started).
|
|
141
|
+
|
|
104
142
|
### Transform an OpenAPI description
|
|
105
143
|
|
|
106
144
|
If your OpenAPI description isn't everything you hoped it would be, enhance it with the Redocly [decorators](https://redocly.com/docs/cli/decorators) feature.
|
package/bin/cli.js
CHANGED
|
@@ -1,26 +1,24 @@
|
|
|
1
|
-
export type
|
|
1
|
+
export type Credentials = {
|
|
2
2
|
access_token: string;
|
|
3
|
-
refresh_token
|
|
3
|
+
refresh_token: string;
|
|
4
|
+
expires_in: number;
|
|
5
|
+
residency?: string;
|
|
4
6
|
token_type?: string;
|
|
5
|
-
expires_in?: number;
|
|
6
7
|
};
|
|
7
8
|
export declare class RedoclyOAuthDeviceFlow {
|
|
8
9
|
private baseUrl;
|
|
9
|
-
private clientName;
|
|
10
|
-
private version;
|
|
11
10
|
private apiClient;
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
private clientName;
|
|
12
|
+
constructor(baseUrl: string);
|
|
13
|
+
run(): Promise<Credentials>;
|
|
14
14
|
private openBrowser;
|
|
15
15
|
verifyToken(accessToken: string): Promise<boolean>;
|
|
16
16
|
verifyApiKey(apiKey: string): Promise<boolean>;
|
|
17
|
-
refreshToken(refreshToken
|
|
18
|
-
access_token: any;
|
|
19
|
-
refresh_token: any;
|
|
20
|
-
expires_in: any;
|
|
21
|
-
}>;
|
|
17
|
+
refreshToken(refreshToken?: string): Promise<Credentials>;
|
|
22
18
|
private pollingAccessToken;
|
|
23
19
|
private getAccessToken;
|
|
24
20
|
private getDeviceCode;
|
|
25
21
|
private sendRequest;
|
|
22
|
+
private withResidency;
|
|
26
23
|
}
|
|
24
|
+
//# sourceMappingURL=device-flow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"device-flow.d.ts","sourceRoot":"","sources":["../../src/auth/device-flow.ts"],"names":[],"mappings":"AAOA,MAAM,MAAM,WAAW,GAAG;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,qBAAa,sBAAsB;IAIrB,OAAO,CAAC,OAAO;IAH3B,OAAO,CAAC,SAAS,CAAmB;IACpC,OAAO,CAAC,UAAU,CAAiB;gBAEf,OAAO,EAAE,MAAM;IAI7B,GAAG;IA0BT,OAAO,CAAC,WAAW;IAeb,WAAW,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAYlD,YAAY,CAAC,MAAM,EAAE,MAAM;IAW3B,YAAY,CAAC,YAAY,CAAC,EAAE,MAAM;YAkB1B,kBAAkB;YA4BlB,cAAc;YAQd,aAAa;YAsBb,WAAW;IAmBzB,OAAO,CAAC,aAAa;CAMtB"}
|
package/lib/auth/device-flow.js
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { logger } from '@redocly/openapi-core';
|
|
2
|
+
import { blue, green } from 'colorette';
|
|
3
|
+
import * as childProcess from 'node:child_process';
|
|
4
|
+
import { ReuniteApiClient } from '../reunite/api/api-client.js';
|
|
5
|
+
import { DEFAULT_FETCH_TIMEOUT } from '../utils/constants.js';
|
|
6
|
+
export class RedoclyOAuthDeviceFlow {
|
|
7
|
+
baseUrl;
|
|
8
|
+
apiClient;
|
|
9
|
+
clientName = 'redocly-cli';
|
|
10
|
+
constructor(baseUrl) {
|
|
9
11
|
this.baseUrl = baseUrl;
|
|
10
|
-
this.
|
|
11
|
-
this.version = version;
|
|
12
|
-
this.apiClient = new api_client_1.ReuniteApiClient(this.version, 'login');
|
|
12
|
+
this.apiClient = new ReuniteApiClient('login');
|
|
13
13
|
}
|
|
14
14
|
async run() {
|
|
15
15
|
const code = await this.getDeviceCode();
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
16
|
+
logger.output('Attempting to automatically open the SSO authorization page in your default browser.\n');
|
|
17
|
+
logger.output('If the browser does not open or you wish to use a different device to authorize this request, open the following URL:\n\n');
|
|
18
|
+
logger.output(blue(code.verificationUri));
|
|
19
|
+
logger.output(`\n\n`);
|
|
20
|
+
logger.output(`Then enter the code:\n\n`);
|
|
21
|
+
logger.output(blue(code.userCode));
|
|
22
|
+
logger.output(`\n\n`);
|
|
23
23
|
this.openBrowser(code.verificationUriComplete);
|
|
24
24
|
const accessToken = await this.pollingAccessToken(code.deviceCode, code.interval, code.expiresIn);
|
|
25
|
-
|
|
26
|
-
return accessToken;
|
|
25
|
+
logger.output(green('✅ Logged in\n\n'));
|
|
26
|
+
return this.withResidency(accessToken);
|
|
27
27
|
}
|
|
28
28
|
openBrowser(url) {
|
|
29
29
|
try {
|
|
@@ -69,11 +69,11 @@ class RedoclyOAuthDeviceFlow {
|
|
|
69
69
|
if (!response.access_token) {
|
|
70
70
|
throw new Error('Failed to refresh token');
|
|
71
71
|
}
|
|
72
|
-
return {
|
|
72
|
+
return this.withResidency({
|
|
73
73
|
access_token: response.access_token,
|
|
74
74
|
refresh_token: response.refresh_token,
|
|
75
75
|
expires_in: response.expires_in,
|
|
76
|
-
};
|
|
76
|
+
});
|
|
77
77
|
}
|
|
78
78
|
async pollingAccessToken(deviceCode, interval, expiresIn) {
|
|
79
79
|
return new Promise((resolve, reject) => {
|
|
@@ -117,17 +117,24 @@ class RedoclyOAuthDeviceFlow {
|
|
|
117
117
|
expiresIn,
|
|
118
118
|
};
|
|
119
119
|
}
|
|
120
|
-
async sendRequest(
|
|
121
|
-
url = `${this.baseUrl}${
|
|
120
|
+
async sendRequest(path, method = 'GET', body = undefined, headers = {}) {
|
|
121
|
+
const url = `${this.baseUrl}/api${path}`;
|
|
122
122
|
const response = await this.apiClient.request(url, {
|
|
123
123
|
body: body ? JSON.stringify(body) : body,
|
|
124
124
|
method,
|
|
125
125
|
headers: { 'Content-Type': 'application/json', ...headers },
|
|
126
|
+
timeout: DEFAULT_FETCH_TIMEOUT,
|
|
126
127
|
});
|
|
127
128
|
if (response.status === 204) {
|
|
128
129
|
return { success: true };
|
|
129
130
|
}
|
|
130
131
|
return await response.json();
|
|
131
132
|
}
|
|
133
|
+
withResidency(credentials) {
|
|
134
|
+
return {
|
|
135
|
+
...credentials,
|
|
136
|
+
residency: this.baseUrl,
|
|
137
|
+
};
|
|
138
|
+
}
|
|
132
139
|
}
|
|
133
|
-
|
|
140
|
+
//# sourceMappingURL=device-flow.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"device-flow.js","sourceRoot":"","sources":["../../src/auth/device-flow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,KAAK,YAAY,MAAM,oBAAoB,CAAC;AAEnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAU9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C;CACF"}
|
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
export declare class RedoclyOAuthClient {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
private
|
|
6
|
-
private
|
|
7
|
-
constructor(
|
|
2
|
+
readonly credentialsFolderPath: string;
|
|
3
|
+
readonly credentialsFilePath: string;
|
|
4
|
+
readonly credentialsFileName: string;
|
|
5
|
+
private readonly key;
|
|
6
|
+
private readonly iv;
|
|
7
|
+
constructor();
|
|
8
8
|
login(baseUrl: string): Promise<void>;
|
|
9
9
|
logout(): Promise<void>;
|
|
10
|
-
isAuthorized(
|
|
11
|
-
|
|
12
|
-
private
|
|
13
|
-
private
|
|
10
|
+
isAuthorized(reuniteUrl: string, apiKey?: string): Promise<boolean>;
|
|
11
|
+
getAccessToken: (reuniteUrl: string) => Promise<string | null>;
|
|
12
|
+
private saveCredentials;
|
|
13
|
+
private readCredentials;
|
|
14
|
+
private removeCredentials;
|
|
15
|
+
private encryptCredentials;
|
|
16
|
+
private decryptCredentials;
|
|
14
17
|
}
|
|
18
|
+
//# sourceMappingURL=oauth-client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"oauth-client.d.ts","sourceRoot":"","sources":["../../src/auth/oauth-client.ts"],"names":[],"mappings":"AAaA,qBAAa,kBAAkB;IAC7B,SAAgB,qBAAqB,EAAE,MAAM,CAAC;IAC9C,SAAgB,mBAAmB,EAAE,MAAM,CAAC;IAC5C,SAAgB,mBAAmB,EAAE,MAAM,CAAC;IAE5C,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAS;IAC7B,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAS;;IAkBf,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAUrC,MAAM;IAQN,YAAY,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAWzE,cAAc,GAAU,YAAY,MAAM,KAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CA0BxE;YAEY,eAAe;YASf,eAAe;YAaf,iBAAiB;IAM/B,OAAO,CAAC,kBAAkB;IAU1B,OAAO,CAAC,kBAAkB;CAS3B"}
|
package/lib/auth/oauth-client.js
CHANGED
|
@@ -1,93 +1,117 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
const
|
|
10
|
-
const SALT = '4618dbc9-8aed-4e27-aaf0-225f4603e5a4';
|
|
1
|
+
import { logger } from '@redocly/openapi-core';
|
|
2
|
+
import { Buffer } from 'node:buffer';
|
|
3
|
+
import crypto from 'node:crypto';
|
|
4
|
+
import { mkdirSync, existsSync, writeFileSync, readFileSync, rmSync } from 'node:fs';
|
|
5
|
+
import { homedir } from 'node:os';
|
|
6
|
+
import path from 'node:path';
|
|
7
|
+
import { isValidReuniteUrl } from '../reunite/api/domains.js';
|
|
8
|
+
import { RedoclyOAuthDeviceFlow } from './device-flow.js';
|
|
9
|
+
const CREDENTIALS_SALT = '4618dbc9-8aed-4e27-aaf0-225f4603e5a4';
|
|
11
10
|
const CRYPTO_ALGORITHM = 'aes-256-cbc';
|
|
12
|
-
class RedoclyOAuthClient {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
this.
|
|
11
|
+
export class RedoclyOAuthClient {
|
|
12
|
+
credentialsFolderPath;
|
|
13
|
+
credentialsFilePath;
|
|
14
|
+
credentialsFileName;
|
|
15
|
+
key;
|
|
16
|
+
iv;
|
|
17
|
+
constructor() {
|
|
18
|
+
const homeDirPath = homedir();
|
|
19
|
+
this.credentialsFolderPath = path.join(homeDirPath, '.redocly');
|
|
20
|
+
this.credentialsFileName = 'credentials';
|
|
21
|
+
this.credentialsFilePath = path.join(this.credentialsFolderPath, this.credentialsFileName);
|
|
22
|
+
this.key = crypto
|
|
23
|
+
.createHash('sha256')
|
|
24
|
+
.update(`${this.credentialsFolderPath}${CREDENTIALS_SALT}`)
|
|
25
|
+
.digest();
|
|
26
|
+
this.iv = crypto.createHash('md5').update(this.credentialsFolderPath).digest();
|
|
27
|
+
mkdirSync(this.credentialsFolderPath, { recursive: true });
|
|
28
28
|
}
|
|
29
29
|
async login(baseUrl) {
|
|
30
|
-
const deviceFlow = new
|
|
31
|
-
const
|
|
32
|
-
if (!
|
|
33
|
-
throw new Error('Failed to login');
|
|
30
|
+
const deviceFlow = new RedoclyOAuthDeviceFlow(baseUrl);
|
|
31
|
+
const credentials = await deviceFlow.run();
|
|
32
|
+
if (!credentials) {
|
|
33
|
+
throw new Error('Failed to login. No credentials received.');
|
|
34
34
|
}
|
|
35
|
-
this.
|
|
35
|
+
this.saveCredentials(credentials);
|
|
36
36
|
}
|
|
37
37
|
async logout() {
|
|
38
38
|
try {
|
|
39
|
-
this.
|
|
39
|
+
this.removeCredentials();
|
|
40
40
|
}
|
|
41
41
|
catch (err) {
|
|
42
42
|
// do nothing
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
|
-
async isAuthorized(
|
|
46
|
-
const deviceFlow = new device_flow_1.RedoclyOAuthDeviceFlow(baseUrl, this.clientName, this.version);
|
|
45
|
+
async isAuthorized(reuniteUrl, apiKey) {
|
|
47
46
|
if (apiKey) {
|
|
48
|
-
|
|
47
|
+
const deviceFlow = new RedoclyOAuthDeviceFlow(reuniteUrl);
|
|
48
|
+
return deviceFlow.verifyApiKey(apiKey);
|
|
49
49
|
}
|
|
50
|
-
const
|
|
51
|
-
|
|
52
|
-
|
|
50
|
+
const accessToken = await this.getAccessToken(reuniteUrl);
|
|
51
|
+
return Boolean(accessToken);
|
|
52
|
+
}
|
|
53
|
+
getAccessToken = async (reuniteUrl) => {
|
|
54
|
+
const deviceFlow = new RedoclyOAuthDeviceFlow(reuniteUrl);
|
|
55
|
+
const credentials = await this.readCredentials();
|
|
56
|
+
if (!credentials ||
|
|
57
|
+
!isValidReuniteUrl(reuniteUrl) ||
|
|
58
|
+
(credentials.residency && credentials.residency !== reuniteUrl)) {
|
|
59
|
+
return null;
|
|
53
60
|
}
|
|
54
|
-
const
|
|
55
|
-
if (
|
|
56
|
-
return
|
|
61
|
+
const isValid = await deviceFlow.verifyToken(credentials.access_token);
|
|
62
|
+
if (isValid) {
|
|
63
|
+
return credentials.access_token;
|
|
57
64
|
}
|
|
58
65
|
try {
|
|
59
|
-
const
|
|
60
|
-
await this.
|
|
66
|
+
const newCredentials = await deviceFlow.refreshToken(credentials.refresh_token);
|
|
67
|
+
await this.saveCredentials(newCredentials);
|
|
68
|
+
return newCredentials.access_token;
|
|
61
69
|
}
|
|
62
70
|
catch {
|
|
63
|
-
return
|
|
71
|
+
return null;
|
|
64
72
|
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
async saveToken(token) {
|
|
73
|
+
};
|
|
74
|
+
async saveCredentials(credentials) {
|
|
68
75
|
try {
|
|
69
|
-
const
|
|
70
|
-
|
|
76
|
+
const encryptedCredentials = this.encryptCredentials(credentials);
|
|
77
|
+
writeFileSync(this.credentialsFilePath, encryptedCredentials, 'utf8');
|
|
71
78
|
}
|
|
72
79
|
catch (error) {
|
|
73
|
-
|
|
80
|
+
logger.error(`Failed to save credentials: ${error.message}`);
|
|
74
81
|
}
|
|
75
82
|
}
|
|
76
|
-
async
|
|
83
|
+
async readCredentials() {
|
|
84
|
+
if (!existsSync(this.credentialsFilePath)) {
|
|
85
|
+
return null;
|
|
86
|
+
}
|
|
77
87
|
try {
|
|
78
|
-
const
|
|
79
|
-
|
|
80
|
-
return decrypted ? JSON.parse(decrypted) : null;
|
|
88
|
+
const encryptedCredentials = readFileSync(this.credentialsFilePath, 'utf8');
|
|
89
|
+
return this.decryptCredentials(encryptedCredentials);
|
|
81
90
|
}
|
|
82
91
|
catch {
|
|
83
92
|
return null;
|
|
84
93
|
}
|
|
85
94
|
}
|
|
86
|
-
async
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
(0, node_fs_1.rmSync)(tokenPath);
|
|
95
|
+
async removeCredentials() {
|
|
96
|
+
if (existsSync(this.credentialsFilePath)) {
|
|
97
|
+
rmSync(this.credentialsFilePath);
|
|
90
98
|
}
|
|
91
99
|
}
|
|
100
|
+
encryptCredentials(credentials) {
|
|
101
|
+
const cipher = crypto.createCipheriv(CRYPTO_ALGORITHM, this.key, this.iv);
|
|
102
|
+
const encrypted = Buffer.concat([
|
|
103
|
+
cipher.update(JSON.stringify(credentials), 'utf8'),
|
|
104
|
+
cipher.final(),
|
|
105
|
+
]);
|
|
106
|
+
return encrypted.toString('hex');
|
|
107
|
+
}
|
|
108
|
+
decryptCredentials(encryptedCredentials) {
|
|
109
|
+
const decipher = crypto.createDecipheriv(CRYPTO_ALGORITHM, this.key, this.iv);
|
|
110
|
+
const decrypted = Buffer.concat([
|
|
111
|
+
decipher.update(Buffer.from(encryptedCredentials, 'hex')),
|
|
112
|
+
decipher.final(),
|
|
113
|
+
]);
|
|
114
|
+
return JSON.parse(decrypted.toString('utf8'));
|
|
115
|
+
}
|
|
92
116
|
}
|
|
93
|
-
|
|
117
|
+
//# sourceMappingURL=oauth-client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"oauth-client.js","sourceRoot":"","sources":["../../src/auth/oauth-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACrF,OAAO,EAAE,OAAO,EA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MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC;YAC9B,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;YAClD,MAAM,CAAC,KAAK,EAAE;SACf,CAAC,CAAC;QAEH,OAAO,SAAS,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IACnC,CAAC;IAEO,kBAAkB,CAAC,oBAA4B;QACrD,MAAM,QAAQ,GAAG,MAAM,CAAC,gBAAgB,CAAC,gBAAgB,EAAE,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC;QAC9E,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC;YAC9B,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,oBAAoB,EAAE,KAAK,CAAC,CAAC;YACzD,QAAQ,CAAC,KAAK,EAAE;SACjB,CAAC,CAAC;QAEH,OAAO,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC;IAChD,CAAC;CACF"}
|
package/lib/commands/auth.d.ts
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import type { CommandArgs } from '../wrapper';
|
|
2
|
-
export
|
|
3
|
-
export type LoginOptions = {
|
|
4
|
-
verbose?: boolean;
|
|
1
|
+
import type { CommandArgs } from '../wrapper.js';
|
|
2
|
+
export type LoginArgv = {
|
|
5
3
|
residency?: string;
|
|
6
4
|
config?: string;
|
|
7
|
-
|
|
5
|
+
verbose?: boolean;
|
|
8
6
|
};
|
|
9
|
-
export declare function handleLogin({ argv, config
|
|
10
|
-
export type
|
|
7
|
+
export declare function handleLogin({ argv, config }: CommandArgs<LoginArgv>): Promise<void>;
|
|
8
|
+
export type LogoutArgv = {
|
|
11
9
|
config?: string;
|
|
12
10
|
};
|
|
13
|
-
export declare function handleLogout(
|
|
11
|
+
export declare function handleLogout(): Promise<void>;
|
|
12
|
+
//# sourceMappingURL=auth.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../src/commands/auth.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAEjD,MAAM,MAAM,SAAS,GAAG;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,wBAAsB,WAAW,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,WAAW,CAAC,SAAS,CAAC,iBAwBzE;AAED,MAAM,MAAM,UAAU,GAAG;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,wBAAsB,YAAY,kBAKjC"}
|
package/lib/commands/auth.js
CHANGED
|
@@ -1,51 +1,34 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
return (0, miscellaneous_1.promptUser)((0, colorette_1.green)(`\n 🔑 Copy your API key from ${(0, colorette_1.blue)(`https://app.${domain}/profile`)} and paste it below`) + (0, colorette_1.yellow)(' (if you want to log in with Reunite, please run `redocly login --next` instead)'), true);
|
|
13
|
-
}
|
|
14
|
-
async function handleLogin({ argv, config, version }) {
|
|
15
|
-
if (argv.next) {
|
|
16
|
-
try {
|
|
17
|
-
const reuniteUrl = (0, api_1.getReuniteUrl)(argv.residency);
|
|
18
|
-
const oauthClient = new oauth_client_1.RedoclyOAuthClient('redocly-cli', version);
|
|
19
|
-
await oauthClient.login(reuniteUrl);
|
|
20
|
-
}
|
|
21
|
-
catch {
|
|
22
|
-
if (argv.residency) {
|
|
23
|
-
const reuniteUrl = (0, api_1.getReuniteUrl)(argv.residency);
|
|
24
|
-
(0, miscellaneous_1.exitWithError)(`❌ Connection to ${reuniteUrl} failed.`);
|
|
25
|
-
}
|
|
26
|
-
else {
|
|
27
|
-
(0, miscellaneous_1.exitWithError)(`❌ Login failed. Please check your credentials and try again.`);
|
|
28
|
-
}
|
|
1
|
+
import { logger } from '@redocly/openapi-core';
|
|
2
|
+
import { RedoclyOAuthClient } from '../auth/oauth-client.js';
|
|
3
|
+
import { getReuniteUrl } from '../reunite/api/index.js';
|
|
4
|
+
import { exitWithError } from '../utils/error.js';
|
|
5
|
+
export async function handleLogin({ argv, config }) {
|
|
6
|
+
const reuniteUrl = getReuniteUrl(config, argv.residency);
|
|
7
|
+
try {
|
|
8
|
+
const oauthClient = new RedoclyOAuthClient();
|
|
9
|
+
if (argv.verbose) {
|
|
10
|
+
logger.info(`OAuth client initialized.\n`);
|
|
11
|
+
logger.info(`Local credentials file path: ${oauthClient.credentialsFilePath}\n`);
|
|
29
12
|
}
|
|
13
|
+
await oauthClient.login(reuniteUrl);
|
|
30
14
|
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
15
|
+
catch (error) {
|
|
16
|
+
if (argv.verbose) {
|
|
17
|
+
logger.error(`Residency: ${argv.residency}.\n`);
|
|
18
|
+
logger.error(`Login URL: ${reuniteUrl}.\n`);
|
|
19
|
+
logger.error(error.stack || error.message);
|
|
20
|
+
}
|
|
21
|
+
if (argv.residency) {
|
|
22
|
+
exitWithError(`❌ Connection to ${reuniteUrl} failed.`);
|
|
39
23
|
}
|
|
40
|
-
|
|
41
|
-
(
|
|
24
|
+
else {
|
|
25
|
+
exitWithError(`❌ Login failed. Please check your credentials and try again.`);
|
|
42
26
|
}
|
|
43
27
|
}
|
|
44
28
|
}
|
|
45
|
-
async function handleLogout(
|
|
46
|
-
const
|
|
47
|
-
client.logout();
|
|
48
|
-
const oauthClient = new oauth_client_1.RedoclyOAuthClient('redocly-cli', version);
|
|
29
|
+
export async function handleLogout() {
|
|
30
|
+
const oauthClient = new RedoclyOAuthClient();
|
|
49
31
|
oauthClient.logout();
|
|
50
|
-
|
|
32
|
+
logger.output('Logged out from the Redocly account. ✋ \n');
|
|
51
33
|
}
|
|
34
|
+
//# sourceMappingURL=auth.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../../src/commands/auth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAE/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AASlD,MAAM,CAAC,KAAK,UAAU,WAAW,CAAC,EAAE,IAAI,EAAE,MAAM,EAA0B;IACxE,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;IACzD,IAAI,CAAC;QACH,MAAM,WAAW,GAAG,IAAI,kBAAkB,EAAE,CAAC;QAE7C,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;YACjB,MAAM,CAAC,IAAI,CAAC,6BAA6B,CAAC,CAAC;YAC3C,MAAM,CAAC,IAAI,CAAC,gCAAgC,WAAW,CAAC,mBAAmB,IAAI,CAAC,CAAC;QACnF,CAAC;QAED,MAAM,WAAW,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;IACtC,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;YACjB,MAAM,CAAC,KAAK,CAAC,cAAc,IAAI,CAAC,SAAS,KAAK,CAAC,CAAC;YAChD,MAAM,CAAC,KAAK,CAAC,cAAc,UAAU,KAAK,CAAC,CAAC;YAC5C,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC;QAC7C,CAAC;QAED,IAAI,IAAI,CAAC,SAAS,EAAE,CAAC;YACnB,aAAa,CAAC,mBAAmB,UAAU,UAAU,CAAC,CAAC;QACzD,CAAC;aAAM,CAAC;YACN,aAAa,CAAC,8DAA8D,CAAC,CAAC;QAChF,CAAC;IACH,CAAC;AACH,CAAC;AAMD,MAAM,CAAC,KAAK,UAAU,YAAY;IAChC,MAAM,WAAW,GAAG,IAAI,kBAAkB,EAAE,CAAC;IAC7C,WAAW,CAAC,MAAM,EAAE,CAAC;IAErB,MAAM,CAAC,MAAM,CAAC,2CAA2C,CAAC,CAAC;AAC7D,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
3
|
-
export declare const handlerBuildCommand: ({ argv, config
|
|
1
|
+
import type { CommandArgs } from '../../wrapper.js';
|
|
2
|
+
import type { BuildDocsArgv } from './types.js';
|
|
3
|
+
export declare const handlerBuildCommand: ({ argv, config, collectSpecData, }: CommandArgs<BuildDocsArgv>) => Promise<void>;
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/build-docs/index.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAKhD,eAAO,MAAM,mBAAmB,GAAU,oCAIvC,WAAW,CAAC,aAAa,CAAC,kBAuC5B,CAAC"}
|