@redocly/cli 2.33.1 → 2.34.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +7 -0
- package/THIRD_PARTY_NOTICES +767 -0
- package/lib/chunks/2ULY6UWW.js +13374 -0
- package/lib/chunks/4DNBVE5S.js +23 -0
- package/lib/chunks/5ILQMFXK.js +59 -0
- package/lib/chunks/7GOGGHM5.js +92239 -0
- package/lib/chunks/A6JSOHCP.js +41 -0
- package/lib/chunks/AIT3U3JT.js +22 -0
- package/lib/chunks/EIHBO33S.js +1133 -0
- package/lib/chunks/FDUPOI4C.js +19036 -0
- package/lib/chunks/FO6BDVGE.js +25 -0
- package/lib/chunks/FP2VGYMF.js +90 -0
- package/lib/chunks/GRMVFQAA.js +17782 -0
- package/lib/chunks/ICAVAH7N.js +387 -0
- package/lib/chunks/OEYVENNB.js +37533 -0
- package/lib/chunks/TS33ZDKX.js +35 -0
- package/lib/chunks/VUDTNFRL.js +42 -0
- package/lib/chunks/VXIQEZPR.js +2564 -0
- package/lib/chunks/W7G5WVPB.js +44 -0
- package/lib/chunks/XHPY6UJF.js +1638 -0
- package/lib/chunks/Y6DTFCLS.js +15 -0
- package/lib/chunks/YA5P3RI2.js +13 -0
- package/lib/chunks/ZIYSHX6D.js +3617 -0
- package/lib/index.js +13606 -620
- package/package.json +13 -53
- package/lib/auth/device-flow.d.ts +0 -24
- package/lib/auth/device-flow.d.ts.map +0 -1
- package/lib/auth/device-flow.js +0 -140
- package/lib/auth/device-flow.js.map +0 -1
- package/lib/auth/oauth-client.d.ts +0 -18
- package/lib/auth/oauth-client.d.ts.map +0 -1
- package/lib/auth/oauth-client.js +0 -117
- package/lib/auth/oauth-client.js.map +0 -1
- package/lib/commands/auth.d.ts +0 -12
- package/lib/commands/auth.d.ts.map +0 -1
- package/lib/commands/auth.js +0 -34
- package/lib/commands/auth.js.map +0 -1
- package/lib/commands/build-docs/index.d.ts +0 -4
- package/lib/commands/build-docs/index.d.ts.map +0 -1
- package/lib/commands/build-docs/index.js +0 -38
- package/lib/commands/build-docs/index.js.map +0 -1
- package/lib/commands/build-docs/template.hbs +0 -23
- package/lib/commands/build-docs/types.d.ts +0 -24
- package/lib/commands/build-docs/types.d.ts.map +0 -1
- package/lib/commands/build-docs/types.js +0 -2
- package/lib/commands/build-docs/types.js.map +0 -1
- package/lib/commands/build-docs/utils.d.ts +0 -8
- package/lib/commands/build-docs/utils.d.ts.map +0 -1
- package/lib/commands/build-docs/utils.js +0 -84
- package/lib/commands/build-docs/utils.js.map +0 -1
- package/lib/commands/bundle.d.ts +0 -20
- package/lib/commands/bundle.d.ts.map +0 -1
- package/lib/commands/bundle.js +0 -93
- package/lib/commands/bundle.js.map +0 -1
- package/lib/commands/eject.d.ts +0 -10
- package/lib/commands/eject.d.ts.map +0 -1
- package/lib/commands/eject.js +0 -26
- package/lib/commands/eject.js.map +0 -1
- package/lib/commands/generate-arazzo.d.ts +0 -8
- package/lib/commands/generate-arazzo.d.ts.map +0 -1
- package/lib/commands/generate-arazzo.js +0 -25
- package/lib/commands/generate-arazzo.js.map +0 -1
- package/lib/commands/join/index.d.ts +0 -4
- package/lib/commands/join/index.d.ts.map +0 -1
- package/lib/commands/join/index.js +0 -141
- package/lib/commands/join/index.js.map +0 -1
- package/lib/commands/join/types.d.ts +0 -22
- package/lib/commands/join/types.d.ts.map +0 -1
- package/lib/commands/join/types.js +0 -2
- package/lib/commands/join/types.js.map +0 -1
- package/lib/commands/join/utils/add-components-prefix.d.ts +0 -2
- package/lib/commands/join/utils/add-components-prefix.d.ts.map +0 -1
- package/lib/commands/join/utils/add-components-prefix.js +0 -9
- package/lib/commands/join/utils/add-components-prefix.js.map +0 -1
- package/lib/commands/join/utils/add-info-section.d.ts +0 -2
- package/lib/commands/join/utils/add-info-section.d.ts.map +0 -1
- package/lib/commands/join/utils/add-info-section.js +0 -19
- package/lib/commands/join/utils/add-info-section.js.map +0 -1
- package/lib/commands/join/utils/add-prefix.d.ts +0 -2
- package/lib/commands/join/utils/add-prefix.d.ts.map +0 -1
- package/lib/commands/join/utils/add-prefix.js +0 -4
- package/lib/commands/join/utils/add-prefix.js.map +0 -1
- package/lib/commands/join/utils/add-security-prefix.d.ts +0 -2
- package/lib/commands/join/utils/add-security-prefix.d.ts.map +0 -1
- package/lib/commands/join/utils/add-security-prefix.js +0 -12
- package/lib/commands/join/utils/add-security-prefix.js.map +0 -1
- package/lib/commands/join/utils/collect-components.d.ts +0 -7
- package/lib/commands/join/utils/collect-components.d.ts.map +0 -1
- package/lib/commands/join/utils/collect-components.js +0 -26
- package/lib/commands/join/utils/collect-components.js.map +0 -1
- package/lib/commands/join/utils/collect-external-docs.d.ts +0 -7
- package/lib/commands/join/utils/collect-external-docs.d.ts.map +0 -1
- package/lib/commands/join/utils/collect-external-docs.js +0 -15
- package/lib/commands/join/utils/collect-external-docs.js.map +0 -1
- package/lib/commands/join/utils/collect-paths.d.ts +0 -9
- package/lib/commands/join/utils/collect-paths.d.ts.map +0 -1
- package/lib/commands/join/utils/collect-paths.js +0 -172
- package/lib/commands/join/utils/collect-paths.js.map +0 -1
- package/lib/commands/join/utils/collect-webhooks.d.ts +0 -8
- package/lib/commands/join/utils/collect-webhooks.d.ts.map +0 -1
- package/lib/commands/join/utils/collect-webhooks.js +0 -46
- package/lib/commands/join/utils/collect-webhooks.js.map +0 -1
- package/lib/commands/join/utils/duplicate-tag-description-warning.d.ts +0 -2
- package/lib/commands/join/utils/duplicate-tag-description-warning.d.ts.map +0 -1
- package/lib/commands/join/utils/duplicate-tag-description-warning.js +0 -8
- package/lib/commands/join/utils/duplicate-tag-description-warning.js.map +0 -1
- package/lib/commands/join/utils/filter-conflicts.d.ts +0 -2
- package/lib/commands/join/utils/filter-conflicts.d.ts.map +0 -1
- package/lib/commands/join/utils/filter-conflicts.js +0 -4
- package/lib/commands/join/utils/filter-conflicts.js.map +0 -1
- package/lib/commands/join/utils/format-tags.d.ts +0 -4
- package/lib/commands/join/utils/format-tags.d.ts.map +0 -1
- package/lib/commands/join/utils/format-tags.js +0 -4
- package/lib/commands/join/utils/format-tags.js.map +0 -1
- package/lib/commands/join/utils/get-api-filename.d.ts +0 -2
- package/lib/commands/join/utils/get-api-filename.d.ts.map +0 -1
- package/lib/commands/join/utils/get-api-filename.js +0 -5
- package/lib/commands/join/utils/get-api-filename.js.map +0 -1
- package/lib/commands/join/utils/get-info-prefix.d.ts +0 -2
- package/lib/commands/join/utils/get-info-prefix.d.ts.map +0 -1
- package/lib/commands/join/utils/get-info-prefix.js +0 -17
- package/lib/commands/join/utils/get-info-prefix.js.map +0 -1
- package/lib/commands/join/utils/index.d.ts +0 -19
- package/lib/commands/join/utils/index.d.ts.map +0 -1
- package/lib/commands/join/utils/index.js +0 -19
- package/lib/commands/join/utils/index.js.map +0 -1
- package/lib/commands/join/utils/iterate-potential-conflicts.d.ts +0 -5
- package/lib/commands/join/utils/iterate-potential-conflicts.d.ts.map +0 -1
- package/lib/commands/join/utils/iterate-potential-conflicts.js +0 -53
- package/lib/commands/join/utils/iterate-potential-conflicts.js.map +0 -1
- package/lib/commands/join/utils/populate-tags.d.ts +0 -7
- package/lib/commands/join/utils/populate-tags.d.ts.map +0 -1
- package/lib/commands/join/utils/populate-tags.js +0 -77
- package/lib/commands/join/utils/populate-tags.js.map +0 -1
- package/lib/commands/join/utils/prefix-tag-suggestion.d.ts +0 -2
- package/lib/commands/join/utils/prefix-tag-suggestion.d.ts.map +0 -1
- package/lib/commands/join/utils/prefix-tag-suggestion.js +0 -6
- package/lib/commands/join/utils/prefix-tag-suggestion.js.map +0 -1
- package/lib/commands/join/utils/replace-$-refs.d.ts +0 -2
- package/lib/commands/join/utils/replace-$-refs.d.ts.map +0 -1
- package/lib/commands/join/utils/replace-$-refs.js +0 -29
- package/lib/commands/join/utils/replace-$-refs.js.map +0 -1
- package/lib/commands/join/utils/show-conflicts.d.ts +0 -2
- package/lib/commands/join/utils/show-conflicts.d.ts.map +0 -1
- package/lib/commands/join/utils/show-conflicts.js +0 -8
- package/lib/commands/join/utils/show-conflicts.js.map +0 -1
- package/lib/commands/lint.d.ts +0 -15
- package/lib/commands/lint.d.ts.map +0 -1
- package/lib/commands/lint.js +0 -112
- package/lib/commands/lint.js.map +0 -1
- package/lib/commands/preview-project/constants.d.ts +0 -15
- package/lib/commands/preview-project/constants.d.ts.map +0 -1
- package/lib/commands/preview-project/constants.js +0 -20
- package/lib/commands/preview-project/constants.js.map +0 -1
- package/lib/commands/preview-project/index.d.ts +0 -4
- package/lib/commands/preview-project/index.d.ts.map +0 -1
- package/lib/commands/preview-project/index.js +0 -54
- package/lib/commands/preview-project/index.js.map +0 -1
- package/lib/commands/preview-project/types.d.ts +0 -11
- package/lib/commands/preview-project/types.d.ts.map +0 -1
- package/lib/commands/preview-project/types.js +0 -2
- package/lib/commands/preview-project/types.js.map +0 -1
- package/lib/commands/respect/connection-client.d.ts +0 -12
- package/lib/commands/respect/connection-client.d.ts.map +0 -1
- package/lib/commands/respect/connection-client.js +0 -73
- package/lib/commands/respect/connection-client.js.map +0 -1
- package/lib/commands/respect/display-files-summary-table.d.ts +0 -12
- package/lib/commands/respect/display-files-summary-table.d.ts.map +0 -1
- package/lib/commands/respect/display-files-summary-table.js +0 -65
- package/lib/commands/respect/display-files-summary-table.js.map +0 -1
- package/lib/commands/respect/har-logs/har-logs.d.ts +0 -6
- package/lib/commands/respect/har-logs/har-logs.d.ts.map +0 -1
- package/lib/commands/respect/har-logs/har-logs.js +0 -28
- package/lib/commands/respect/har-logs/har-logs.js.map +0 -1
- package/lib/commands/respect/har-logs/helpers/add-headers.d.ts +0 -2
- package/lib/commands/respect/har-logs/helpers/add-headers.d.ts.map +0 -1
- package/lib/commands/respect/har-logs/helpers/add-headers.js +0 -17
- package/lib/commands/respect/har-logs/helpers/add-headers.js.map +0 -1
- package/lib/commands/respect/har-logs/helpers/build-headers.d.ts +0 -10
- package/lib/commands/respect/har-logs/helpers/build-headers.d.ts.map +0 -1
- package/lib/commands/respect/har-logs/helpers/build-headers.js +0 -33
- package/lib/commands/respect/har-logs/helpers/build-headers.js.map +0 -1
- package/lib/commands/respect/har-logs/helpers/build-request-cookies.d.ts +0 -2
- package/lib/commands/respect/har-logs/helpers/build-request-cookies.d.ts.map +0 -1
- package/lib/commands/respect/har-logs/helpers/build-request-cookies.js +0 -18
- package/lib/commands/respect/har-logs/helpers/build-request-cookies.js.map +0 -1
- package/lib/commands/respect/har-logs/helpers/build-response-cookies.d.ts +0 -2
- package/lib/commands/respect/har-logs/helpers/build-response-cookies.d.ts.map +0 -1
- package/lib/commands/respect/har-logs/helpers/build-response-cookies.js +0 -40
- package/lib/commands/respect/har-logs/helpers/build-response-cookies.js.map +0 -1
- package/lib/commands/respect/har-logs/helpers/get-duration.d.ts +0 -2
- package/lib/commands/respect/har-logs/helpers/get-duration.d.ts.map +0 -1
- package/lib/commands/respect/har-logs/helpers/get-duration.js +0 -6
- package/lib/commands/respect/har-logs/helpers/get-duration.js.map +0 -1
- package/lib/commands/respect/har-logs/index.d.ts +0 -2
- package/lib/commands/respect/har-logs/index.d.ts.map +0 -1
- package/lib/commands/respect/har-logs/index.js +0 -2
- package/lib/commands/respect/har-logs/index.js.map +0 -1
- package/lib/commands/respect/har-logs/with-har.d.ts +0 -7
- package/lib/commands/respect/har-logs/with-har.d.ts.map +0 -1
- package/lib/commands/respect/har-logs/with-har.js +0 -182
- package/lib/commands/respect/har-logs/with-har.js.map +0 -1
- package/lib/commands/respect/index.d.ts +0 -27
- package/lib/commands/respect/index.d.ts.map +0 -1
- package/lib/commands/respect/index.js +0 -115
- package/lib/commands/respect/index.js.map +0 -1
- package/lib/commands/respect/json-logs.d.ts +0 -11
- package/lib/commands/respect/json-logs.d.ts.map +0 -1
- package/lib/commands/respect/json-logs.js +0 -85
- package/lib/commands/respect/json-logs.js.map +0 -1
- package/lib/commands/respect/mtls/resolve-mtls-certificates.d.ts +0 -9
- package/lib/commands/respect/mtls/resolve-mtls-certificates.d.ts.map +0 -1
- package/lib/commands/respect/mtls/resolve-mtls-certificates.js +0 -48
- package/lib/commands/respect/mtls/resolve-mtls-certificates.js.map +0 -1
- package/lib/commands/respect/mtls/validate-mtls-command-option.d.ts +0 -3
- package/lib/commands/respect/mtls/validate-mtls-command-option.d.ts.map +0 -1
- package/lib/commands/respect/mtls/validate-mtls-command-option.js +0 -55
- package/lib/commands/respect/mtls/validate-mtls-command-option.js.map +0 -1
- package/lib/commands/score/collect-metrics.d.ts +0 -17
- package/lib/commands/score/collect-metrics.d.ts.map +0 -1
- package/lib/commands/score/collect-metrics.js +0 -195
- package/lib/commands/score/collect-metrics.js.map +0 -1
- package/lib/commands/score/collectors/dependency-graph.d.ts +0 -9
- package/lib/commands/score/collectors/dependency-graph.d.ts.map +0 -1
- package/lib/commands/score/collectors/dependency-graph.js +0 -61
- package/lib/commands/score/collectors/dependency-graph.js.map +0 -1
- package/lib/commands/score/collectors/document-metrics.d.ts +0 -69
- package/lib/commands/score/collectors/document-metrics.d.ts.map +0 -1
- package/lib/commands/score/collectors/document-metrics.js +0 -343
- package/lib/commands/score/collectors/document-metrics.js.map +0 -1
- package/lib/commands/score/constants.d.ts +0 -4
- package/lib/commands/score/constants.d.ts.map +0 -1
- package/lib/commands/score/constants.js +0 -47
- package/lib/commands/score/constants.js.map +0 -1
- package/lib/commands/score/formatters/json.d.ts +0 -3
- package/lib/commands/score/formatters/json.d.ts.map +0 -1
- package/lib/commands/score/formatters/json.js +0 -20
- package/lib/commands/score/formatters/json.js.map +0 -1
- package/lib/commands/score/formatters/stylish.d.ts +0 -4
- package/lib/commands/score/formatters/stylish.d.ts.map +0 -1
- package/lib/commands/score/formatters/stylish.js +0 -235
- package/lib/commands/score/formatters/stylish.js.map +0 -1
- package/lib/commands/score/hotspots.d.ts +0 -3
- package/lib/commands/score/hotspots.d.ts.map +0 -1
- package/lib/commands/score/hotspots.js +0 -70
- package/lib/commands/score/hotspots.js.map +0 -1
- package/lib/commands/score/index.d.ts +0 -11
- package/lib/commands/score/index.d.ts.map +0 -1
- package/lib/commands/score/index.js +0 -69
- package/lib/commands/score/index.js.map +0 -1
- package/lib/commands/score/scoring.d.ts +0 -14
- package/lib/commands/score/scoring.d.ts.map +0 -1
- package/lib/commands/score/scoring.js +0 -136
- package/lib/commands/score/scoring.js.map +0 -1
- package/lib/commands/score/types.d.ts +0 -119
- package/lib/commands/score/types.d.ts.map +0 -1
- package/lib/commands/score/types.js +0 -2
- package/lib/commands/score/types.js.map +0 -1
- package/lib/commands/score/utils.d.ts +0 -2
- package/lib/commands/score/utils.d.ts.map +0 -1
- package/lib/commands/score/utils.js +0 -8
- package/lib/commands/score/utils.js.map +0 -1
- package/lib/commands/scorecard-classic/auth/login-handler.d.ts +0 -3
- package/lib/commands/scorecard-classic/auth/login-handler.d.ts.map +0 -1
- package/lib/commands/scorecard-classic/auth/login-handler.js +0 -31
- package/lib/commands/scorecard-classic/auth/login-handler.js.map +0 -1
- package/lib/commands/scorecard-classic/formatters/checkstyle-formatter.d.ts +0 -3
- package/lib/commands/scorecard-classic/formatters/checkstyle-formatter.d.ts.map +0 -1
- package/lib/commands/scorecard-classic/formatters/checkstyle-formatter.js +0 -28
- package/lib/commands/scorecard-classic/formatters/checkstyle-formatter.js.map +0 -1
- package/lib/commands/scorecard-classic/formatters/json-formatter.d.ts +0 -27
- package/lib/commands/scorecard-classic/formatters/json-formatter.d.ts.map +0 -1
- package/lib/commands/scorecard-classic/formatters/json-formatter.js +0 -67
- package/lib/commands/scorecard-classic/formatters/json-formatter.js.map +0 -1
- package/lib/commands/scorecard-classic/formatters/junit-formatter.d.ts +0 -3
- package/lib/commands/scorecard-classic/formatters/junit-formatter.d.ts.map +0 -1
- package/lib/commands/scorecard-classic/formatters/junit-formatter.js +0 -67
- package/lib/commands/scorecard-classic/formatters/junit-formatter.js.map +0 -1
- package/lib/commands/scorecard-classic/formatters/stylish-formatter.d.ts +0 -3
- package/lib/commands/scorecard-classic/formatters/stylish-formatter.d.ts.map +0 -1
- package/lib/commands/scorecard-classic/formatters/stylish-formatter.js +0 -57
- package/lib/commands/scorecard-classic/formatters/stylish-formatter.js.map +0 -1
- package/lib/commands/scorecard-classic/index.d.ts +0 -4
- package/lib/commands/scorecard-classic/index.d.ts.map +0 -1
- package/lib/commands/scorecard-classic/index.js +0 -120
- package/lib/commands/scorecard-classic/index.js.map +0 -1
- package/lib/commands/scorecard-classic/remote/fetch-scorecard.d.ts +0 -9
- package/lib/commands/scorecard-classic/remote/fetch-scorecard.d.ts.map +0 -1
- package/lib/commands/scorecard-classic/remote/fetch-scorecard.js +0 -126
- package/lib/commands/scorecard-classic/remote/fetch-scorecard.js.map +0 -1
- package/lib/commands/scorecard-classic/targets-handler/targets-handler.d.ts +0 -13
- package/lib/commands/scorecard-classic/targets-handler/targets-handler.d.ts.map +0 -1
- package/lib/commands/scorecard-classic/targets-handler/targets-handler.js +0 -55
- package/lib/commands/scorecard-classic/targets-handler/targets-handler.js.map +0 -1
- package/lib/commands/scorecard-classic/types.d.ts +0 -27
- package/lib/commands/scorecard-classic/types.d.ts.map +0 -1
- package/lib/commands/scorecard-classic/types.js +0 -2
- package/lib/commands/scorecard-classic/types.js.map +0 -1
- package/lib/commands/scorecard-classic/validation/plugin-evaluator.d.ts +0 -3
- package/lib/commands/scorecard-classic/validation/plugin-evaluator.d.ts.map +0 -1
- package/lib/commands/scorecard-classic/validation/plugin-evaluator.js +0 -45
- package/lib/commands/scorecard-classic/validation/plugin-evaluator.js.map +0 -1
- package/lib/commands/scorecard-classic/validation/project-url.d.ts +0 -2
- package/lib/commands/scorecard-classic/validation/project-url.d.ts.map +0 -1
- package/lib/commands/scorecard-classic/validation/project-url.js +0 -11
- package/lib/commands/scorecard-classic/validation/project-url.js.map +0 -1
- package/lib/commands/scorecard-classic/validation/validate-scorecard.d.ts +0 -21
- package/lib/commands/scorecard-classic/validation/validate-scorecard.d.ts.map +0 -1
- package/lib/commands/scorecard-classic/validation/validate-scorecard.js +0 -87
- package/lib/commands/scorecard-classic/validation/validate-scorecard.js.map +0 -1
- package/lib/commands/split/asyncapi/constants.d.ts +0 -6
- package/lib/commands/split/asyncapi/constants.d.ts.map +0 -1
- package/lib/commands/split/asyncapi/constants.js +0 -71
- package/lib/commands/split/asyncapi/constants.js.map +0 -1
- package/lib/commands/split/asyncapi/find-asyncapi-component-types.d.ts +0 -2
- package/lib/commands/split/asyncapi/find-asyncapi-component-types.d.ts.map +0 -1
- package/lib/commands/split/asyncapi/find-asyncapi-component-types.js +0 -8
- package/lib/commands/split/asyncapi/find-asyncapi-component-types.js.map +0 -1
- package/lib/commands/split/asyncapi/gather-asyncapi-component-files.d.ts +0 -9
- package/lib/commands/split/asyncapi/gather-asyncapi-component-files.d.ts.map +0 -1
- package/lib/commands/split/asyncapi/gather-asyncapi-component-files.js +0 -28
- package/lib/commands/split/asyncapi/gather-asyncapi-component-files.js.map +0 -1
- package/lib/commands/split/asyncapi/iterate-asyncapi-channels.d.ts +0 -10
- package/lib/commands/split/asyncapi/iterate-asyncapi-channels.d.ts.map +0 -1
- package/lib/commands/split/asyncapi/iterate-asyncapi-channels.js +0 -27
- package/lib/commands/split/asyncapi/iterate-asyncapi-channels.js.map +0 -1
- package/lib/commands/split/asyncapi/iterate-asyncapi-components.d.ts +0 -10
- package/lib/commands/split/asyncapi/iterate-asyncapi-components.d.ts.map +0 -1
- package/lib/commands/split/asyncapi/iterate-asyncapi-components.js +0 -41
- package/lib/commands/split/asyncapi/iterate-asyncapi-components.js.map +0 -1
- package/lib/commands/split/asyncapi/iterate-asyncapi-operations.d.ts +0 -11
- package/lib/commands/split/asyncapi/iterate-asyncapi-operations.d.ts.map +0 -1
- package/lib/commands/split/asyncapi/iterate-asyncapi-operations.js +0 -26
- package/lib/commands/split/asyncapi/iterate-asyncapi-operations.js.map +0 -1
- package/lib/commands/split/asyncapi/remove-asyncapi-empty-components.d.ts +0 -3
- package/lib/commands/split/asyncapi/remove-asyncapi-empty-components.d.ts.map +0 -1
- package/lib/commands/split/asyncapi/remove-asyncapi-empty-components.js +0 -13
- package/lib/commands/split/asyncapi/remove-asyncapi-empty-components.js.map +0 -1
- package/lib/commands/split/asyncapi/split-asyncapi-definition.d.ts +0 -9
- package/lib/commands/split/asyncapi/split-asyncapi-definition.d.ts.map +0 -1
- package/lib/commands/split/asyncapi/split-asyncapi-definition.js +0 -51
- package/lib/commands/split/asyncapi/split-asyncapi-definition.js.map +0 -1
- package/lib/commands/split/constants.d.ts +0 -7
- package/lib/commands/split/constants.d.ts.map +0 -1
- package/lib/commands/split/constants.js +0 -7
- package/lib/commands/split/constants.js.map +0 -1
- package/lib/commands/split/index.d.ts +0 -6
- package/lib/commands/split/index.d.ts.map +0 -1
- package/lib/commands/split/index.js +0 -46
- package/lib/commands/split/index.js.map +0 -1
- package/lib/commands/split/oas/constants.d.ts +0 -3
- package/lib/commands/split/oas/constants.d.ts.map +0 -1
- package/lib/commands/split/oas/constants.js +0 -23
- package/lib/commands/split/oas/constants.js.map +0 -1
- package/lib/commands/split/oas/split-oas-definition.d.ts +0 -3
- package/lib/commands/split/oas/split-oas-definition.d.ts.map +0 -1
- package/lib/commands/split/oas/split-oas-definition.js +0 -19
- package/lib/commands/split/oas/split-oas-definition.js.map +0 -1
- package/lib/commands/split/types.d.ts +0 -28
- package/lib/commands/split/types.d.ts.map +0 -1
- package/lib/commands/split/types.js +0 -2
- package/lib/commands/split/types.js.map +0 -1
- package/lib/commands/split/utils/crawl.d.ts +0 -2
- package/lib/commands/split/utils/crawl.d.ts.map +0 -1
- package/lib/commands/split/utils/crawl.js +0 -15
- package/lib/commands/split/utils/crawl.js.map +0 -1
- package/lib/commands/split/utils/create-component-dir.d.ts +0 -2
- package/lib/commands/split/utils/create-component-dir.d.ts.map +0 -1
- package/lib/commands/split/utils/create-component-dir.js +0 -8
- package/lib/commands/split/utils/create-component-dir.js.map +0 -1
- package/lib/commands/split/utils/does-file-differ.d.ts +0 -2
- package/lib/commands/split/utils/does-file-differ.d.ts.map +0 -1
- package/lib/commands/split/utils/does-file-differ.js +0 -7
- package/lib/commands/split/utils/does-file-differ.js.map +0 -1
- package/lib/commands/split/utils/extract-filename-from-path.d.ts +0 -2
- package/lib/commands/split/utils/extract-filename-from-path.d.ts.map +0 -1
- package/lib/commands/split/utils/extract-filename-from-path.js +0 -5
- package/lib/commands/split/utils/extract-filename-from-path.js.map +0 -1
- package/lib/commands/split/utils/find-component-type.d.ts +0 -3
- package/lib/commands/split/utils/find-component-type.d.ts.map +0 -1
- package/lib/commands/split/utils/find-component-type.js +0 -8
- package/lib/commands/split/utils/find-component-type.js.map +0 -1
- package/lib/commands/split/utils/gather-components-files.d.ts +0 -4
- package/lib/commands/split/utils/gather-components-files.d.ts.map +0 -1
- package/lib/commands/split/utils/gather-components-files.js +0 -12
- package/lib/commands/split/utils/gather-components-files.js.map +0 -1
- package/lib/commands/split/utils/get-file-name-path.d.ts +0 -2
- package/lib/commands/split/utils/get-file-name-path.d.ts.map +0 -1
- package/lib/commands/split/utils/get-file-name-path.js +0 -5
- package/lib/commands/split/utils/get-file-name-path.js.map +0 -1
- package/lib/commands/split/utils/implicitly-reference-discriminator.d.ts +0 -2
- package/lib/commands/split/utils/implicitly-reference-discriminator.d.ts.map +0 -1
- package/lib/commands/split/utils/implicitly-reference-discriminator.js +0 -31
- package/lib/commands/split/utils/implicitly-reference-discriminator.js.map +0 -1
- package/lib/commands/split/utils/is-not-security-component-type.d.ts +0 -2
- package/lib/commands/split/utils/is-not-security-component-type.d.ts.map +0 -1
- package/lib/commands/split/utils/is-not-security-component-type.js +0 -4
- package/lib/commands/split/utils/is-not-security-component-type.js.map +0 -1
- package/lib/commands/split/utils/is-supported-extension.d.ts +0 -2
- package/lib/commands/split/utils/is-supported-extension.d.ts.map +0 -1
- package/lib/commands/split/utils/is-supported-extension.js +0 -4
- package/lib/commands/split/utils/is-supported-extension.js.map +0 -1
- package/lib/commands/split/utils/iterate-components.d.ts +0 -3
- package/lib/commands/split/utils/iterate-components.d.ts.map +0 -1
- package/lib/commands/split/utils/iterate-components.js +0 -55
- package/lib/commands/split/utils/iterate-components.js.map +0 -1
- package/lib/commands/split/utils/iterate-path-items.d.ts +0 -3
- package/lib/commands/split/utils/iterate-path-items.d.ts.map +0 -1
- package/lib/commands/split/utils/iterate-path-items.js +0 -42
- package/lib/commands/split/utils/iterate-path-items.js.map +0 -1
- package/lib/commands/split/utils/remove-empty-components.d.ts +0 -4
- package/lib/commands/split/utils/remove-empty-components.d.ts.map +0 -1
- package/lib/commands/split/utils/remove-empty-components.js +0 -10
- package/lib/commands/split/utils/remove-empty-components.js.map +0 -1
- package/lib/commands/split/utils/replace-$-refs.d.ts +0 -3
- package/lib/commands/split/utils/replace-$-refs.d.ts.map +0 -1
- package/lib/commands/split/utils/replace-$-refs.js +0 -34
- package/lib/commands/split/utils/replace-$-refs.js.map +0 -1
- package/lib/commands/split/utils/replace-channel-refs.d.ts +0 -3
- package/lib/commands/split/utils/replace-channel-refs.d.ts.map +0 -1
- package/lib/commands/split/utils/replace-channel-refs.js +0 -30
- package/lib/commands/split/utils/replace-channel-refs.js.map +0 -1
- package/lib/commands/split/utils/starts-with-components.d.ts +0 -2
- package/lib/commands/split/utils/starts-with-components.d.ts.map +0 -1
- package/lib/commands/split/utils/starts-with-components.js +0 -5
- package/lib/commands/split/utils/starts-with-components.js.map +0 -1
- package/lib/commands/split/utils/traverse-directory-deep.d.ts +0 -3
- package/lib/commands/split/utils/traverse-directory-deep.d.ts.map +0 -1
- package/lib/commands/split/utils/traverse-directory-deep.js +0 -27
- package/lib/commands/split/utils/traverse-directory-deep.js.map +0 -1
- package/lib/commands/stats/index.d.ts +0 -9
- package/lib/commands/stats/index.d.ts.map +0 -1
- package/lib/commands/stats/index.js +0 -42
- package/lib/commands/stats/index.js.map +0 -1
- package/lib/commands/stats/print-stats/index.d.ts +0 -3
- package/lib/commands/stats/print-stats/index.d.ts.map +0 -1
- package/lib/commands/stats/print-stats/index.js +0 -22
- package/lib/commands/stats/print-stats/index.js.map +0 -1
- package/lib/commands/stats/print-stats/json.d.ts +0 -3
- package/lib/commands/stats/print-stats/json.d.ts.map +0 -1
- package/lib/commands/stats/print-stats/json.js +0 -13
- package/lib/commands/stats/print-stats/json.js.map +0 -1
- package/lib/commands/stats/print-stats/markdown.d.ts +0 -3
- package/lib/commands/stats/print-stats/markdown.d.ts.map +0 -1
- package/lib/commands/stats/print-stats/markdown.js +0 -10
- package/lib/commands/stats/print-stats/markdown.js.map +0 -1
- package/lib/commands/stats/print-stats/stylish.d.ts +0 -3
- package/lib/commands/stats/print-stats/stylish.d.ts.map +0 -1
- package/lib/commands/stats/print-stats/stylish.js +0 -11
- package/lib/commands/stats/print-stats/stylish.js.map +0 -1
- package/lib/commands/stats/visitor-and-accumulator-resolver.d.ts +0 -103
- package/lib/commands/stats/visitor-and-accumulator-resolver.d.ts.map +0 -1
- package/lib/commands/stats/visitor-and-accumulator-resolver.js +0 -46
- package/lib/commands/stats/visitor-and-accumulator-resolver.js.map +0 -1
- package/lib/commands/translations.d.ts +0 -8
- package/lib/commands/translations.d.ts.map +0 -1
- package/lib/commands/translations.js +0 -18
- package/lib/commands/translations.js.map +0 -1
- package/lib/index.d.ts +0 -3
- package/lib/index.d.ts.map +0 -1
- package/lib/index.js.map +0 -1
- package/lib/reunite/api/api-client.d.ts +0 -83
- package/lib/reunite/api/api-client.d.ts.map +0 -1
- package/lib/reunite/api/api-client.js +0 -262
- package/lib/reunite/api/api-client.js.map +0 -1
- package/lib/reunite/api/api-keys.d.ts +0 -2
- package/lib/reunite/api/api-keys.d.ts.map +0 -1
- package/lib/reunite/api/api-keys.js +0 -7
- package/lib/reunite/api/api-keys.js.map +0 -1
- package/lib/reunite/api/domains.d.ts +0 -12
- package/lib/reunite/api/domains.d.ts.map +0 -1
- package/lib/reunite/api/domains.js +0 -52
- package/lib/reunite/api/domains.js.map +0 -1
- package/lib/reunite/api/index.d.ts +0 -4
- package/lib/reunite/api/index.d.ts.map +0 -1
- package/lib/reunite/api/index.js +0 -4
- package/lib/reunite/api/index.js.map +0 -1
- package/lib/reunite/api/types.d.ts +0 -103
- package/lib/reunite/api/types.d.ts.map +0 -1
- package/lib/reunite/api/types.js +0 -2
- package/lib/reunite/api/types.js.map +0 -1
- package/lib/reunite/commands/push-status.d.ts +0 -24
- package/lib/reunite/commands/push-status.d.ts.map +0 -1
- package/lib/reunite/commands/push-status.js +0 -199
- package/lib/reunite/commands/push-status.js.map +0 -1
- package/lib/reunite/commands/push.d.ts +0 -28
- package/lib/reunite/commands/push.d.ts.map +0 -1
- package/lib/reunite/commands/push.js +0 -135
- package/lib/reunite/commands/push.js.map +0 -1
- package/lib/reunite/commands/utils.d.ts +0 -26
- package/lib/reunite/commands/utils.d.ts.map +0 -1
- package/lib/reunite/commands/utils.js +0 -49
- package/lib/reunite/commands/utils.js.map +0 -1
- package/lib/reunite/utils.d.ts +0 -3
- package/lib/reunite/utils.d.ts.map +0 -1
- package/lib/reunite/utils.js +0 -3
- package/lib/reunite/utils.js.map +0 -1
- package/lib/types.d.ts +0 -33
- package/lib/types.d.ts.map +0 -1
- package/lib/types.js +0 -2
- package/lib/types.js.map +0 -1
- package/lib/utils/assert-node-version.d.ts +0 -2
- package/lib/utils/assert-node-version.d.ts.map +0 -1
- package/lib/utils/assert-node-version.js +0 -14
- package/lib/utils/assert-node-version.js.map +0 -1
- package/lib/utils/constants.d.ts +0 -5
- package/lib/utils/constants.d.ts.map +0 -1
- package/lib/utils/constants.js +0 -5
- package/lib/utils/constants.js.map +0 -1
- package/lib/utils/error.d.ts +0 -4
- package/lib/utils/error.d.ts.map +0 -1
- package/lib/utils/error.js +0 -8
- package/lib/utils/error.js.map +0 -1
- package/lib/utils/fetch-with-timeout.d.ts +0 -6
- package/lib/utils/fetch-with-timeout.d.ts.map +0 -1
- package/lib/utils/fetch-with-timeout.js +0 -24
- package/lib/utils/fetch-with-timeout.js.map +0 -1
- package/lib/utils/get-command-name-from-args.d.ts +0 -3
- package/lib/utils/get-command-name-from-args.d.ts.map +0 -1
- package/lib/utils/get-command-name-from-args.js +0 -4
- package/lib/utils/get-command-name-from-args.js.map +0 -1
- package/lib/utils/json-stringify-with-array-buffer.d.ts +0 -2
- package/lib/utils/json-stringify-with-array-buffer.d.ts.map +0 -1
- package/lib/utils/json-stringify-with-array-buffer.js +0 -32
- package/lib/utils/json-stringify-with-array-buffer.js.map +0 -1
- package/lib/utils/miscellaneous.d.ts +0 -46
- package/lib/utils/miscellaneous.d.ts.map +0 -1
- package/lib/utils/miscellaneous.js +0 -443
- package/lib/utils/miscellaneous.js.map +0 -1
- package/lib/utils/network-check.d.ts +0 -2
- package/lib/utils/network-check.d.ts.map +0 -1
- package/lib/utils/network-check.js +0 -12
- package/lib/utils/network-check.js.map +0 -1
- package/lib/utils/otel.d.ts +0 -8
- package/lib/utils/otel.d.ts.map +0 -1
- package/lib/utils/otel.js +0 -40
- package/lib/utils/otel.js.map +0 -1
- package/lib/utils/package.d.ts +0 -2
- package/lib/utils/package.d.ts.map +0 -1
- package/lib/utils/package.js +0 -4
- package/lib/utils/package.js.map +0 -1
- package/lib/utils/platform.d.ts +0 -17
- package/lib/utils/platform.d.ts.map +0 -1
- package/lib/utils/platform.js +0 -30
- package/lib/utils/platform.js.map +0 -1
- package/lib/utils/proxy-agent.d.ts +0 -5
- package/lib/utils/proxy-agent.d.ts.map +0 -1
- package/lib/utils/proxy-agent.js +0 -41
- package/lib/utils/proxy-agent.js.map +0 -1
- package/lib/utils/read-env-variables.d.ts +0 -2
- package/lib/utils/read-env-variables.d.ts.map +0 -1
- package/lib/utils/read-env-variables.js +0 -18
- package/lib/utils/read-env-variables.js.map +0 -1
- package/lib/utils/spinner.d.ts +0 -11
- package/lib/utils/spinner.d.ts.map +0 -1
- package/lib/utils/spinner.js +0 -44
- package/lib/utils/spinner.js.map +0 -1
- package/lib/utils/strip-ansi-codes.d.ts +0 -2
- package/lib/utils/strip-ansi-codes.d.ts.map +0 -1
- package/lib/utils/strip-ansi-codes.js +0 -6
- package/lib/utils/strip-ansi-codes.js.map +0 -1
- package/lib/utils/telemetry.d.ts +0 -26
- package/lib/utils/telemetry.d.ts.map +0 -1
- package/lib/utils/telemetry.js +0 -291
- package/lib/utils/telemetry.js.map +0 -1
- package/lib/utils/update-version-notifier.d.ts +0 -3
- package/lib/utils/update-version-notifier.d.ts.map +0 -1
- package/lib/utils/update-version-notifier.js +0 -100
- package/lib/utils/update-version-notifier.js.map +0 -1
- package/lib/utils/validate-mount-path.d.ts +0 -2
- package/lib/utils/validate-mount-path.d.ts.map +0 -1
- package/lib/utils/validate-mount-path.js +0 -7
- package/lib/utils/validate-mount-path.js.map +0 -1
- package/lib/utils/validate-positive-number.d.ts +0 -2
- package/lib/utils/validate-positive-number.d.ts.map +0 -1
- package/lib/utils/validate-positive-number.js +0 -13
- package/lib/utils/validate-positive-number.js.map +0 -1
- package/lib/wrapper.d.ts +0 -11
- package/lib/wrapper.d.ts.map +0 -1
- package/lib/wrapper.js +0 -99
- package/lib/wrapper.js.map +0 -1
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
export const ASYNCAPI_ACTION_NAMES = ['send', 'receive'];
|
|
2
|
-
export const ASYNCAPI2_COMPONENT_NAMES = [
|
|
3
|
-
'schemas',
|
|
4
|
-
'messages',
|
|
5
|
-
'parameters',
|
|
6
|
-
'correlationIds',
|
|
7
|
-
'messageTraits',
|
|
8
|
-
'operationTraits',
|
|
9
|
-
'securitySchemes',
|
|
10
|
-
'servers',
|
|
11
|
-
'serverVariables',
|
|
12
|
-
'channels',
|
|
13
|
-
'serverBindings',
|
|
14
|
-
'channelBindings',
|
|
15
|
-
'operationBindings',
|
|
16
|
-
'messageBindings',
|
|
17
|
-
];
|
|
18
|
-
export const ASYNCAPI2_SPLITTABLE_COMPONENT_NAMES = [
|
|
19
|
-
'schemas',
|
|
20
|
-
'messages',
|
|
21
|
-
'securitySchemes',
|
|
22
|
-
'parameters',
|
|
23
|
-
'correlationIds',
|
|
24
|
-
'messageTraits',
|
|
25
|
-
'operationTraits',
|
|
26
|
-
'serverBindings',
|
|
27
|
-
'channelBindings',
|
|
28
|
-
'operationBindings',
|
|
29
|
-
'messageBindings',
|
|
30
|
-
];
|
|
31
|
-
export const ASYNCAPI3_COMPONENT_NAMES = [
|
|
32
|
-
'schemas',
|
|
33
|
-
'messages',
|
|
34
|
-
'parameters',
|
|
35
|
-
'replies',
|
|
36
|
-
'replyAddresses',
|
|
37
|
-
'correlationIds',
|
|
38
|
-
'messageTraits',
|
|
39
|
-
'operationTraits',
|
|
40
|
-
'tags',
|
|
41
|
-
'externalDocs',
|
|
42
|
-
'securitySchemes',
|
|
43
|
-
'servers',
|
|
44
|
-
'serverVariables',
|
|
45
|
-
'channels',
|
|
46
|
-
'operations',
|
|
47
|
-
'serverBindings',
|
|
48
|
-
'channelBindings',
|
|
49
|
-
'operationBindings',
|
|
50
|
-
'messageBindings',
|
|
51
|
-
];
|
|
52
|
-
export const ASYNCAPI3_SPLITTABLE_COMPONENT_NAMES = [
|
|
53
|
-
'schemas',
|
|
54
|
-
'messages',
|
|
55
|
-
'securitySchemes',
|
|
56
|
-
'servers',
|
|
57
|
-
'serverVariables',
|
|
58
|
-
'parameters',
|
|
59
|
-
'replies',
|
|
60
|
-
'replyAddresses',
|
|
61
|
-
'correlationIds',
|
|
62
|
-
'messageTraits',
|
|
63
|
-
'operationTraits',
|
|
64
|
-
'tags',
|
|
65
|
-
'externalDocs',
|
|
66
|
-
'serverBindings',
|
|
67
|
-
'channelBindings',
|
|
68
|
-
'operationBindings',
|
|
69
|
-
'messageBindings',
|
|
70
|
-
];
|
|
71
|
-
//# sourceMappingURL=constants.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../src/commands/split/asyncapi/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,MAAM,EAAE,SAAS,CAAU,CAAC;AAClE,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACvC,SAAS;IACT,UAAU;IACV,YAAY;IACZ,gBAAgB;IAChB,eAAe;IACf,iBAAiB;IACjB,iBAAiB;IACjB,SAAS;IACT,iBAAiB;IACjB,UAAU;IACV,gBAAgB;IAChB,iBAAiB;IACjB,mBAAmB;IACnB,iBAAiB;CACT,CAAC;AAEX,MAAM,CAAC,MAAM,oCAAoC,GAAG;IAClD,SAAS;IACT,UAAU;IACV,iBAAiB;IACjB,YAAY;IACZ,gBAAgB;IAChB,eAAe;IACf,iBAAiB;IACjB,gBAAgB;IAChB,iBAAiB;IACjB,mBAAmB;IACnB,iBAAiB;CACT,CAAC;AAEX,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACvC,SAAS;IACT,UAAU;IACV,YAAY;IACZ,SAAS;IACT,gBAAgB;IAChB,gBAAgB;IAChB,eAAe;IACf,iBAAiB;IACjB,MAAM;IACN,cAAc;IACd,iBAAiB;IACjB,SAAS;IACT,iBAAiB;IACjB,UAAU;IACV,YAAY;IACZ,gBAAgB;IAChB,iBAAiB;IACjB,mBAAmB;IACnB,iBAAiB;CACT,CAAC;AAEX,MAAM,CAAC,MAAM,oCAAoC,GAAG;IAClD,SAAS;IACT,UAAU;IACV,iBAAiB;IACjB,SAAS;IACT,iBAAiB;IACjB,YAAY;IACZ,SAAS;IACT,gBAAgB;IAChB,gBAAgB;IAChB,eAAe;IACf,iBAAiB;IACjB,MAAM;IACN,cAAc;IACd,gBAAgB;IAChB,iBAAiB;IACjB,mBAAmB;IACnB,iBAAiB;CACT,CAAC"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export declare function findAsyncApiComponentTypes(components: Record<string, unknown>, specVersion: 'async2' | 'async3'): ("servers" | "tags" | "externalDocs" | "parameters" | "schemas" | "messages" | "correlationIds" | "messageTraits" | "operationTraits" | "securitySchemes" | "serverVariables" | "serverBindings" | "channelBindings" | "operationBindings" | "messageBindings" | "replies" | "replyAddresses")[];
|
|
2
|
-
//# sourceMappingURL=find-asyncapi-component-types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"find-asyncapi-component-types.d.ts","sourceRoot":"","sources":["../../../../src/commands/split/asyncapi/find-asyncapi-component-types.ts"],"names":[],"mappings":"AAKA,wBAAgB,0BAA0B,CACxC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACnC,WAAW,EAAE,QAAQ,GAAG,QAAQ,oSAQjC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { ASYNCAPI2_SPLITTABLE_COMPONENT_NAMES, ASYNCAPI3_SPLITTABLE_COMPONENT_NAMES, } from './constants.js';
|
|
2
|
-
export function findAsyncApiComponentTypes(components, specVersion) {
|
|
3
|
-
const componentNames = specVersion === 'async2'
|
|
4
|
-
? ASYNCAPI2_SPLITTABLE_COMPONENT_NAMES
|
|
5
|
-
: ASYNCAPI3_SPLITTABLE_COMPONENT_NAMES;
|
|
6
|
-
return componentNames.filter((item) => item in components);
|
|
7
|
-
}
|
|
8
|
-
//# sourceMappingURL=find-asyncapi-component-types.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"find-asyncapi-component-types.js","sourceRoot":"","sources":["../../../../src/commands/split/asyncapi/find-asyncapi-component-types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oCAAoC,EACpC,oCAAoC,GACrC,MAAM,gBAAgB,CAAC;AAExB,MAAM,UAAU,0BAA0B,CACxC,UAAmC,EACnC,WAAgC;IAEhC,MAAM,cAAc,GAClB,WAAW,KAAK,QAAQ;QACtB,CAAC,CAAC,oCAAoC;QACtC,CAAC,CAAC,oCAAoC,CAAC;IAE3C,OAAO,cAAc,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,IAAI,UAAU,CAAC,CAAC;AAC7D,CAAC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { type ComponentsFiles, type AnyAsyncApiDefinition } from '../types.js';
|
|
2
|
-
export declare function gatherAsyncApiComponentFiles({ asyncapi, asyncapiDir, componentsFiles, ext, specVersion, }: {
|
|
3
|
-
asyncapi: AnyAsyncApiDefinition;
|
|
4
|
-
asyncapiDir: string;
|
|
5
|
-
componentsFiles: ComponentsFiles;
|
|
6
|
-
ext: string;
|
|
7
|
-
specVersion: 'async2' | 'async3';
|
|
8
|
-
}): void;
|
|
9
|
-
//# sourceMappingURL=gather-asyncapi-component-files.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"gather-asyncapi-component-files.d.ts","sourceRoot":"","sources":["../../../../src/commands/split/asyncapi/gather-asyncapi-component-files.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,eAAe,EAAE,KAAK,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAI/E,wBAAgB,4BAA4B,CAAC,EAC3C,QAAQ,EACR,WAAW,EACX,eAAe,EACf,GAAG,EACH,WAAW,GACZ,EAAE;IACD,QAAQ,EAAE,qBAAqB,CAAC;IAChC,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,eAAe,CAAC;IACjC,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,EAAE,QAAQ,GAAG,QAAQ,CAAC;CAClC,QAsBA"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { isTruthy } from '@redocly/openapi-core';
|
|
2
|
-
import * as path from 'node:path';
|
|
3
|
-
import { COMPONENTS } from '../constants.js';
|
|
4
|
-
import { getFileNamePath } from '../utils/get-file-name-path.js';
|
|
5
|
-
import { findAsyncApiComponentTypes } from './find-asyncapi-component-types.js';
|
|
6
|
-
export function gatherAsyncApiComponentFiles({ asyncapi, asyncapiDir, componentsFiles, ext, specVersion, }) {
|
|
7
|
-
const { components } = asyncapi;
|
|
8
|
-
if (!components)
|
|
9
|
-
return;
|
|
10
|
-
const componentsDir = path.join(asyncapiDir, COMPONENTS);
|
|
11
|
-
const componentTypes = findAsyncApiComponentTypes(components, specVersion);
|
|
12
|
-
for (const componentType of componentTypes) {
|
|
13
|
-
const componentDirPath = path.join(componentsDir, componentType);
|
|
14
|
-
for (const componentName of Object.keys(components[componentType] || {})) {
|
|
15
|
-
const filename = getFileNamePath(componentDirPath, componentName, ext);
|
|
16
|
-
let inherits = [];
|
|
17
|
-
if (componentType === 'schemas') {
|
|
18
|
-
inherits = (components[componentType]?.[componentName]
|
|
19
|
-
?.allOf || [])
|
|
20
|
-
.map(({ $ref }) => $ref)
|
|
21
|
-
.filter(isTruthy);
|
|
22
|
-
}
|
|
23
|
-
componentsFiles[componentType] = componentsFiles[componentType] || {};
|
|
24
|
-
componentsFiles[componentType][componentName] = { inherits, filename };
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
//# sourceMappingURL=gather-asyncapi-component-files.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"gather-asyncapi-component-files.js","sourceRoot":"","sources":["../../../../src/commands/split/asyncapi/gather-asyncapi-component-files.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAElC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,EAAE,0BAA0B,EAAE,MAAM,oCAAoC,CAAC;AAEhF,MAAM,UAAU,4BAA4B,CAAC,EAC3C,QAAQ,EACR,WAAW,EACX,eAAe,EACf,GAAG,EACH,WAAW,GAOZ;IACC,MAAM,EAAE,UAAU,EAAE,GAAG,QAAQ,CAAC;IAChC,IAAI,CAAC,UAAU;QAAE,OAAO;IACxB,MAAM,aAAa,GAAG,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,UAAU,CAAC,CAAC;IACzD,MAAM,cAAc,GAAG,0BAA0B,CAAC,UAAU,EAAE,WAAW,CAAC,CAAC;IAC3E,KAAK,MAAM,aAAa,IAAI,cAAc,EAAE,CAAC;QAC3C,MAAM,gBAAgB,GAAG,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,aAAa,CAAC,CAAC;QACjE,KAAK,MAAM,aAAa,IAAI,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC;YACzE,MAAM,QAAQ,GAAG,eAAe,CAAC,gBAAgB,EAAE,aAAa,EAAE,GAAG,CAAC,CAAC;YACvE,IAAI,QAAQ,GAAa,EAAE,CAAC;YAC5B,IAAI,aAAa,KAAK,SAAS,EAAE,CAAC;gBAChC,QAAQ,GAAG,CACR,UAAU,CAAC,aAAa,CAAC,EAAE,CAAC,aAAa,CAA0C;oBAClF,EAAE,KAAK,IAAI,EAAE,CAChB;qBACE,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,IAAI,CAAC;qBACvB,MAAM,CAAC,QAAQ,CAAC,CAAC;YACtB,CAAC;YACD,eAAe,CAAC,aAAa,CAAC,GAAG,eAAe,CAAC,aAAa,CAAC,IAAI,EAAE,CAAC;YACtE,eAAe,CAAC,aAAa,CAAC,CAAC,aAAa,CAAC,GAAG,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC;QACzE,CAAC;IACH,CAAC;AACH,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { type ChannelsFiles, type ComponentsFiles } from '../types.js';
|
|
2
|
-
export declare function iterateAsyncApiChannels({ channels, asyncapiDir, outDir, componentsFiles, pathSeparator, ext, }: {
|
|
3
|
-
channels: Record<string, any> | undefined;
|
|
4
|
-
asyncapiDir: string;
|
|
5
|
-
outDir: string;
|
|
6
|
-
componentsFiles: ComponentsFiles;
|
|
7
|
-
pathSeparator: string;
|
|
8
|
-
ext: string;
|
|
9
|
-
}): ChannelsFiles;
|
|
10
|
-
//# sourceMappingURL=iterate-asyncapi-channels.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"iterate-asyncapi-channels.d.ts","sourceRoot":"","sources":["../../../../src/commands/split/asyncapi/iterate-asyncapi-channels.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,eAAe,EAAE,MAAM,aAAa,CAAC;AAOvE,wBAAgB,uBAAuB,CAAC,EACtC,QAAQ,EACR,WAAW,EACX,MAAM,EACN,eAAe,EACf,aAAa,EACb,GAAG,GACJ,EAAE;IACD,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,SAAS,CAAC;IAC1C,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,eAAe,EAAE,eAAe,CAAC;IACjC,aAAa,EAAE,MAAM,CAAC;IACtB,GAAG,EAAE,MAAM,CAAC;CACb,GAAG,aAAa,CAqBhB"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { slash, isRef } from '@redocly/openapi-core';
|
|
2
|
-
import * as fs from 'node:fs';
|
|
3
|
-
import * as path from 'node:path';
|
|
4
|
-
import { pathToFilename, writeToFileByExtension } from '../../../utils/miscellaneous.js';
|
|
5
|
-
import { replace$Refs } from '../utils/replace-$-refs.js';
|
|
6
|
-
import { traverseDirectoryDeep, traverseDirectoryDeepCallback, } from '../utils/traverse-directory-deep.js';
|
|
7
|
-
export function iterateAsyncApiChannels({ channels, asyncapiDir, outDir, componentsFiles, pathSeparator, ext, }) {
|
|
8
|
-
const channelsFiles = {};
|
|
9
|
-
if (!channels)
|
|
10
|
-
return channelsFiles;
|
|
11
|
-
fs.mkdirSync(outDir, { recursive: true });
|
|
12
|
-
for (const channelName of Object.keys(channels)) {
|
|
13
|
-
const channelFile = `${path.join(outDir, pathToFilename(channelName, pathSeparator))}.${ext}`;
|
|
14
|
-
const channelData = channels[channelName];
|
|
15
|
-
if (isRef(channelData))
|
|
16
|
-
continue;
|
|
17
|
-
channelsFiles[channelName] = channelFile;
|
|
18
|
-
replace$Refs(channelData, path.dirname(channelFile), componentsFiles);
|
|
19
|
-
writeToFileByExtension(channelData, channelFile);
|
|
20
|
-
channels[channelName] = {
|
|
21
|
-
$ref: slash(path.relative(asyncapiDir, channelFile)),
|
|
22
|
-
};
|
|
23
|
-
traverseDirectoryDeep(outDir, traverseDirectoryDeepCallback, componentsFiles);
|
|
24
|
-
}
|
|
25
|
-
return channelsFiles;
|
|
26
|
-
}
|
|
27
|
-
//# sourceMappingURL=iterate-asyncapi-channels.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"iterate-asyncapi-channels.js","sourceRoot":"","sources":["../../../../src/commands/split/asyncapi/iterate-asyncapi-channels.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAElC,OAAO,EAAE,cAAc,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AAEzF,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EACL,qBAAqB,EACrB,6BAA6B,GAC9B,MAAM,qCAAqC,CAAC;AAE7C,MAAM,UAAU,uBAAuB,CAAC,EACtC,QAAQ,EACR,WAAW,EACX,MAAM,EACN,eAAe,EACf,aAAa,EACb,GAAG,GAQJ;IACC,MAAM,aAAa,GAAkB,EAAE,CAAC;IACxC,IAAI,CAAC,QAAQ;QAAE,OAAO,aAAa,CAAC;IACpC,EAAE,CAAC,SAAS,CAAC,MAAM,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAE1C,KAAK,MAAM,WAAW,IAAI,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC;QAChD,MAAM,WAAW,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,cAAc,CAAC,WAAW,EAAE,aAAa,CAAC,CAAC,IAAI,GAAG,EAAE,CAAC;QAC9F,MAAM,WAAW,GAAG,QAAQ,CAAC,WAAW,CAAC,CAAC;QAE1C,IAAI,KAAK,CAAC,WAAW,CAAC;YAAE,SAAS;QAEjC,aAAa,CAAC,WAAW,CAAC,GAAG,WAAW,CAAC;QACzC,YAAY,CAAC,WAAW,EAAE,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE,eAAe,CAAC,CAAC;QACtE,sBAAsB,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;QACjD,QAAQ,CAAC,WAAW,CAAC,GAAG;YACtB,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;SACrD,CAAC;QAEF,qBAAqB,CAAC,MAAM,EAAE,6BAA6B,EAAE,eAAe,CAAC,CAAC;IAChF,CAAC;IACD,OAAO,aAAa,CAAC;AACvB,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { type ChannelsFiles, type ComponentsFiles, type AnyAsyncApiDefinition } from '../types.js';
|
|
2
|
-
export declare function iterateAsyncApiComponents({ asyncapi, asyncapiDir, componentsFiles, channelsFiles, ext, specVersion, }: {
|
|
3
|
-
asyncapi: AnyAsyncApiDefinition;
|
|
4
|
-
asyncapiDir: string;
|
|
5
|
-
componentsFiles: ComponentsFiles;
|
|
6
|
-
channelsFiles: ChannelsFiles;
|
|
7
|
-
ext: string;
|
|
8
|
-
specVersion: 'async2' | 'async3';
|
|
9
|
-
}): void;
|
|
10
|
-
//# sourceMappingURL=iterate-asyncapi-components.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"iterate-asyncapi-components.d.ts","sourceRoot":"","sources":["../../../../src/commands/split/asyncapi/iterate-asyncapi-components.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,KAAK,qBAAqB,EAG3B,MAAM,aAAa,CAAC;AASrB,wBAAgB,yBAAyB,CAAC,EACxC,QAAQ,EACR,WAAW,EACX,eAAe,EACf,aAAa,EACb,GAAG,EACH,WAAW,GACZ,EAAE;IACD,QAAQ,EAAE,qBAAqB,CAAC;IAChC,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,eAAe,CAAC;IACjC,aAAa,EAAE,aAAa,CAAC;IAC7B,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,EAAE,QAAQ,GAAG,QAAQ,CAAC;CAClC,QAkCA"}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { logger } from '@redocly/openapi-core';
|
|
2
|
-
import { blue } from 'colorette';
|
|
3
|
-
import * as fs from 'node:fs';
|
|
4
|
-
import * as path from 'node:path';
|
|
5
|
-
import { writeToFileByExtension } from '../../../utils/miscellaneous.js';
|
|
6
|
-
import { COMPONENTS } from '../constants.js';
|
|
7
|
-
import { createComponentDir } from '../utils/create-component-dir.js';
|
|
8
|
-
import { doesFileDiffer } from '../utils/does-file-differ.js';
|
|
9
|
-
import { getFileNamePath } from '../utils/get-file-name-path.js';
|
|
10
|
-
import { replace$Refs } from '../utils/replace-$-refs.js';
|
|
11
|
-
import { replaceChannelRefs } from '../utils/replace-channel-refs.js';
|
|
12
|
-
import { findAsyncApiComponentTypes } from './find-asyncapi-component-types.js';
|
|
13
|
-
import { removeAsyncApiEmptyComponents } from './remove-asyncapi-empty-components.js';
|
|
14
|
-
export function iterateAsyncApiComponents({ asyncapi, asyncapiDir, componentsFiles, channelsFiles, ext, specVersion, }) {
|
|
15
|
-
const { components } = asyncapi;
|
|
16
|
-
if (components) {
|
|
17
|
-
const componentsDir = path.join(asyncapiDir, COMPONENTS);
|
|
18
|
-
fs.mkdirSync(componentsDir, { recursive: true });
|
|
19
|
-
const componentTypes = findAsyncApiComponentTypes(components, specVersion);
|
|
20
|
-
componentTypes.forEach(iterateComponentTypes);
|
|
21
|
-
function iterateComponentTypes(componentType) {
|
|
22
|
-
const componentDirPath = path.join(componentsDir, componentType);
|
|
23
|
-
createComponentDir(componentDirPath, componentType);
|
|
24
|
-
for (const componentName of Object.keys(components?.[componentType] || {})) {
|
|
25
|
-
const filename = getFileNamePath(componentDirPath, componentName, ext);
|
|
26
|
-
const componentData = components?.[componentType]?.[componentName];
|
|
27
|
-
replace$Refs(componentData, path.dirname(filename), componentsFiles);
|
|
28
|
-
replaceChannelRefs(componentData, path.dirname(filename), channelsFiles);
|
|
29
|
-
if (doesFileDiffer(filename, componentData)) {
|
|
30
|
-
logger.warn(`warning: conflict for ${componentName} - file already exists with different content: ${blue(filename)} ... Skip.\n`);
|
|
31
|
-
}
|
|
32
|
-
else {
|
|
33
|
-
writeToFileByExtension(componentData, filename);
|
|
34
|
-
}
|
|
35
|
-
delete asyncapi.components?.[componentType]?.[componentName];
|
|
36
|
-
}
|
|
37
|
-
removeAsyncApiEmptyComponents(asyncapi, componentType);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
//# sourceMappingURL=iterate-asyncapi-components.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"iterate-asyncapi-components.js","sourceRoot":"","sources":["../../../../src/commands/split/asyncapi/iterate-asyncapi-components.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAElC,OAAO,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AACzE,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAQ7C,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAAE,0BAA0B,EAAE,MAAM,oCAAoC,CAAC;AAChF,OAAO,EAAE,6BAA6B,EAAE,MAAM,uCAAuC,CAAC;AAEtF,MAAM,UAAU,yBAAyB,CAAC,EACxC,QAAQ,EACR,WAAW,EACX,eAAe,EACf,aAAa,EACb,GAAG,EACH,WAAW,GAQZ;IACC,MAAM,EAAE,UAAU,EAAE,GAAG,QAAQ,CAAC;IAChC,IAAI,UAAU,EAAE,CAAC;QACf,MAAM,aAAa,GAAG,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,UAAU,CAAC,CAAC;QACzD,EAAE,CAAC,SAAS,CAAC,aAAa,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;QACjD,MAAM,cAAc,GAAG,0BAA0B,CAAC,UAAU,EAAE,WAAW,CAAC,CAAC;QAC3E,cAAc,CAAC,OAAO,CAAC,qBAAqB,CAAC,CAAC;QAE9C,SAAS,qBAAqB,CAC5B,aAA0E;YAE1E,MAAM,gBAAgB,GAAG,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,aAAa,CAAC,CAAC;YACjE,kBAAkB,CAAC,gBAAgB,EAAE,aAAa,CAAC,CAAC;YACpD,KAAK,MAAM,aAAa,IAAI,MAAM,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC,aAAa,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC;gBAC3E,MAAM,QAAQ,GAAG,eAAe,CAAC,gBAAgB,EAAE,aAAa,EAAE,GAAG,CAAC,CAAC;gBACvE,MAAM,aAAa,GAAG,UAAU,EAAE,CAAC,aAAa,CAAC,EAAE,CAAC,aAAa,CAAC,CAAC;gBACnE,YAAY,CAAC,aAAa,EAAE,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,eAAe,CAAC,CAAC;gBACrE,kBAAkB,CAAC,aAAa,EAAE,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,aAAa,CAAC,CAAC;gBAEzE,IAAI,cAAc,CAAC,QAAQ,EAAE,aAAa,CAAC,EAAE,CAAC;oBAC5C,MAAM,CAAC,IAAI,CACT,yBAAyB,aAAa,kDAAkD,IAAI,CAC1F,QAAQ,CACT,cAAc,CAChB,CAAC;gBACJ,CAAC;qBAAM,CAAC;oBACN,sBAAsB,CAAC,aAAa,EAAE,QAAQ,CAAC,CAAC;gBAClD,CAAC;gBAED,OAAO,QAAQ,CAAC,UAAU,EAAE,CAAC,aAAa,CAAC,EAAE,CAAC,aAAa,CAAC,CAAC;YAC/D,CAAC;YACD,6BAA6B,CAAC,QAAQ,EAAE,aAAa,CAAC,CAAC;QACzD,CAAC;IACH,CAAC;AACH,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { type ChannelsFiles, type ComponentsFiles } from '../types.js';
|
|
2
|
-
export declare function iterateAsyncApiOperations({ operations, asyncapiDir, outDir, componentsFiles, channelsFiles, pathSeparator, ext, }: {
|
|
3
|
-
operations: Record<string, any> | undefined;
|
|
4
|
-
asyncapiDir: string;
|
|
5
|
-
outDir: string;
|
|
6
|
-
componentsFiles: ComponentsFiles;
|
|
7
|
-
channelsFiles: ChannelsFiles;
|
|
8
|
-
pathSeparator: string;
|
|
9
|
-
ext: string;
|
|
10
|
-
}): void;
|
|
11
|
-
//# sourceMappingURL=iterate-asyncapi-operations.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"iterate-asyncapi-operations.d.ts","sourceRoot":"","sources":["../../../../src/commands/split/asyncapi/iterate-asyncapi-operations.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,eAAe,EAAE,MAAM,aAAa,CAAC;AAQvE,wBAAgB,yBAAyB,CAAC,EACxC,UAAU,EACV,WAAW,EACX,MAAM,EACN,eAAe,EACf,aAAa,EACb,aAAa,EACb,GAAG,GACJ,EAAE;IACD,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,SAAS,CAAC;IAC5C,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,eAAe,EAAE,eAAe,CAAC;IACjC,aAAa,EAAE,aAAa,CAAC;IAC7B,aAAa,EAAE,MAAM,CAAC;IACtB,GAAG,EAAE,MAAM,CAAC;CACb,QAsBA"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { slash, isRef } from '@redocly/openapi-core';
|
|
2
|
-
import * as fs from 'node:fs';
|
|
3
|
-
import * as path from 'node:path';
|
|
4
|
-
import { pathToFilename, writeToFileByExtension } from '../../../utils/miscellaneous.js';
|
|
5
|
-
import { replace$Refs } from '../utils/replace-$-refs.js';
|
|
6
|
-
import { replaceChannelRefs } from '../utils/replace-channel-refs.js';
|
|
7
|
-
import { traverseDirectoryDeep, traverseDirectoryDeepCallback, } from '../utils/traverse-directory-deep.js';
|
|
8
|
-
export function iterateAsyncApiOperations({ operations, asyncapiDir, outDir, componentsFiles, channelsFiles, pathSeparator, ext, }) {
|
|
9
|
-
if (!operations)
|
|
10
|
-
return;
|
|
11
|
-
fs.mkdirSync(outDir, { recursive: true });
|
|
12
|
-
for (const operationName of Object.keys(operations)) {
|
|
13
|
-
const operationFile = `${path.join(outDir, pathToFilename(operationName, pathSeparator))}.${ext}`;
|
|
14
|
-
const operationData = operations[operationName];
|
|
15
|
-
if (isRef(operationData))
|
|
16
|
-
continue;
|
|
17
|
-
replace$Refs(operationData, path.dirname(operationFile), componentsFiles);
|
|
18
|
-
replaceChannelRefs(operationData, path.dirname(operationFile), channelsFiles);
|
|
19
|
-
writeToFileByExtension(operationData, operationFile);
|
|
20
|
-
operations[operationName] = {
|
|
21
|
-
$ref: slash(path.relative(asyncapiDir, operationFile)),
|
|
22
|
-
};
|
|
23
|
-
traverseDirectoryDeep(outDir, traverseDirectoryDeepCallback, componentsFiles);
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
//# sourceMappingURL=iterate-asyncapi-operations.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"iterate-asyncapi-operations.js","sourceRoot":"","sources":["../../../../src/commands/split/asyncapi/iterate-asyncapi-operations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAElC,OAAO,EAAE,cAAc,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AAEzF,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EACL,qBAAqB,EACrB,6BAA6B,GAC9B,MAAM,qCAAqC,CAAC;AAE7C,MAAM,UAAU,yBAAyB,CAAC,EACxC,UAAU,EACV,WAAW,EACX,MAAM,EACN,eAAe,EACf,aAAa,EACb,aAAa,EACb,GAAG,GASJ;IACC,IAAI,CAAC,UAAU;QAAE,OAAO;IACxB,EAAE,CAAC,SAAS,CAAC,MAAM,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAE1C,KAAK,MAAM,aAAa,IAAI,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC;QACpD,MAAM,aAAa,GAAG,GAAG,IAAI,CAAC,IAAI,CAChC,MAAM,EACN,cAAc,CAAC,aAAa,EAAE,aAAa,CAAC,CAC7C,IAAI,GAAG,EAAE,CAAC;QACX,MAAM,aAAa,GAAG,UAAU,CAAC,aAAa,CAAC,CAAC;QAEhD,IAAI,KAAK,CAAC,aAAa,CAAC;YAAE,SAAS;QAEnC,YAAY,CAAC,aAAa,EAAE,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,EAAE,eAAe,CAAC,CAAC;QAC1E,kBAAkB,CAAC,aAAa,EAAE,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,EAAE,aAAa,CAAC,CAAC;QAC9E,sBAAsB,CAAC,aAAa,EAAE,aAAa,CAAC,CAAC;QACrD,UAAU,CAAC,aAAa,CAAC,GAAG;YAC1B,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,WAAW,EAAE,aAAa,CAAC,CAAC;SACvD,CAAC;QAEF,qBAAqB,CAAC,MAAM,EAAE,6BAA6B,EAAE,eAAe,CAAC,CAAC;IAChF,CAAC;AACH,CAAC"}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import type { AnyAsyncApiDefinition, AsyncApi2SplittableComponent, AsyncApi3SplittableComponent } from '../types.js';
|
|
2
|
-
export declare function removeAsyncApiEmptyComponents(asyncapi: AnyAsyncApiDefinition, componentType: AsyncApi2SplittableComponent | AsyncApi3SplittableComponent): void;
|
|
3
|
-
//# sourceMappingURL=remove-asyncapi-empty-components.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"remove-asyncapi-empty-components.d.ts","sourceRoot":"","sources":["../../../../src/commands/split/asyncapi/remove-asyncapi-empty-components.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,qBAAqB,EACrB,4BAA4B,EAC5B,4BAA4B,EAC7B,MAAM,aAAa,CAAC;AAErB,wBAAgB,6BAA6B,CAC3C,QAAQ,EAAE,qBAAqB,EAC/B,aAAa,EAAE,4BAA4B,GAAG,4BAA4B,QAY3E"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { isEmptyObject } from '@redocly/openapi-core';
|
|
2
|
-
export function removeAsyncApiEmptyComponents(asyncapi, componentType) {
|
|
3
|
-
const components = asyncapi.components;
|
|
4
|
-
if (!components)
|
|
5
|
-
return;
|
|
6
|
-
if (isEmptyObject(components[componentType])) {
|
|
7
|
-
delete components[componentType];
|
|
8
|
-
}
|
|
9
|
-
if (isEmptyObject(components)) {
|
|
10
|
-
delete asyncapi.components;
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
//# sourceMappingURL=remove-asyncapi-empty-components.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"remove-asyncapi-empty-components.js","sourceRoot":"","sources":["../../../../src/commands/split/asyncapi/remove-asyncapi-empty-components.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAQtD,MAAM,UAAU,6BAA6B,CAC3C,QAA+B,EAC/B,aAA0E;IAE1E,MAAM,UAAU,GAAG,QAAQ,CAAC,UAAU,CAAC;IACvC,IAAI,CAAC,UAAU;QAAE,OAAO;IAExB,IAAI,aAAa,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC,EAAE,CAAC;QAC7C,OAAO,UAAU,CAAC,aAAa,CAAC,CAAC;IACnC,CAAC;IAED,IAAI,aAAa,CAAC,UAAU,CAAC,EAAE,CAAC;QAC9B,OAAO,QAAQ,CAAC,UAAU,CAAC;IAC7B,CAAC;AACH,CAAC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { type AnyAsyncApiDefinition } from '../types.js';
|
|
2
|
-
export declare function splitAsyncApiDefinition({ asyncapi, asyncapiDir, pathSeparator, ext, specVersion, }: {
|
|
3
|
-
asyncapi: AnyAsyncApiDefinition;
|
|
4
|
-
asyncapiDir: string;
|
|
5
|
-
pathSeparator: string;
|
|
6
|
-
ext: string;
|
|
7
|
-
specVersion: 'async2' | 'async3';
|
|
8
|
-
}): void;
|
|
9
|
-
//# sourceMappingURL=split-asyncapi-definition.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"split-asyncapi-definition.d.ts","sourceRoot":"","sources":["../../../../src/commands/split/asyncapi/split-asyncapi-definition.ts"],"names":[],"mappings":"AAMA,OAAO,EAA4C,KAAK,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAOnG,wBAAgB,uBAAuB,CAAC,EACtC,QAAQ,EACR,WAAW,EACX,aAAa,EACb,GAAG,EACH,WAAW,GACZ,EAAE;IACD,QAAQ,EAAE,qBAAqB,CAAC;IAChC,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,EAAE,QAAQ,GAAG,QAAQ,CAAC;CAClC,QA8CA"}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import * as fs from 'node:fs';
|
|
2
|
-
import * as path from 'node:path';
|
|
3
|
-
import { writeToFileByExtension } from '../../../utils/miscellaneous.js';
|
|
4
|
-
import { CHANNELS, OPERATIONS } from '../constants.js';
|
|
5
|
-
import { replace$Refs } from '../utils/replace-$-refs.js';
|
|
6
|
-
import { gatherAsyncApiComponentFiles } from './gather-asyncapi-component-files.js';
|
|
7
|
-
import { iterateAsyncApiChannels } from './iterate-asyncapi-channels.js';
|
|
8
|
-
import { iterateAsyncApiComponents } from './iterate-asyncapi-components.js';
|
|
9
|
-
import { iterateAsyncApiOperations } from './iterate-asyncapi-operations.js';
|
|
10
|
-
export function splitAsyncApiDefinition({ asyncapi, asyncapiDir, pathSeparator, ext, specVersion, }) {
|
|
11
|
-
fs.mkdirSync(asyncapiDir, { recursive: true });
|
|
12
|
-
const componentsFiles = {};
|
|
13
|
-
// Phase 1: gather component file paths so replace$Refs can resolve #/components/... when writing channels
|
|
14
|
-
gatherAsyncApiComponentFiles({ asyncapi, asyncapiDir, componentsFiles, ext, specVersion });
|
|
15
|
-
// Phase 2: split channels (componentsFiles is populated → replace$Refs rewrites #/components/... refs)
|
|
16
|
-
const channels = asyncapi.channels;
|
|
17
|
-
const channelsFiles = channels
|
|
18
|
-
? iterateAsyncApiChannels({
|
|
19
|
-
channels,
|
|
20
|
-
asyncapiDir,
|
|
21
|
-
outDir: path.join(asyncapiDir, CHANNELS),
|
|
22
|
-
componentsFiles,
|
|
23
|
-
pathSeparator,
|
|
24
|
-
ext,
|
|
25
|
-
})
|
|
26
|
-
: {};
|
|
27
|
-
// Phase 3: write component files (channelsFiles is populated → replaceChannelRefs rewrites #/channels/... refs)
|
|
28
|
-
iterateAsyncApiComponents({
|
|
29
|
-
asyncapi,
|
|
30
|
-
asyncapiDir,
|
|
31
|
-
componentsFiles,
|
|
32
|
-
channelsFiles,
|
|
33
|
-
ext,
|
|
34
|
-
specVersion,
|
|
35
|
-
});
|
|
36
|
-
// Phase 4: split operations for AsyncAPI 3
|
|
37
|
-
if (specVersion === 'async3' && asyncapi.operations) {
|
|
38
|
-
iterateAsyncApiOperations({
|
|
39
|
-
operations: asyncapi.operations,
|
|
40
|
-
asyncapiDir,
|
|
41
|
-
outDir: path.join(asyncapiDir, OPERATIONS),
|
|
42
|
-
componentsFiles,
|
|
43
|
-
channelsFiles,
|
|
44
|
-
pathSeparator,
|
|
45
|
-
ext,
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
replace$Refs(asyncapi, asyncapiDir, componentsFiles);
|
|
49
|
-
writeToFileByExtension(asyncapi, path.join(asyncapiDir, `asyncapi.${ext}`));
|
|
50
|
-
}
|
|
51
|
-
//# sourceMappingURL=split-asyncapi-definition.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"split-asyncapi-definition.js","sourceRoot":"","sources":["../../../../src/commands/split/asyncapi/split-asyncapi-definition.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAElC,OAAO,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AACzE,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAEvD,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,4BAA4B,EAAE,MAAM,sCAAsC,CAAC;AACpF,OAAO,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AACzE,OAAO,EAAE,yBAAyB,EAAE,MAAM,kCAAkC,CAAC;AAC7E,OAAO,EAAE,yBAAyB,EAAE,MAAM,kCAAkC,CAAC;AAE7E,MAAM,UAAU,uBAAuB,CAAC,EACtC,QAAQ,EACR,WAAW,EACX,aAAa,EACb,GAAG,EACH,WAAW,GAOZ;IACC,EAAE,CAAC,SAAS,CAAC,WAAW,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAE/C,MAAM,eAAe,GAAoB,EAAE,CAAC;IAE5C,0GAA0G;IAC1G,4BAA4B,CAAC,EAAE,QAAQ,EAAE,WAAW,EAAE,eAAe,EAAE,GAAG,EAAE,WAAW,EAAE,CAAC,CAAC;IAE3F,uGAAuG;IACvG,MAAM,QAAQ,GAAG,QAAQ,CAAC,QAAQ,CAAC;IACnC,MAAM,aAAa,GAAkB,QAAQ;QAC3C,CAAC,CAAC,uBAAuB,CAAC;YACtB,QAAQ;YACR,WAAW;YACX,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,QAAQ,CAAC;YACxC,eAAe;YACf,aAAa;YACb,GAAG;SACJ,CAAC;QACJ,CAAC,CAAC,EAAE,CAAC;IAEP,gHAAgH;IAChH,yBAAyB,CAAC;QACxB,QAAQ;QACR,WAAW;QACX,eAAe;QACf,aAAa;QACb,GAAG;QACH,WAAW;KACZ,CAAC,CAAC;IAEH,2CAA2C;IAC3C,IAAI,WAAW,KAAK,QAAQ,IAAK,QAA6B,CAAC,UAAU,EAAE,CAAC;QAC1E,yBAAyB,CAAC;YACxB,UAAU,EAAG,QAA6B,CAAC,UAAW;YACtD,WAAW;YACX,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,UAAU,CAAC;YAC1C,eAAe;YACf,aAAa;YACb,aAAa;YACb,GAAG;SACJ,CAAC,CAAC;IACL,CAAC;IAED,YAAY,CAAC,QAAQ,EAAE,WAAW,EAAE,eAAe,CAAC,CAAC;IACrD,sBAAsB,CAAC,QAAQ,EAAE,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,YAAY,GAAG,EAAE,CAAC,CAAC,CAAC;AAC9E,CAAC"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export declare const COMPONENTS = "components";
|
|
2
|
-
export declare const PATHS = "paths";
|
|
3
|
-
export declare const WEBHOOKS = "webhooks";
|
|
4
|
-
export declare const xWEBHOOKS = "x-webhooks";
|
|
5
|
-
export declare const CHANNELS = "channels";
|
|
6
|
-
export declare const OPERATIONS = "operations";
|
|
7
|
-
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/commands/split/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU,eAAe,CAAC;AACvC,eAAO,MAAM,KAAK,UAAU,CAAC;AAC7B,eAAO,MAAM,QAAQ,aAAa,CAAC;AACnC,eAAO,MAAM,SAAS,eAAe,CAAC;AACtC,eAAO,MAAM,QAAQ,aAAa,CAAC;AACnC,eAAO,MAAM,UAAU,eAAe,CAAC"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export const COMPONENTS = 'components';
|
|
2
|
-
export const PATHS = 'paths';
|
|
3
|
-
export const WEBHOOKS = 'webhooks';
|
|
4
|
-
export const xWEBHOOKS = 'x-webhooks';
|
|
5
|
-
export const CHANNELS = 'channels';
|
|
6
|
-
export const OPERATIONS = 'operations';
|
|
7
|
-
//# sourceMappingURL=constants.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/commands/split/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,UAAU,GAAG,YAAY,CAAC;AACvC,MAAM,CAAC,MAAM,KAAK,GAAG,OAAO,CAAC;AAC7B,MAAM,CAAC,MAAM,QAAQ,GAAG,UAAU,CAAC;AACnC,MAAM,CAAC,MAAM,SAAS,GAAG,YAAY,CAAC;AACtC,MAAM,CAAC,MAAM,QAAQ,GAAG,UAAU,CAAC;AACnC,MAAM,CAAC,MAAM,UAAU,GAAG,YAAY,CAAC"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { CommandArgs } from '../../wrapper.js';
|
|
2
|
-
import { type SplitArgv } from './types.js';
|
|
3
|
-
import { iteratePathItems } from './utils/iterate-path-items.js';
|
|
4
|
-
export declare function handleSplit({ argv, collectSpecData }: CommandArgs<SplitArgv>): Promise<void>;
|
|
5
|
-
export { iteratePathItems };
|
|
6
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/split/index.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAGpD,OAAO,EAIL,KAAK,SAAS,EACf,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAEjE,wBAAsB,WAAW,CAAC,EAAE,IAAI,EAAE,eAAe,EAAE,EAAE,WAAW,CAAC,SAAS,CAAC,iBAyClF;AAED,OAAO,EAAE,gBAAgB,EAAE,CAAC"}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { logger, detectSpec } from '@redocly/openapi-core';
|
|
2
|
-
import { blue, green } from 'colorette';
|
|
3
|
-
import * as fs from 'node:fs';
|
|
4
|
-
import { performance } from 'perf_hooks';
|
|
5
|
-
import { exitWithError } from '../../utils/error.js';
|
|
6
|
-
import { printExecutionTime, readYaml, getAndValidateFileExtension, } from '../../utils/miscellaneous.js';
|
|
7
|
-
import { splitAsyncApiDefinition } from './asyncapi/split-asyncapi-definition.js';
|
|
8
|
-
import { splitOASDefinition } from './oas/split-oas-definition.js';
|
|
9
|
-
import { iteratePathItems } from './utils/iterate-path-items.js';
|
|
10
|
-
export async function handleSplit({ argv, collectSpecData }) {
|
|
11
|
-
const startedAt = performance.now();
|
|
12
|
-
const { api, outDir, separator } = argv;
|
|
13
|
-
const ext = getAndValidateFileExtension(api);
|
|
14
|
-
if (!fs.existsSync(api))
|
|
15
|
-
exitWithError(`File ${blue(api)} does not exist.`);
|
|
16
|
-
const definition = readYaml(api);
|
|
17
|
-
collectSpecData?.(definition);
|
|
18
|
-
const specVersion = detectSpec(definition);
|
|
19
|
-
switch (specVersion) {
|
|
20
|
-
case 'async2':
|
|
21
|
-
case 'async3':
|
|
22
|
-
splitAsyncApiDefinition({
|
|
23
|
-
asyncapi: definition,
|
|
24
|
-
asyncapiDir: outDir,
|
|
25
|
-
pathSeparator: separator,
|
|
26
|
-
ext,
|
|
27
|
-
specVersion,
|
|
28
|
-
});
|
|
29
|
-
break;
|
|
30
|
-
case 'oas3_0':
|
|
31
|
-
case 'oas3_1':
|
|
32
|
-
case 'oas3_2':
|
|
33
|
-
splitOASDefinition(definition, outDir, separator, ext);
|
|
34
|
-
break;
|
|
35
|
-
case 'oas2':
|
|
36
|
-
exitWithError('OpenAPI 2 is not supported by this command.');
|
|
37
|
-
break;
|
|
38
|
-
default:
|
|
39
|
-
exitWithError('File does not conform to the OpenAPI or AsyncAPI Specification. Version is not specified.');
|
|
40
|
-
}
|
|
41
|
-
logger.info(`🪓 Document: ${blue(api)} ${green('is successfully split')}
|
|
42
|
-
and all related files are saved to the directory: ${blue(outDir)} \n`);
|
|
43
|
-
printExecutionTime('split', startedAt, api);
|
|
44
|
-
}
|
|
45
|
-
export { iteratePathItems };
|
|
46
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/commands/split/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEzC,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EACL,kBAAkB,EAClB,QAAQ,EACR,2BAA2B,GAC5B,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EAAE,uBAAuB,EAAE,MAAM,yCAAyC,CAAC;AAClF,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAOnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAEjE,MAAM,CAAC,KAAK,UAAU,WAAW,CAAC,EAAE,IAAI,EAAE,eAAe,EAA0B;IACjF,MAAM,SAAS,GAAG,WAAW,CAAC,GAAG,EAAE,CAAC;IACpC,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,IAAI,CAAC;IACxC,MAAM,GAAG,GAAG,2BAA2B,CAAC,GAAG,CAAC,CAAC;IAE7C,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,GAAG,CAAC;QAAE,aAAa,CAAC,QAAQ,IAAI,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC;IAE5E,MAAM,UAAU,GAAG,QAAQ,CAAC,GAAG,CAAkB,CAAC;IAClD,eAAe,EAAE,CAAC,UAAU,CAAC,CAAC;IAE9B,MAAM,WAAW,GAAG,UAAU,CAAC,UAAU,CAAC,CAAC;IAC3C,QAAQ,WAAW,EAAE,CAAC;QACpB,KAAK,QAAQ,CAAC;QACd,KAAK,QAAQ;YACX,uBAAuB,CAAC;gBACtB,QAAQ,EAAE,UAAmC;gBAC7C,WAAW,EAAE,MAAM;gBACnB,aAAa,EAAE,SAAS;gBACxB,GAAG;gBACH,WAAW;aACZ,CAAC,CAAC;YACH,MAAM;QACR,KAAK,QAAQ,CAAC;QACd,KAAK,QAAQ,CAAC;QACd,KAAK,QAAQ;YACX,kBAAkB,CAAC,UAA+B,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,CAAC,CAAC;YAC5E,MAAM;QACR,KAAK,MAAM;YACT,aAAa,CAAC,6CAA6C,CAAC,CAAC;YAC7D,MAAM;QACR;YACE,aAAa,CACX,2FAA2F,CAC5F,CAAC;IACN,CAAC;IAED,MAAM,CAAC,IAAI,CACT,gBAAgB,IAAI,CAAC,GAAG,CAAC,IAAI,KAAK,CAAC,uBAAuB,CAAC;wDACP,IAAI,CAAC,MAAM,CAAC,KAAK,CACtE,CAAC;IACF,kBAAkB,CAAC,OAAO,EAAE,SAAS,EAAE,GAAG,CAAC,CAAC;AAC9C,CAAC;AAED,OAAO,EAAE,gBAAgB,EAAE,CAAC"}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
export declare const OPENAPI3_METHOD_NAMES: readonly ["get", "put", "post", "delete", "options", "head", "patch", "trace", "query"];
|
|
2
|
-
export declare const OPENAPI3_COMPONENT_NAMES: readonly ["schemas", "responses", "parameters", "examples", "headers", "requestBodies", "links", "callbacks", "securitySchemes"];
|
|
3
|
-
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/commands/split/oas/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,qBAAqB,yFAUxB,CAAC;AAEX,eAAO,MAAM,wBAAwB,kIAU3B,CAAC"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
export const OPENAPI3_METHOD_NAMES = [
|
|
2
|
-
'get',
|
|
3
|
-
'put',
|
|
4
|
-
'post',
|
|
5
|
-
'delete',
|
|
6
|
-
'options',
|
|
7
|
-
'head',
|
|
8
|
-
'patch',
|
|
9
|
-
'trace',
|
|
10
|
-
'query',
|
|
11
|
-
];
|
|
12
|
-
export const OPENAPI3_COMPONENT_NAMES = [
|
|
13
|
-
'schemas',
|
|
14
|
-
'responses',
|
|
15
|
-
'parameters',
|
|
16
|
-
'examples',
|
|
17
|
-
'headers',
|
|
18
|
-
'requestBodies',
|
|
19
|
-
'links',
|
|
20
|
-
'callbacks',
|
|
21
|
-
'securitySchemes',
|
|
22
|
-
];
|
|
23
|
-
//# sourceMappingURL=constants.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../src/commands/split/oas/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,KAAK;IACL,KAAK;IACL,MAAM;IACN,QAAQ;IACR,SAAS;IACT,MAAM;IACN,OAAO;IACP,OAAO;IACP,OAAO;CACC,CAAC;AAEX,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,SAAS;IACT,WAAW;IACX,YAAY;IACZ,UAAU;IACV,SAAS;IACT,eAAe;IACf,OAAO;IACP,WAAW;IACX,iBAAiB;CACT,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"split-oas-definition.d.ts","sourceRoot":"","sources":["../../../../src/commands/split/oas/split-oas-definition.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,iBAAiB,EAAmB,MAAM,aAAa,CAAC;AAKtE,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,iBAAiB,EAC1B,UAAU,EAAE,MAAM,EAClB,aAAa,EAAE,MAAM,EACrB,GAAG,EAAE,MAAM,QA+BZ"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import * as fs from 'node:fs';
|
|
2
|
-
import * as path from 'node:path';
|
|
3
|
-
import { writeToFileByExtension } from '../../../utils/miscellaneous.js';
|
|
4
|
-
import { iterateComponents } from '../utils/iterate-components.js';
|
|
5
|
-
import { iteratePathItems } from '../utils/iterate-path-items.js';
|
|
6
|
-
import { replace$Refs } from '../utils/replace-$-refs.js';
|
|
7
|
-
export function splitOASDefinition(openapi, openapiDir, pathSeparator, ext) {
|
|
8
|
-
fs.mkdirSync(openapiDir, { recursive: true });
|
|
9
|
-
const componentsFiles = {};
|
|
10
|
-
iterateComponents(openapi, openapiDir, componentsFiles, ext);
|
|
11
|
-
iteratePathItems(openapi.paths, openapiDir, path.join(openapiDir, 'paths'), componentsFiles, pathSeparator, undefined, ext);
|
|
12
|
-
const webhooks = openapi.webhooks ||
|
|
13
|
-
openapi['x-webhooks'];
|
|
14
|
-
// use webhook_ prefix for code samples to prevent potential name-clashes with paths samples
|
|
15
|
-
iteratePathItems(webhooks, openapiDir, path.join(openapiDir, 'webhooks'), componentsFiles, pathSeparator, 'webhook_', ext);
|
|
16
|
-
replace$Refs(openapi, openapiDir, componentsFiles);
|
|
17
|
-
writeToFileByExtension(openapi, path.join(openapiDir, `openapi.${ext}`));
|
|
18
|
-
}
|
|
19
|
-
//# sourceMappingURL=split-oas-definition.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"split-oas-definition.js","sourceRoot":"","sources":["../../../../src/commands/split/oas/split-oas-definition.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAElC,OAAO,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AAEzE,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D,MAAM,UAAU,kBAAkB,CAChC,OAA0B,EAC1B,UAAkB,EAClB,aAAqB,EACrB,GAAW;IAEX,EAAE,CAAC,SAAS,CAAC,UAAU,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAE9C,MAAM,eAAe,GAAoB,EAAE,CAAC;IAC5C,iBAAiB,CAAC,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,GAAG,CAAC,CAAC;IAC7D,gBAAgB,CACd,OAAO,CAAC,KAAK,EACb,UAAU,EACV,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,OAAO,CAAC,EAC9B,eAAe,EACf,aAAa,EACb,SAAS,EACT,GAAG,CACJ,CAAC;IACF,MAAM,QAAQ,GACX,OAA+C,CAAC,QAAQ;QACxD,OAA0B,CAAC,YAAY,CAAC,CAAC;IAC5C,4FAA4F;IAC5F,gBAAgB,CACd,QAAQ,EACR,UAAU,EACV,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,UAAU,CAAC,EACjC,eAAe,EACf,aAAa,EACb,UAAU,EACV,GAAG,CACJ,CAAC;IAEF,YAAY,CAAC,OAAO,EAAE,UAAU,EAAE,eAAe,CAAC,CAAC;IACnD,sBAAsB,CAAC,OAAO,EAAE,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,WAAW,GAAG,EAAE,CAAC,CAAC,CAAC;AAC3E,CAAC"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import type { Oas2Definition, Oas3Definition, Oas3_1Definition, Oas3_2Definition, Async2Definition, Async3Definition } from '@redocly/openapi-core';
|
|
2
|
-
import type { VerifyConfigOptions } from '../../types.js';
|
|
3
|
-
import type { ASYNCAPI2_COMPONENT_NAMES, ASYNCAPI2_SPLITTABLE_COMPONENT_NAMES, ASYNCAPI3_COMPONENT_NAMES, ASYNCAPI3_SPLITTABLE_COMPONENT_NAMES, ASYNCAPI_ACTION_NAMES } from './asyncapi/constants.js';
|
|
4
|
-
import type { OPENAPI3_METHOD_NAMES, OPENAPI3_COMPONENT_NAMES } from './oas/constants.js';
|
|
5
|
-
export type Definition = Oas2Definition | Oas3Definition | Oas3_1Definition | Oas3_2Definition | Async2Definition | Async3Definition;
|
|
6
|
-
export interface ComponentsFiles {
|
|
7
|
-
[schemas: string]: any;
|
|
8
|
-
}
|
|
9
|
-
export type ChannelsFiles = Record<string, string>;
|
|
10
|
-
export interface RefObject {
|
|
11
|
-
[$ref: string]: string;
|
|
12
|
-
}
|
|
13
|
-
export type Oas3Method = (typeof OPENAPI3_METHOD_NAMES)[number];
|
|
14
|
-
export type Oas3Component = (typeof OPENAPI3_COMPONENT_NAMES)[number];
|
|
15
|
-
export type AsyncApiAction = (typeof ASYNCAPI_ACTION_NAMES)[number];
|
|
16
|
-
export type AsyncApi2Component = (typeof ASYNCAPI2_COMPONENT_NAMES)[number];
|
|
17
|
-
export type AsyncApi2SplittableComponent = (typeof ASYNCAPI2_SPLITTABLE_COMPONENT_NAMES)[number];
|
|
18
|
-
export type AsyncApi3Component = (typeof ASYNCAPI3_COMPONENT_NAMES)[number];
|
|
19
|
-
export type AsyncApi3SplittableComponent = (typeof ASYNCAPI3_SPLITTABLE_COMPONENT_NAMES)[number];
|
|
20
|
-
export type AnyOas3Definition = Oas3Definition | Oas3_1Definition | Oas3_2Definition;
|
|
21
|
-
export type AnyAsyncApiDefinition = Async2Definition | Async3Definition;
|
|
22
|
-
export type AnyDefinition = AnyOas3Definition | AnyAsyncApiDefinition;
|
|
23
|
-
export type SplitArgv = {
|
|
24
|
-
api: string;
|
|
25
|
-
outDir: string;
|
|
26
|
-
separator: string;
|
|
27
|
-
} & VerifyConfigOptions;
|
|
28
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/commands/split/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,cAAc,EACd,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EACjB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,KAAK,EACV,yBAAyB,EACzB,oCAAoC,EACpC,yBAAyB,EACzB,oCAAoC,EACpC,qBAAqB,EACtB,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,qBAAqB,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAE1F,MAAM,MAAM,UAAU,GAClB,cAAc,GACd,cAAc,GACd,gBAAgB,GAChB,gBAAgB,GAChB,gBAAgB,GAChB,gBAAgB,CAAC;AACrB,MAAM,WAAW,eAAe;IAC9B,CAAC,OAAO,EAAE,MAAM,GAAG,GAAG,CAAC;CACxB;AAED,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AACnD,MAAM,WAAW,SAAS;IACxB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;CACxB;AAED,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,CAAC,CAAC;AAChE,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,wBAAwB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEtE,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,CAAC,CAAC;AACpE,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,yBAAyB,CAAC,CAAC,MAAM,CAAC,CAAC;AAC5E,MAAM,MAAM,4BAA4B,GAAG,CAAC,OAAO,oCAAoC,CAAC,CAAC,MAAM,CAAC,CAAC;AAEjG,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,yBAAyB,CAAC,CAAC,MAAM,CAAC,CAAC;AAC5E,MAAM,MAAM,4BAA4B,GAAG,CAAC,OAAO,oCAAoC,CAAC,CAAC,MAAM,CAAC,CAAC;AAEjG,MAAM,MAAM,iBAAiB,GAAG,cAAc,GAAG,gBAAgB,GAAG,gBAAgB,CAAC;AACrF,MAAM,MAAM,qBAAqB,GAAG,gBAAgB,GAAG,gBAAgB,CAAC;AACxE,MAAM,MAAM,aAAa,GAAG,iBAAiB,GAAG,qBAAqB,CAAC;AAEtE,MAAM,MAAM,SAAS,GAAG;IACtB,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;CACnB,GAAG,mBAAmB,CAAC"}
|