@depup/redocly__openapi-core 2.22.1-depup.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +32 -0
- package/changes.json +14 -0
- package/lib/bundle/bundle-document.d.ts +33 -0
- package/lib/bundle/bundle-document.d.ts.map +1 -0
- package/lib/bundle/bundle-document.js +85 -0
- package/lib/bundle/bundle-document.js.map +1 -0
- package/lib/bundle/bundle-oas.d.ts +15 -0
- package/lib/bundle/bundle-oas.d.ts.map +1 -0
- package/lib/bundle/bundle-oas.js +55 -0
- package/lib/bundle/bundle-oas.js.map +1 -0
- package/lib/bundle/bundle-visitor.d.ts +15 -0
- package/lib/bundle/bundle-visitor.d.ts.map +1 -0
- package/lib/bundle/bundle-visitor.js +257 -0
- package/lib/bundle/bundle-visitor.js.map +1 -0
- package/lib/bundle/bundle.d.ts +26 -0
- package/lib/bundle/bundle.d.ts.map +1 -0
- package/lib/bundle/bundle.js +74 -0
- package/lib/bundle/bundle.js.map +1 -0
- package/lib/config/all.d.ts +4 -0
- package/lib/config/all.d.ts.map +1 -0
- package/lib/config/all.js +310 -0
- package/lib/config/all.js.map +1 -0
- package/lib/config/builtIn.d.ts +4 -0
- package/lib/config/builtIn.d.ts.map +1 -0
- package/lib/config/builtIn.js +58 -0
- package/lib/config/builtIn.js.map +1 -0
- package/lib/config/bundle-extends.d.ts +8 -0
- package/lib/config/bundle-extends.d.ts.map +1 -0
- package/lib/config/bundle-extends.js +27 -0
- package/lib/config/bundle-extends.js.map +1 -0
- package/lib/config/config-resolvers.d.ts +23 -0
- package/lib/config/config-resolvers.d.ts.map +1 -0
- package/lib/config/config-resolvers.js +335 -0
- package/lib/config/config-resolvers.js.map +1 -0
- package/lib/config/config.d.ts +47 -0
- package/lib/config/config.d.ts.map +1 -0
- package/lib/config/config.js +338 -0
- package/lib/config/config.js.map +1 -0
- package/lib/config/constants.d.ts +10 -0
- package/lib/config/constants.d.ts.map +1 -0
- package/lib/config/constants.js +13 -0
- package/lib/config/constants.js.map +1 -0
- package/lib/config/get-resolve-config.d.ts +3 -0
- package/lib/config/get-resolve-config.d.ts.map +1 -0
- package/lib/config/get-resolve-config.js +9 -0
- package/lib/config/get-resolve-config.js.map +1 -0
- package/lib/config/group-assertion-rules.d.ts +3 -0
- package/lib/config/group-assertion-rules.d.ts.map +1 -0
- package/lib/config/group-assertion-rules.js +51 -0
- package/lib/config/group-assertion-rules.js.map +1 -0
- package/lib/config/index.d.ts +8 -0
- package/lib/config/index.d.ts.map +1 -0
- package/lib/config/index.js +8 -0
- package/lib/config/index.js.map +1 -0
- package/lib/config/load.d.ts +19 -0
- package/lib/config/load.d.ts.map +1 -0
- package/lib/config/load.js +98 -0
- package/lib/config/load.js.map +1 -0
- package/lib/config/minimal.d.ts +4 -0
- package/lib/config/minimal.d.ts.map +1 -0
- package/lib/config/minimal.js +289 -0
- package/lib/config/minimal.js.map +1 -0
- package/lib/config/recommended-strict.d.ts +4 -0
- package/lib/config/recommended-strict.d.ts.map +1 -0
- package/lib/config/recommended-strict.js +289 -0
- package/lib/config/recommended-strict.js.map +1 -0
- package/lib/config/recommended.d.ts +4 -0
- package/lib/config/recommended.d.ts.map +1 -0
- package/lib/config/recommended.js +289 -0
- package/lib/config/recommended.js.map +1 -0
- package/lib/config/rules.d.ts +11 -0
- package/lib/config/rules.d.ts.map +1 -0
- package/lib/config/rules.js +35 -0
- package/lib/config/rules.js.map +1 -0
- package/lib/config/spec.d.ts +4 -0
- package/lib/config/spec.d.ts.map +1 -0
- package/lib/config/spec.js +289 -0
- package/lib/config/spec.js.map +1 -0
- package/lib/config/types.d.ts +158 -0
- package/lib/config/types.d.ts.map +1 -0
- package/lib/config/types.js +2 -0
- package/lib/config/types.js.map +1 -0
- package/lib/config/utils.d.ts +14 -0
- package/lib/config/utils.d.ts.map +1 -0
- package/lib/config/utils.js +129 -0
- package/lib/config/utils.js.map +1 -0
- package/lib/config/visitors.d.ts +50 -0
- package/lib/config/visitors.d.ts.map +1 -0
- package/lib/config/visitors.js +99 -0
- package/lib/config/visitors.js.map +1 -0
- package/lib/decorators/arazzo/index.d.ts +2 -0
- package/lib/decorators/arazzo/index.d.ts.map +1 -0
- package/lib/decorators/arazzo/index.js +2 -0
- package/lib/decorators/arazzo/index.js.map +1 -0
- package/lib/decorators/async2/index.d.ts +2 -0
- package/lib/decorators/async2/index.d.ts.map +1 -0
- package/lib/decorators/async2/index.js +2 -0
- package/lib/decorators/async2/index.js.map +1 -0
- package/lib/decorators/async3/index.d.ts +2 -0
- package/lib/decorators/async3/index.d.ts.map +1 -0
- package/lib/decorators/async3/index.js +2 -0
- package/lib/decorators/async3/index.js.map +1 -0
- package/lib/decorators/common/filters/filter-helper.d.ts +4 -0
- package/lib/decorators/common/filters/filter-helper.d.ts.map +1 -0
- package/lib/decorators/common/filters/filter-helper.js +65 -0
- package/lib/decorators/common/filters/filter-helper.js.map +1 -0
- package/lib/decorators/common/filters/filter-in.d.ts +3 -0
- package/lib/decorators/common/filters/filter-in.d.ts.map +1 -0
- package/lib/decorators/common/filters/filter-in.js +67 -0
- package/lib/decorators/common/filters/filter-in.js.map +1 -0
- package/lib/decorators/common/filters/filter-out.d.ts +3 -0
- package/lib/decorators/common/filters/filter-out.d.ts.map +1 -0
- package/lib/decorators/common/filters/filter-out.js +67 -0
- package/lib/decorators/common/filters/filter-out.js.map +1 -0
- package/lib/decorators/common/info-description-override.d.ts +3 -0
- package/lib/decorators/common/info-description-override.d.ts.map +1 -0
- package/lib/decorators/common/info-description-override.js +21 -0
- package/lib/decorators/common/info-description-override.js.map +1 -0
- package/lib/decorators/common/info-override.d.ts +3 -0
- package/lib/decorators/common/info-override.d.ts.map +1 -0
- package/lib/decorators/common/info-override.js +14 -0
- package/lib/decorators/common/info-override.js.map +1 -0
- package/lib/decorators/common/media-type-examples-override.d.ts +3 -0
- package/lib/decorators/common/media-type-examples-override.d.ts.map +1 -0
- package/lib/decorators/common/media-type-examples-override.js +58 -0
- package/lib/decorators/common/media-type-examples-override.js.map +1 -0
- package/lib/decorators/common/operation-description-override.d.ts +3 -0
- package/lib/decorators/common/operation-description-override.d.ts.map +1 -0
- package/lib/decorators/common/operation-description-override.js +27 -0
- package/lib/decorators/common/operation-description-override.js.map +1 -0
- package/lib/decorators/common/remove-x-internal.d.ts +3 -0
- package/lib/decorators/common/remove-x-internal.d.ts.map +1 -0
- package/lib/decorators/common/remove-x-internal.js +68 -0
- package/lib/decorators/common/remove-x-internal.js.map +1 -0
- package/lib/decorators/common/tag-description-override.d.ts +3 -0
- package/lib/decorators/common/tag-description-override.d.ts.map +1 -0
- package/lib/decorators/common/tag-description-override.js +23 -0
- package/lib/decorators/common/tag-description-override.js.map +1 -0
- package/lib/decorators/oas2/index.d.ts +12 -0
- package/lib/decorators/oas2/index.d.ts.map +1 -0
- package/lib/decorators/oas2/index.js +19 -0
- package/lib/decorators/oas2/index.js.map +1 -0
- package/lib/decorators/oas2/remove-unused-components.d.ts +3 -0
- package/lib/decorators/oas2/remove-unused-components.d.ts.map +1 -0
- package/lib/decorators/oas2/remove-unused-components.js +88 -0
- package/lib/decorators/oas2/remove-unused-components.js.map +1 -0
- package/lib/decorators/oas3/index.d.ts +13 -0
- package/lib/decorators/oas3/index.d.ts.map +1 -0
- package/lib/decorators/oas3/index.js +21 -0
- package/lib/decorators/oas3/index.js.map +1 -0
- package/lib/decorators/oas3/remove-unused-components.d.ts +3 -0
- package/lib/decorators/oas3/remove-unused-components.d.ts.map +1 -0
- package/lib/decorators/oas3/remove-unused-components.js +116 -0
- package/lib/decorators/oas3/remove-unused-components.js.map +1 -0
- package/lib/decorators/openrpc/index.d.ts +2 -0
- package/lib/decorators/openrpc/index.d.ts.map +1 -0
- package/lib/decorators/openrpc/index.js +2 -0
- package/lib/decorators/openrpc/index.js.map +1 -0
- package/lib/decorators/overlay1/index.d.ts +2 -0
- package/lib/decorators/overlay1/index.d.ts.map +1 -0
- package/lib/decorators/overlay1/index.js +2 -0
- package/lib/decorators/overlay1/index.js.map +1 -0
- package/lib/detect-spec.d.ts +5 -0
- package/lib/detect-spec.d.ts.map +1 -0
- package/lib/detect-spec.js +79 -0
- package/lib/detect-spec.js.map +1 -0
- package/lib/env.d.ts +3 -0
- package/lib/env.d.ts.map +1 -0
- package/lib/env.js +5 -0
- package/lib/env.js.map +1 -0
- package/lib/errors/yaml-parse-error.d.ts +9 -0
- package/lib/errors/yaml-parse-error.d.ts.map +1 -0
- package/lib/errors/yaml-parse-error.js +14 -0
- package/lib/errors/yaml-parse-error.js.map +1 -0
- package/lib/format/codeframes.d.ts +23 -0
- package/lib/format/codeframes.d.ts.map +1 -0
- package/lib/format/codeframes.js +177 -0
- package/lib/format/codeframes.js.map +1 -0
- package/lib/format/format.d.ts +23 -0
- package/lib/format/format.d.ts.map +1 -0
- package/lib/format/format.js +365 -0
- package/lib/format/format.js.map +1 -0
- package/lib/index.d.ts +58 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +49 -0
- package/lib/index.js.map +1 -0
- package/lib/js-yaml/index.d.ts +4 -0
- package/lib/js-yaml/index.d.ts.map +1 -0
- package/lib/js-yaml/index.js +11 -0
- package/lib/js-yaml/index.js.map +1 -0
- package/lib/lint-entity.d.ts +24 -0
- package/lib/lint-entity.d.ts.map +1 -0
- package/lib/lint-entity.js +171 -0
- package/lib/lint-entity.js.map +1 -0
- package/lib/lint.d.ts +31 -0
- package/lib/lint.d.ts.map +1 -0
- package/lib/lint.js +123 -0
- package/lib/lint.js.map +1 -0
- package/lib/logger.d.ts +26 -0
- package/lib/logger.d.ts.map +1 -0
- package/lib/logger.js +56 -0
- package/lib/logger.js.map +1 -0
- package/lib/oas-types.d.ts +877 -0
- package/lib/oas-types.d.ts.map +1 -0
- package/lib/oas-types.js +35 -0
- package/lib/oas-types.js.map +1 -0
- package/lib/ref-utils.d.ts +32 -0
- package/lib/ref-utils.d.ts.map +1 -0
- package/lib/ref-utils.js +109 -0
- package/lib/ref-utils.js.map +1 -0
- package/lib/resolve.d.ts +57 -0
- package/lib/resolve.d.ts.map +1 -0
- package/lib/resolve.js +326 -0
- package/lib/resolve.js.map +1 -0
- package/lib/rules/ajv.d.ts +20 -0
- package/lib/rules/ajv.d.ts.map +1 -0
- package/lib/rules/ajv.js +106 -0
- package/lib/rules/ajv.js.map +1 -0
- package/lib/rules/arazzo/criteria-unique.d.ts +3 -0
- package/lib/rules/arazzo/criteria-unique.d.ts.map +1 -0
- package/lib/rules/arazzo/criteria-unique.js +68 -0
- package/lib/rules/arazzo/criteria-unique.js.map +1 -0
- package/lib/rules/arazzo/index.d.ts +4 -0
- package/lib/rules/arazzo/index.d.ts.map +1 -0
- package/lib/rules/arazzo/index.js +52 -0
- package/lib/rules/arazzo/index.js.map +1 -0
- package/lib/rules/arazzo/outputs-defined.d.ts +3 -0
- package/lib/rules/arazzo/outputs-defined.d.ts.map +1 -0
- package/lib/rules/arazzo/outputs-defined.js +139 -0
- package/lib/rules/arazzo/outputs-defined.js.map +1 -0
- package/lib/rules/arazzo/parameters-unique.d.ts +3 -0
- package/lib/rules/arazzo/parameters-unique.d.ts.map +1 -0
- package/lib/rules/arazzo/parameters-unique.js +27 -0
- package/lib/rules/arazzo/parameters-unique.js.map +1 -0
- package/lib/rules/arazzo/requestBody-replacements-unique.d.ts +3 -0
- package/lib/rules/arazzo/requestBody-replacements-unique.d.ts.map +1 -0
- package/lib/rules/arazzo/requestBody-replacements-unique.js +30 -0
- package/lib/rules/arazzo/requestBody-replacements-unique.js.map +1 -0
- package/lib/rules/arazzo/sourceDescription-type.d.ts +3 -0
- package/lib/rules/arazzo/sourceDescription-type.d.ts.map +1 -0
- package/lib/rules/arazzo/sourceDescription-type.js +19 -0
- package/lib/rules/arazzo/sourceDescription-type.js.map +1 -0
- package/lib/rules/arazzo/sourceDescriptions-name-unique.d.ts +3 -0
- package/lib/rules/arazzo/sourceDescriptions-name-unique.d.ts.map +1 -0
- package/lib/rules/arazzo/sourceDescriptions-name-unique.js +21 -0
- package/lib/rules/arazzo/sourceDescriptions-name-unique.js.map +1 -0
- package/lib/rules/arazzo/sourceDescriptions-not-empty.d.ts +3 -0
- package/lib/rules/arazzo/sourceDescriptions-not-empty.d.ts.map +1 -0
- package/lib/rules/arazzo/sourceDescriptions-not-empty.js +15 -0
- package/lib/rules/arazzo/sourceDescriptions-not-empty.js.map +1 -0
- package/lib/rules/arazzo/step-onFailure-unique.d.ts +3 -0
- package/lib/rules/arazzo/step-onFailure-unique.d.ts.map +1 -0
- package/lib/rules/arazzo/step-onFailure-unique.js +27 -0
- package/lib/rules/arazzo/step-onFailure-unique.js.map +1 -0
- package/lib/rules/arazzo/step-onSuccess-unique.d.ts +3 -0
- package/lib/rules/arazzo/step-onSuccess-unique.d.ts.map +1 -0
- package/lib/rules/arazzo/step-onSuccess-unique.js +27 -0
- package/lib/rules/arazzo/step-onSuccess-unique.js.map +1 -0
- package/lib/rules/arazzo/stepId-unique.d.ts +3 -0
- package/lib/rules/arazzo/stepId-unique.d.ts.map +1 -0
- package/lib/rules/arazzo/stepId-unique.js +23 -0
- package/lib/rules/arazzo/stepId-unique.js.map +1 -0
- package/lib/rules/arazzo/workflow-dependsOn.d.ts +3 -0
- package/lib/rules/arazzo/workflow-dependsOn.d.ts.map +1 -0
- package/lib/rules/arazzo/workflow-dependsOn.js +53 -0
- package/lib/rules/arazzo/workflow-dependsOn.js.map +1 -0
- package/lib/rules/arazzo/workflowId-unique.d.ts +3 -0
- package/lib/rules/arazzo/workflowId-unique.d.ts.map +1 -0
- package/lib/rules/arazzo/workflowId-unique.js +19 -0
- package/lib/rules/arazzo/workflowId-unique.js.map +1 -0
- package/lib/rules/async2/channels-kebab-case.d.ts +3 -0
- package/lib/rules/async2/channels-kebab-case.d.ts.map +1 -0
- package/lib/rules/async2/channels-kebab-case.js +16 -0
- package/lib/rules/async2/channels-kebab-case.js.map +1 -0
- package/lib/rules/async2/index.d.ts +4 -0
- package/lib/rules/async2/index.d.ts.map +1 -0
- package/lib/rules/async2/index.js +32 -0
- package/lib/rules/async2/index.js.map +1 -0
- package/lib/rules/async2/no-channel-trailing-slash.d.ts +3 -0
- package/lib/rules/async2/no-channel-trailing-slash.d.ts.map +1 -0
- package/lib/rules/async2/no-channel-trailing-slash.js +13 -0
- package/lib/rules/async2/no-channel-trailing-slash.js.map +1 -0
- package/lib/rules/async3/channels-kebab-case.d.ts +3 -0
- package/lib/rules/async3/channels-kebab-case.d.ts.map +1 -0
- package/lib/rules/async3/channels-kebab-case.js +16 -0
- package/lib/rules/async3/channels-kebab-case.js.map +1 -0
- package/lib/rules/async3/index.d.ts +4 -0
- package/lib/rules/async3/index.d.ts.map +1 -0
- package/lib/rules/async3/index.js +32 -0
- package/lib/rules/async3/index.js.map +1 -0
- package/lib/rules/async3/no-channel-trailing-slash.d.ts +3 -0
- package/lib/rules/async3/no-channel-trailing-slash.d.ts.map +1 -0
- package/lib/rules/async3/no-channel-trailing-slash.js +13 -0
- package/lib/rules/async3/no-channel-trailing-slash.js.map +1 -0
- package/lib/rules/catalog-entity/entity-key-valid.d.ts +3 -0
- package/lib/rules/catalog-entity/entity-key-valid.d.ts.map +1 -0
- package/lib/rules/catalog-entity/entity-key-valid.js +39 -0
- package/lib/rules/catalog-entity/entity-key-valid.js.map +1 -0
- package/lib/rules/common/assertions/asserts.d.ts +30 -0
- package/lib/rules/common/assertions/asserts.d.ts.map +1 -0
- package/lib/rules/common/assertions/asserts.js +272 -0
- package/lib/rules/common/assertions/asserts.js.map +1 -0
- package/lib/rules/common/assertions/index.d.ts +28 -0
- package/lib/rules/common/assertions/index.d.ts.map +1 -0
- package/lib/rules/common/assertions/index.js +22 -0
- package/lib/rules/common/assertions/index.js.map +1 -0
- package/lib/rules/common/assertions/utils.d.ts +21 -0
- package/lib/rules/common/assertions/utils.d.ts.map +1 -0
- package/lib/rules/common/assertions/utils.js +215 -0
- package/lib/rules/common/assertions/utils.js.map +1 -0
- package/lib/rules/common/info-contact.d.ts +3 -0
- package/lib/rules/common/info-contact.d.ts.map +1 -0
- package/lib/rules/common/info-contact.js +14 -0
- package/lib/rules/common/info-contact.js.map +1 -0
- package/lib/rules/common/info-license-strict.d.ts +3 -0
- package/lib/rules/common/info-license-strict.d.ts.map +1 -0
- package/lib/rules/common/info-license-strict.js +23 -0
- package/lib/rules/common/info-license-strict.js.map +1 -0
- package/lib/rules/common/info-license.d.ts +3 -0
- package/lib/rules/common/info-license.d.ts.map +1 -0
- package/lib/rules/common/info-license.js +14 -0
- package/lib/rules/common/info-license.js.map +1 -0
- package/lib/rules/common/no-ambiguous-paths.d.ts +3 -0
- package/lib/rules/common/no-ambiguous-paths.d.ts.map +1 -0
- package/lib/rules/common/no-ambiguous-paths.js +42 -0
- package/lib/rules/common/no-ambiguous-paths.js.map +1 -0
- package/lib/rules/common/no-duplicated-tag-names.d.ts +3 -0
- package/lib/rules/common/no-duplicated-tag-names.d.ts.map +1 -0
- package/lib/rules/common/no-duplicated-tag-names.js +21 -0
- package/lib/rules/common/no-duplicated-tag-names.js.map +1 -0
- package/lib/rules/common/no-enum-type-mismatch.d.ts +3 -0
- package/lib/rules/common/no-enum-type-mismatch.d.ts.map +1 -0
- package/lib/rules/common/no-enum-type-mismatch.js +38 -0
- package/lib/rules/common/no-enum-type-mismatch.js.map +1 -0
- package/lib/rules/common/no-http-verbs-in-paths.d.ts +3 -0
- package/lib/rules/common/no-http-verbs-in-paths.d.ts.map +1 -0
- package/lib/rules/common/no-http-verbs-in-paths.js +31 -0
- package/lib/rules/common/no-http-verbs-in-paths.js.map +1 -0
- package/lib/rules/common/no-identical-paths.d.ts +3 -0
- package/lib/rules/common/no-identical-paths.d.ts.map +1 -0
- package/lib/rules/common/no-identical-paths.js +21 -0
- package/lib/rules/common/no-identical-paths.js.map +1 -0
- package/lib/rules/common/no-invalid-parameter-examples.d.ts +2 -0
- package/lib/rules/common/no-invalid-parameter-examples.d.ts.map +1 -0
- package/lib/rules/common/no-invalid-parameter-examples.js +32 -0
- package/lib/rules/common/no-invalid-parameter-examples.js.map +1 -0
- package/lib/rules/common/no-invalid-schema-examples.d.ts +3 -0
- package/lib/rules/common/no-invalid-schema-examples.d.ts.map +1 -0
- package/lib/rules/common/no-invalid-schema-examples.js +34 -0
- package/lib/rules/common/no-invalid-schema-examples.js.map +1 -0
- package/lib/rules/common/no-path-trailing-slash.d.ts +3 -0
- package/lib/rules/common/no-path-trailing-slash.d.ts.map +1 -0
- package/lib/rules/common/no-path-trailing-slash.js +13 -0
- package/lib/rules/common/no-path-trailing-slash.js.map +1 -0
- package/lib/rules/common/no-required-schema-properties-undefined.d.ts +3 -0
- package/lib/rules/common/no-required-schema-properties-undefined.d.ts.map +1 -0
- package/lib/rules/common/no-required-schema-properties-undefined.js +78 -0
- package/lib/rules/common/no-required-schema-properties-undefined.js.map +1 -0
- package/lib/rules/common/no-schema-type-mismatch.d.ts +3 -0
- package/lib/rules/common/no-schema-type-mismatch.d.ts.map +1 -0
- package/lib/rules/common/no-schema-type-mismatch.js +19 -0
- package/lib/rules/common/no-schema-type-mismatch.js.map +1 -0
- package/lib/rules/common/no-unresolved-refs.d.ts +6 -0
- package/lib/rules/common/no-unresolved-refs.d.ts.map +1 -0
- package/lib/rules/common/no-unresolved-refs.js +42 -0
- package/lib/rules/common/no-unresolved-refs.js.map +1 -0
- package/lib/rules/common/operation-2xx-response.d.ts +3 -0
- package/lib/rules/common/operation-2xx-response.d.ts.map +1 -0
- package/lib/rules/common/operation-2xx-response.js +20 -0
- package/lib/rules/common/operation-2xx-response.js.map +1 -0
- package/lib/rules/common/operation-4xx-response.d.ts +3 -0
- package/lib/rules/common/operation-4xx-response.d.ts.map +1 -0
- package/lib/rules/common/operation-4xx-response.js +20 -0
- package/lib/rules/common/operation-4xx-response.js.map +1 -0
- package/lib/rules/common/operation-description.d.ts +3 -0
- package/lib/rules/common/operation-description.d.ts.map +1 -0
- package/lib/rules/common/operation-description.js +9 -0
- package/lib/rules/common/operation-description.js.map +1 -0
- package/lib/rules/common/operation-operationId-unique.d.ts +3 -0
- package/lib/rules/common/operation-operationId-unique.d.ts.map +1 -0
- package/lib/rules/common/operation-operationId-unique.js +17 -0
- package/lib/rules/common/operation-operationId-unique.js.map +1 -0
- package/lib/rules/common/operation-operationId-url-safe.d.ts +3 -0
- package/lib/rules/common/operation-operationId-url-safe.d.ts.map +1 -0
- package/lib/rules/common/operation-operationId-url-safe.js +15 -0
- package/lib/rules/common/operation-operationId-url-safe.js.map +1 -0
- package/lib/rules/common/operation-operationId.d.ts +3 -0
- package/lib/rules/common/operation-operationId.d.ts.map +1 -0
- package/lib/rules/common/operation-operationId.js +13 -0
- package/lib/rules/common/operation-operationId.js.map +1 -0
- package/lib/rules/common/operation-parameters-unique.d.ts +3 -0
- package/lib/rules/common/operation-parameters-unique.d.ts.map +1 -0
- package/lib/rules/common/operation-parameters-unique.js +37 -0
- package/lib/rules/common/operation-parameters-unique.js.map +1 -0
- package/lib/rules/common/operation-singular-tag.d.ts +3 -0
- package/lib/rules/common/operation-singular-tag.d.ts.map +1 -0
- package/lib/rules/common/operation-singular-tag.js +13 -0
- package/lib/rules/common/operation-singular-tag.js.map +1 -0
- package/lib/rules/common/operation-summary.d.ts +3 -0
- package/lib/rules/common/operation-summary.d.ts.map +1 -0
- package/lib/rules/common/operation-summary.js +9 -0
- package/lib/rules/common/operation-summary.js.map +1 -0
- package/lib/rules/common/operation-tag-defined.d.ts +3 -0
- package/lib/rules/common/operation-tag-defined.d.ts.map +1 -0
- package/lib/rules/common/operation-tag-defined.js +27 -0
- package/lib/rules/common/operation-tag-defined.js.map +1 -0
- package/lib/rules/common/parameter-description.d.ts +3 -0
- package/lib/rules/common/parameter-description.d.ts.map +1 -0
- package/lib/rules/common/parameter-description.js +19 -0
- package/lib/rules/common/parameter-description.js.map +1 -0
- package/lib/rules/common/path-declaration-must-exist.d.ts +3 -0
- package/lib/rules/common/path-declaration-must-exist.d.ts.map +1 -0
- package/lib/rules/common/path-declaration-must-exist.js +13 -0
- package/lib/rules/common/path-declaration-must-exist.js.map +1 -0
- package/lib/rules/common/path-http-verbs-order.d.ts +3 -0
- package/lib/rules/common/path-http-verbs-order.d.ts.map +1 -0
- package/lib/rules/common/path-http-verbs-order.js +23 -0
- package/lib/rules/common/path-http-verbs-order.js.map +1 -0
- package/lib/rules/common/path-not-include-query.d.ts +3 -0
- package/lib/rules/common/path-not-include-query.d.ts.map +1 -0
- package/lib/rules/common/path-not-include-query.js +15 -0
- package/lib/rules/common/path-not-include-query.js.map +1 -0
- package/lib/rules/common/path-params-defined.d.ts +3 -0
- package/lib/rules/common/path-params-defined.d.ts.map +1 -0
- package/lib/rules/common/path-params-defined.js +145 -0
- package/lib/rules/common/path-params-defined.js.map +1 -0
- package/lib/rules/common/path-segment-plural.d.ts +3 -0
- package/lib/rules/common/path-segment-plural.d.ts.map +1 -0
- package/lib/rules/common/path-segment-plural.js +30 -0
- package/lib/rules/common/path-segment-plural.js.map +1 -0
- package/lib/rules/common/paths-kebab-case.d.ts +3 -0
- package/lib/rules/common/paths-kebab-case.d.ts.map +1 -0
- package/lib/rules/common/paths-kebab-case.js +17 -0
- package/lib/rules/common/paths-kebab-case.js.map +1 -0
- package/lib/rules/common/required-string-property-missing-min-length.d.ts +3 -0
- package/lib/rules/common/required-string-property-missing-min-length.d.ts.map +1 -0
- package/lib/rules/common/required-string-property-missing-min-length.js +34 -0
- package/lib/rules/common/required-string-property-missing-min-length.js.map +1 -0
- package/lib/rules/common/response-contains-header.d.ts +3 -0
- package/lib/rules/common/response-contains-header.d.ts.map +1 -0
- package/lib/rules/common/response-contains-header.js +26 -0
- package/lib/rules/common/response-contains-header.js.map +1 -0
- package/lib/rules/common/scalar-property-missing-example.d.ts +3 -0
- package/lib/rules/common/scalar-property-missing-example.d.ts.map +1 -0
- package/lib/rules/common/scalar-property-missing-example.js +39 -0
- package/lib/rules/common/scalar-property-missing-example.js.map +1 -0
- package/lib/rules/common/security-defined.d.ts +3 -0
- package/lib/rules/common/security-defined.d.ts.map +1 -0
- package/lib/rules/common/security-defined.js +62 -0
- package/lib/rules/common/security-defined.js.map +1 -0
- package/lib/rules/common/spec-strict-refs.d.ts +3 -0
- package/lib/rules/common/spec-strict-refs.d.ts.map +1 -0
- package/lib/rules/common/spec-strict-refs.js +27 -0
- package/lib/rules/common/spec-strict-refs.js.map +1 -0
- package/lib/rules/common/struct.d.ts +3 -0
- package/lib/rules/common/struct.d.ts.map +1 -0
- package/lib/rules/common/struct.js +150 -0
- package/lib/rules/common/struct.js.map +1 -0
- package/lib/rules/common/tag-description.d.ts +3 -0
- package/lib/rules/common/tag-description.d.ts.map +1 -0
- package/lib/rules/common/tag-description.js +9 -0
- package/lib/rules/common/tag-description.js.map +1 -0
- package/lib/rules/common/tags-alphabetical.d.ts +3 -0
- package/lib/rules/common/tags-alphabetical.d.ts.map +1 -0
- package/lib/rules/common/tags-alphabetical.js +18 -0
- package/lib/rules/common/tags-alphabetical.js.map +1 -0
- package/lib/rules/oas2/boolean-parameter-prefixes.d.ts +6 -0
- package/lib/rules/oas2/boolean-parameter-prefixes.d.ts.map +1 -0
- package/lib/rules/oas2/boolean-parameter-prefixes.js +19 -0
- package/lib/rules/oas2/boolean-parameter-prefixes.js.map +1 -0
- package/lib/rules/oas2/index.d.ts +4 -0
- package/lib/rules/oas2/index.d.ts.map +1 -0
- package/lib/rules/oas2/index.js +93 -0
- package/lib/rules/oas2/index.js.map +1 -0
- package/lib/rules/oas2/request-mime-type.d.ts +3 -0
- package/lib/rules/oas2/request-mime-type.d.ts.map +1 -0
- package/lib/rules/oas2/request-mime-type.js +14 -0
- package/lib/rules/oas2/request-mime-type.js.map +1 -0
- package/lib/rules/oas2/response-contains-property.d.ts +3 -0
- package/lib/rules/oas2/response-contains-property.d.ts.map +1 -0
- package/lib/rules/oas2/response-contains-property.js +34 -0
- package/lib/rules/oas2/response-contains-property.js.map +1 -0
- package/lib/rules/oas2/response-mime-type.d.ts +3 -0
- package/lib/rules/oas2/response-mime-type.d.ts.map +1 -0
- package/lib/rules/oas2/response-mime-type.js +14 -0
- package/lib/rules/oas2/response-mime-type.js.map +1 -0
- package/lib/rules/oas3/array-parameter-serialization.d.ts +6 -0
- package/lib/rules/oas3/array-parameter-serialization.d.ts.map +1 -0
- package/lib/rules/oas3/array-parameter-serialization.js +26 -0
- package/lib/rules/oas3/array-parameter-serialization.js.map +1 -0
- package/lib/rules/oas3/boolean-parameter-prefixes.d.ts +6 -0
- package/lib/rules/oas3/boolean-parameter-prefixes.d.ts.map +1 -0
- package/lib/rules/oas3/boolean-parameter-prefixes.js +21 -0
- package/lib/rules/oas3/boolean-parameter-prefixes.js.map +1 -0
- package/lib/rules/oas3/component-name-unique.d.ts +3 -0
- package/lib/rules/oas3/component-name-unique.d.ts.map +1 -0
- package/lib/rules/oas3/component-name-unique.js +130 -0
- package/lib/rules/oas3/component-name-unique.js.map +1 -0
- package/lib/rules/oas3/index.d.ts +4 -0
- package/lib/rules/oas3/index.d.ts.map +1 -0
- package/lib/rules/oas3/index.js +129 -0
- package/lib/rules/oas3/index.js.map +1 -0
- package/lib/rules/oas3/no-empty-servers.d.ts +3 -0
- package/lib/rules/oas3/no-empty-servers.d.ts.map +1 -0
- package/lib/rules/oas3/no-empty-servers.js +20 -0
- package/lib/rules/oas3/no-empty-servers.js.map +1 -0
- package/lib/rules/oas3/no-example-value-and-externalValue.d.ts +3 -0
- package/lib/rules/oas3/no-example-value-and-externalValue.d.ts.map +1 -0
- package/lib/rules/oas3/no-example-value-and-externalValue.js +13 -0
- package/lib/rules/oas3/no-example-value-and-externalValue.js.map +1 -0
- package/lib/rules/oas3/no-invalid-media-type-examples.d.ts +3 -0
- package/lib/rules/oas3/no-invalid-media-type-examples.d.ts.map +1 -0
- package/lib/rules/oas3/no-invalid-media-type-examples.js +59 -0
- package/lib/rules/oas3/no-invalid-media-type-examples.js.map +1 -0
- package/lib/rules/oas3/no-server-example.com.d.ts +3 -0
- package/lib/rules/oas3/no-server-example.com.d.ts.map +1 -0
- package/lib/rules/oas3/no-server-example.com.js +15 -0
- package/lib/rules/oas3/no-server-example.com.js.map +1 -0
- package/lib/rules/oas3/no-server-trailing-slash.d.ts +3 -0
- package/lib/rules/oas3/no-server-trailing-slash.d.ts.map +1 -0
- package/lib/rules/oas3/no-server-trailing-slash.js +15 -0
- package/lib/rules/oas3/no-server-trailing-slash.js.map +1 -0
- package/lib/rules/oas3/no-server-variables-empty-enum.d.ts +3 -0
- package/lib/rules/oas3/no-server-variables-empty-enum.d.ts.map +1 -0
- package/lib/rules/oas3/no-server-variables-empty-enum.js +58 -0
- package/lib/rules/oas3/no-server-variables-empty-enum.js.map +1 -0
- package/lib/rules/oas3/no-undefined-server-variable.d.ts +3 -0
- package/lib/rules/oas3/no-undefined-server-variable.d.ts.map +1 -0
- package/lib/rules/oas3/no-undefined-server-variable.js +28 -0
- package/lib/rules/oas3/no-undefined-server-variable.js.map +1 -0
- package/lib/rules/oas3/no-unused-components.d.ts +3 -0
- package/lib/rules/oas3/no-unused-components.d.ts.map +1 -0
- package/lib/rules/oas3/no-unused-components.js +83 -0
- package/lib/rules/oas3/no-unused-components.js.map +1 -0
- package/lib/rules/oas3/nullable-type-sibling.d.ts +3 -0
- package/lib/rules/oas3/nullable-type-sibling.d.ts.map +1 -0
- package/lib/rules/oas3/nullable-type-sibling.js +15 -0
- package/lib/rules/oas3/nullable-type-sibling.js.map +1 -0
- package/lib/rules/oas3/operation-4xx-problem-details-rfc7807.d.ts +6 -0
- package/lib/rules/oas3/operation-4xx-problem-details-rfc7807.d.ts.map +1 -0
- package/lib/rules/oas3/operation-4xx-problem-details-rfc7807.js +33 -0
- package/lib/rules/oas3/operation-4xx-problem-details-rfc7807.js.map +1 -0
- package/lib/rules/oas3/request-mime-type.d.ts +3 -0
- package/lib/rules/oas3/request-mime-type.d.ts.map +1 -0
- package/lib/rules/oas3/request-mime-type.js +28 -0
- package/lib/rules/oas3/request-mime-type.js.map +1 -0
- package/lib/rules/oas3/response-contains-property.d.ts +3 -0
- package/lib/rules/oas3/response-contains-property.d.ts.map +1 -0
- package/lib/rules/oas3/response-contains-property.js +36 -0
- package/lib/rules/oas3/response-contains-property.js.map +1 -0
- package/lib/rules/oas3/response-mime-type.d.ts +3 -0
- package/lib/rules/oas3/response-mime-type.d.ts.map +1 -0
- package/lib/rules/oas3/response-mime-type.js +28 -0
- package/lib/rules/oas3/response-mime-type.js.map +1 -0
- package/lib/rules/oas3/spec-components-invalid-map-name.d.ts +3 -0
- package/lib/rules/oas3/spec-components-invalid-map-name.d.ts.map +1 -0
- package/lib/rules/oas3/spec-components-invalid-map-name.js +59 -0
- package/lib/rules/oas3/spec-components-invalid-map-name.js.map +1 -0
- package/lib/rules/oas3/spec-discriminator-defaultMapping.d.ts +3 -0
- package/lib/rules/oas3/spec-discriminator-defaultMapping.d.ts.map +1 -0
- package/lib/rules/oas3/spec-discriminator-defaultMapping.js +32 -0
- package/lib/rules/oas3/spec-discriminator-defaultMapping.js.map +1 -0
- package/lib/rules/oas3/spec-example-values.d.ts +3 -0
- package/lib/rules/oas3/spec-example-values.d.ts.map +1 -0
- package/lib/rules/oas3/spec-example-values.js +31 -0
- package/lib/rules/oas3/spec-example-values.js.map +1 -0
- package/lib/rules/oas3/spec-no-invalid-encoding-combinations.d.ts +3 -0
- package/lib/rules/oas3/spec-no-invalid-encoding-combinations.d.ts.map +1 -0
- package/lib/rules/oas3/spec-no-invalid-encoding-combinations.js +16 -0
- package/lib/rules/oas3/spec-no-invalid-encoding-combinations.js.map +1 -0
- package/lib/rules/oas3/spec-no-invalid-tag-parents.d.ts +3 -0
- package/lib/rules/oas3/spec-no-invalid-tag-parents.d.ts.map +1 -0
- package/lib/rules/oas3/spec-no-invalid-tag-parents.js +38 -0
- package/lib/rules/oas3/spec-no-invalid-tag-parents.js.map +1 -0
- package/lib/rules/oas3/spec-querystring-parameters.d.ts +3 -0
- package/lib/rules/oas3/spec-querystring-parameters.d.ts.map +1 -0
- package/lib/rules/oas3/spec-querystring-parameters.js +65 -0
- package/lib/rules/oas3/spec-querystring-parameters.js.map +1 -0
- package/lib/rules/openrpc/index.d.ts +4 -0
- package/lib/rules/openrpc/index.d.ts.map +1 -0
- package/lib/rules/openrpc/index.js +20 -0
- package/lib/rules/openrpc/index.js.map +1 -0
- package/lib/rules/openrpc/no-unused-components.d.ts +3 -0
- package/lib/rules/openrpc/no-unused-components.d.ts.map +1 -0
- package/lib/rules/openrpc/no-unused-components.js +82 -0
- package/lib/rules/openrpc/no-unused-components.js.map +1 -0
- package/lib/rules/openrpc/spec-no-duplicated-method-params.d.ts +3 -0
- package/lib/rules/openrpc/spec-no-duplicated-method-params.d.ts.map +1 -0
- package/lib/rules/openrpc/spec-no-duplicated-method-params.js +28 -0
- package/lib/rules/openrpc/spec-no-duplicated-method-params.js.map +1 -0
- package/lib/rules/openrpc/spec-no-required-params-after-optional.d.ts +3 -0
- package/lib/rules/openrpc/spec-no-required-params-after-optional.d.ts.map +1 -0
- package/lib/rules/openrpc/spec-no-required-params-after-optional.js +31 -0
- package/lib/rules/openrpc/spec-no-required-params-after-optional.js.map +1 -0
- package/lib/rules/other/stats.d.ts +104 -0
- package/lib/rules/other/stats.d.ts.map +1 -0
- package/lib/rules/other/stats.js +190 -0
- package/lib/rules/other/stats.js.map +1 -0
- package/lib/rules/overlay1/index.d.ts +4 -0
- package/lib/rules/overlay1/index.d.ts.map +1 -0
- package/lib/rules/overlay1/index.js +12 -0
- package/lib/rules/overlay1/index.js.map +1 -0
- package/lib/rules/respect/no-criteria-xpath.d.ts +3 -0
- package/lib/rules/respect/no-criteria-xpath.d.ts.map +1 -0
- package/lib/rules/respect/no-criteria-xpath.js +20 -0
- package/lib/rules/respect/no-criteria-xpath.js.map +1 -0
- package/lib/rules/respect/no-x-security-both-scheme-and-scheme-name.d.ts +3 -0
- package/lib/rules/respect/no-x-security-both-scheme-and-scheme-name.d.ts.map +1 -0
- package/lib/rules/respect/no-x-security-both-scheme-and-scheme-name.js +30 -0
- package/lib/rules/respect/no-x-security-both-scheme-and-scheme-name.js.map +1 -0
- package/lib/rules/respect/no-x-security-scheme-name-without-openapi.d.ts +3 -0
- package/lib/rules/respect/no-x-security-scheme-name-without-openapi.d.ts.map +1 -0
- package/lib/rules/respect/no-x-security-scheme-name-without-openapi.js +25 -0
- package/lib/rules/respect/no-x-security-scheme-name-without-openapi.js.map +1 -0
- package/lib/rules/respect/respect-supported-versions.d.ts +3 -0
- package/lib/rules/respect/respect-supported-versions.d.ts.map +1 -0
- package/lib/rules/respect/respect-supported-versions.js +18 -0
- package/lib/rules/respect/respect-supported-versions.js.map +1 -0
- package/lib/rules/respect/x-security-scheme-name-reference.d.ts +3 -0
- package/lib/rules/respect/x-security-scheme-name-reference.d.ts.map +1 -0
- package/lib/rules/respect/x-security-scheme-name-reference.js +35 -0
- package/lib/rules/respect/x-security-scheme-name-reference.js.map +1 -0
- package/lib/rules/respect/x-security-scheme-required-values.d.ts +3 -0
- package/lib/rules/respect/x-security-scheme-required-values.d.ts.map +1 -0
- package/lib/rules/respect/x-security-scheme-required-values.js +60 -0
- package/lib/rules/respect/x-security-scheme-required-values.js.map +1 -0
- package/lib/rules/utils.d.ts +30 -0
- package/lib/rules/utils.d.ts.map +1 -0
- package/lib/rules/utils.js +172 -0
- package/lib/rules/utils.js.map +1 -0
- package/lib/types/arazzo.d.ts +3 -0
- package/lib/types/arazzo.d.ts.map +1 -0
- package/lib/types/arazzo.js +482 -0
- package/lib/types/arazzo.js.map +1 -0
- package/lib/types/asyncapi2.d.ts +13 -0
- package/lib/types/asyncapi2.d.ts.map +1 -0
- package/lib/types/asyncapi2.js +1157 -0
- package/lib/types/asyncapi2.js.map +1 -0
- package/lib/types/asyncapi3.d.ts +3 -0
- package/lib/types/asyncapi3.d.ts.map +1 -0
- package/lib/types/asyncapi3.js +511 -0
- package/lib/types/asyncapi3.js.map +1 -0
- package/lib/types/entity.d.ts +9 -0
- package/lib/types/entity.d.ts.map +1 -0
- package/lib/types/entity.js +32 -0
- package/lib/types/entity.js.map +1 -0
- package/lib/types/index.d.ts +78 -0
- package/lib/types/index.d.ts.map +1 -0
- package/lib/types/index.js +90 -0
- package/lib/types/index.js.map +1 -0
- package/lib/types/json-schema-adapter.d.ts +12 -0
- package/lib/types/json-schema-adapter.d.ts.map +1 -0
- package/lib/types/json-schema-adapter.js +181 -0
- package/lib/types/json-schema-adapter.js.map +1 -0
- package/lib/types/json-schema-draft7.shared.d.ts +7 -0
- package/lib/types/json-schema-draft7.shared.d.ts.map +1 -0
- package/lib/types/json-schema-draft7.shared.js +101 -0
- package/lib/types/json-schema-draft7.shared.js.map +1 -0
- package/lib/types/oas2.d.ts +107 -0
- package/lib/types/oas2.d.ts.map +1 -0
- package/lib/types/oas2.js +454 -0
- package/lib/types/oas2.js.map +1 -0
- package/lib/types/oas3.d.ts +198 -0
- package/lib/types/oas3.d.ts.map +1 -0
- package/lib/types/oas3.js +828 -0
- package/lib/types/oas3.js.map +1 -0
- package/lib/types/oas3_1.d.ts +207 -0
- package/lib/types/oas3_1.d.ts.map +1 -0
- package/lib/types/oas3_1.js +292 -0
- package/lib/types/oas3_1.js.map +1 -0
- package/lib/types/oas3_2.d.ts +215 -0
- package/lib/types/oas3_2.d.ts.map +1 -0
- package/lib/types/oas3_2.js +306 -0
- package/lib/types/oas3_2.js.map +1 -0
- package/lib/types/openrpc.d.ts +136 -0
- package/lib/types/openrpc.d.ts.map +1 -0
- package/lib/types/openrpc.js +360 -0
- package/lib/types/openrpc.js.map +1 -0
- package/lib/types/overlay.d.ts +3 -0
- package/lib/types/overlay.d.ts.map +1 -0
- package/lib/types/overlay.js +61 -0
- package/lib/types/overlay.js.map +1 -0
- package/lib/types/redocly-yaml.d.ts +29 -0
- package/lib/types/redocly-yaml.d.ts.map +1 -0
- package/lib/types/redocly-yaml.js +573 -0
- package/lib/types/redocly-yaml.js.map +1 -0
- package/lib/typings/arazzo.d.ts +172 -0
- package/lib/typings/arazzo.d.ts.map +1 -0
- package/lib/typings/arazzo.js +3 -0
- package/lib/typings/arazzo.js.map +1 -0
- package/lib/typings/asyncapi.d.ts +22 -0
- package/lib/typings/asyncapi.d.ts.map +1 -0
- package/lib/typings/asyncapi.js +2 -0
- package/lib/typings/asyncapi.js.map +1 -0
- package/lib/typings/asyncapi3.d.ts +54 -0
- package/lib/typings/asyncapi3.d.ts.map +1 -0
- package/lib/typings/asyncapi3.js +2 -0
- package/lib/typings/asyncapi3.js.map +1 -0
- package/lib/typings/common.d.ts +13 -0
- package/lib/typings/common.d.ts.map +1 -0
- package/lib/typings/common.js +2 -0
- package/lib/typings/common.js.map +1 -0
- package/lib/typings/openapi.d.ts +420 -0
- package/lib/typings/openapi.d.ts.map +1 -0
- package/lib/typings/openapi.js +2 -0
- package/lib/typings/openapi.js.map +1 -0
- package/lib/typings/openrpc.d.ts +110 -0
- package/lib/typings/openrpc.d.ts.map +1 -0
- package/lib/typings/openrpc.js +2 -0
- package/lib/typings/openrpc.js.map +1 -0
- package/lib/typings/overlay.d.ts +18 -0
- package/lib/typings/overlay.d.ts.map +1 -0
- package/lib/typings/overlay.js +2 -0
- package/lib/typings/overlay.js.map +1 -0
- package/lib/typings/swagger.d.ts +218 -0
- package/lib/typings/swagger.d.ts.map +1 -0
- package/lib/typings/swagger.js +2 -0
- package/lib/typings/swagger.js.map +1 -0
- package/lib/utils/assign-config.d.ts +7 -0
- package/lib/utils/assign-config.d.ts.map +1 -0
- package/lib/utils/assign-config.js +28 -0
- package/lib/utils/assign-config.js.map +1 -0
- package/lib/utils/dequal.d.ts +6 -0
- package/lib/utils/dequal.d.ts.map +1 -0
- package/lib/utils/dequal.js +36 -0
- package/lib/utils/dequal.js.map +1 -0
- package/lib/utils/does-yaml-file-exist.d.ts +2 -0
- package/lib/utils/does-yaml-file-exist.d.ts.map +1 -0
- package/lib/utils/does-yaml-file-exist.js +7 -0
- package/lib/utils/does-yaml-file-exist.js.map +1 -0
- package/lib/utils/error.d.ts +3 -0
- package/lib/utils/error.d.ts.map +1 -0
- package/lib/utils/error.js +3 -0
- package/lib/utils/error.js.map +1 -0
- package/lib/utils/get-intersection-length.d.ts +2 -0
- package/lib/utils/get-intersection-length.d.ts.map +1 -0
- package/lib/utils/get-intersection-length.js +11 -0
- package/lib/utils/get-intersection-length.js.map +1 -0
- package/lib/utils/get-matching-status-code-range.d.ts +2 -0
- package/lib/utils/get-matching-status-code-range.d.ts.map +1 -0
- package/lib/utils/get-matching-status-code-range.js +4 -0
- package/lib/utils/get-matching-status-code-range.js.map +1 -0
- package/lib/utils/get-own.d.ts +2 -0
- package/lib/utils/get-own.d.ts.map +1 -0
- package/lib/utils/get-own.js +4 -0
- package/lib/utils/get-own.js.map +1 -0
- package/lib/utils/identity.d.ts +2 -0
- package/lib/utils/identity.d.ts.map +1 -0
- package/lib/utils/identity.js +4 -0
- package/lib/utils/identity.js.map +1 -0
- package/lib/utils/is-custom-rule-id.d.ts +2 -0
- package/lib/utils/is-custom-rule-id.d.ts.map +1 -0
- package/lib/utils/is-custom-rule-id.js +4 -0
- package/lib/utils/is-custom-rule-id.js.map +1 -0
- package/lib/utils/is-defined.d.ts +2 -0
- package/lib/utils/is-defined.d.ts.map +1 -0
- package/lib/utils/is-defined.js +4 -0
- package/lib/utils/is-defined.js.map +1 -0
- package/lib/utils/is-empty-array.d.ts +2 -0
- package/lib/utils/is-empty-array.d.ts.map +1 -0
- package/lib/utils/is-empty-array.js +4 -0
- package/lib/utils/is-empty-array.js.map +1 -0
- package/lib/utils/is-empty-object.d.ts +2 -0
- package/lib/utils/is-empty-object.d.ts.map +1 -0
- package/lib/utils/is-empty-object.js +5 -0
- package/lib/utils/is-empty-object.js.map +1 -0
- package/lib/utils/is-not-empty-array.d.ts +2 -0
- package/lib/utils/is-not-empty-array.d.ts.map +1 -0
- package/lib/utils/is-not-empty-array.js +4 -0
- package/lib/utils/is-not-empty-array.js.map +1 -0
- package/lib/utils/is-not-empty-object.d.ts +2 -0
- package/lib/utils/is-not-empty-object.d.ts.map +1 -0
- package/lib/utils/is-not-empty-object.js +6 -0
- package/lib/utils/is-not-empty-object.js.map +1 -0
- package/lib/utils/is-not-string.d.ts +2 -0
- package/lib/utils/is-not-string.d.ts.map +1 -0
- package/lib/utils/is-not-string.js +5 -0
- package/lib/utils/is-not-string.js.map +1 -0
- package/lib/utils/is-ordered.d.ts +7 -0
- package/lib/utils/is-ordered.d.ts.map +1 -0
- package/lib/utils/is-ordered.js +27 -0
- package/lib/utils/is-ordered.js.map +1 -0
- package/lib/utils/is-path-parameter.d.ts +2 -0
- package/lib/utils/is-path-parameter.d.ts.map +1 -0
- package/lib/utils/is-path-parameter.js +4 -0
- package/lib/utils/is-path-parameter.js.map +1 -0
- package/lib/utils/is-plain-object.d.ts +2 -0
- package/lib/utils/is-plain-object.d.ts.map +1 -0
- package/lib/utils/is-plain-object.js +4 -0
- package/lib/utils/is-plain-object.js.map +1 -0
- package/lib/utils/is-string.d.ts +2 -0
- package/lib/utils/is-string.d.ts.map +1 -0
- package/lib/utils/is-string.js +4 -0
- package/lib/utils/is-string.js.map +1 -0
- package/lib/utils/is-truthy.d.ts +3 -0
- package/lib/utils/is-truthy.d.ts.map +1 -0
- package/lib/utils/is-truthy.js +4 -0
- package/lib/utils/is-truthy.js.map +1 -0
- package/lib/utils/keys-of.d.ts +2 -0
- package/lib/utils/keys-of.d.ts.map +1 -0
- package/lib/utils/keys-of.js +6 -0
- package/lib/utils/keys-of.js.map +1 -0
- package/lib/utils/make-ref-id.d.ts +2 -0
- package/lib/utils/make-ref-id.d.ts.map +1 -0
- package/lib/utils/make-ref-id.js +4 -0
- package/lib/utils/make-ref-id.js.map +1 -0
- package/lib/utils/next-tick.d.ts +2 -0
- package/lib/utils/next-tick.d.ts.map +1 -0
- package/lib/utils/next-tick.js +6 -0
- package/lib/utils/next-tick.js.map +1 -0
- package/lib/utils/oas-has-component.d.ts +3 -0
- package/lib/utils/oas-has-component.d.ts.map +1 -0
- package/lib/utils/oas-has-component.js +4 -0
- package/lib/utils/oas-has-component.js.map +1 -0
- package/lib/utils/omit.d.ts +2 -0
- package/lib/utils/omit.d.ts.map +1 -0
- package/lib/utils/omit.js +8 -0
- package/lib/utils/omit.js.map +1 -0
- package/lib/utils/pause.d.ts +2 -0
- package/lib/utils/pause.d.ts.map +1 -0
- package/lib/utils/pause.js +4 -0
- package/lib/utils/pause.js.map +1 -0
- package/lib/utils/pluralize.d.ts +2 -0
- package/lib/utils/pluralize.d.ts.map +1 -0
- package/lib/utils/pluralize.js +8 -0
- package/lib/utils/pluralize.js.map +1 -0
- package/lib/utils/read-file-from-url.d.ts +6 -0
- package/lib/utils/read-file-from-url.d.ts.map +1 -0
- package/lib/utils/read-file-from-url.js +26 -0
- package/lib/utils/read-file-from-url.js.map +1 -0
- package/lib/utils/regex-from-string.d.ts +2 -0
- package/lib/utils/regex-from-string.d.ts.map +1 -0
- package/lib/utils/regex-from-string.js +5 -0
- package/lib/utils/regex-from-string.js.map +1 -0
- package/lib/utils/scorecards.d.ts +13 -0
- package/lib/utils/scorecards.d.ts.map +1 -0
- package/lib/utils/scorecards.js +99 -0
- package/lib/utils/scorecards.js.map +1 -0
- package/lib/utils/slash.d.ts +5 -0
- package/lib/utils/slash.d.ts.map +1 -0
- package/lib/utils/slash.js +11 -0
- package/lib/utils/slash.js.map +1 -0
- package/lib/utils/split-camel-case-into-words.d.ts +2 -0
- package/lib/utils/split-camel-case-into-words.d.ts.map +1 -0
- package/lib/utils/split-camel-case-into-words.js +13 -0
- package/lib/utils/split-camel-case-into-words.js.map +1 -0
- package/lib/utils/stack.d.ts +12 -0
- package/lib/utils/stack.d.ts.map +1 -0
- package/lib/utils/stack.js +7 -0
- package/lib/utils/stack.js.map +1 -0
- package/lib/utils/types.d.ts +5 -0
- package/lib/utils/types.d.ts.map +1 -0
- package/lib/utils/types.js +2 -0
- package/lib/utils/types.js.map +1 -0
- package/lib/utils/validate-mime-type.d.ts +4 -0
- package/lib/utils/validate-mime-type.d.ts.map +1 -0
- package/lib/utils/validate-mime-type.js +31 -0
- package/lib/utils/validate-mime-type.js.map +1 -0
- package/lib/utils/yaml-fs-helper.d.ts +6 -0
- package/lib/utils/yaml-fs-helper.d.ts.map +1 -0
- package/lib/utils/yaml-fs-helper.js +23 -0
- package/lib/utils/yaml-fs-helper.js.map +1 -0
- package/lib/visitors.d.ts +279 -0
- package/lib/visitors.d.ts.map +1 -0
- package/lib/visitors.js +177 -0
- package/lib/visitors.js.map +1 -0
- package/lib/walk.d.ts +81 -0
- package/lib/walk.d.ts.map +1 -0
- package/lib/walk.js +303 -0
- package/lib/walk.js.map +1 -0
- package/package.json +95 -0
|
@@ -0,0 +1,338 @@
|
|
|
1
|
+
import * as fs from 'node:fs';
|
|
2
|
+
import * as path from 'node:path';
|
|
3
|
+
import { specVersions } from '../detect-spec.js';
|
|
4
|
+
import { stringifyYaml } from '../js-yaml/index.js';
|
|
5
|
+
import { isAbsoluteUrl } from '../ref-utils.js';
|
|
6
|
+
import { isPlainObject } from '../utils/is-plain-object.js';
|
|
7
|
+
import { slash } from '../utils/slash.js';
|
|
8
|
+
import { IGNORE_BANNER, IGNORE_FILE } from './constants.js';
|
|
9
|
+
import { getResolveConfig } from './get-resolve-config.js';
|
|
10
|
+
import { groupAssertionRules } from './group-assertion-rules.js';
|
|
11
|
+
export class Config {
|
|
12
|
+
constructor(resolvedConfig, opts = {}) {
|
|
13
|
+
this.ignore = {};
|
|
14
|
+
this._usedRules = new Set();
|
|
15
|
+
this._usedVersions = new Set();
|
|
16
|
+
this.resolvedConfig = resolvedConfig;
|
|
17
|
+
this.configPath = opts.configPath;
|
|
18
|
+
this.document = opts.document;
|
|
19
|
+
this.resolvedRefMap = opts.resolvedRefMap;
|
|
20
|
+
this.resolve = getResolveConfig(this.resolvedConfig.resolve);
|
|
21
|
+
this._alias = opts.alias;
|
|
22
|
+
this.plugins = opts.plugins || [];
|
|
23
|
+
this.doNotResolveExamples = !!resolvedConfig.resolve?.doNotResolveExamples;
|
|
24
|
+
const group = (rules) => {
|
|
25
|
+
return groupAssertionRules({ rules }, this.plugins);
|
|
26
|
+
};
|
|
27
|
+
this.rules = {
|
|
28
|
+
oas2: group({ ...resolvedConfig.rules, ...resolvedConfig.oas2Rules }),
|
|
29
|
+
oas3_0: group({ ...resolvedConfig.rules, ...resolvedConfig.oas3_0Rules }),
|
|
30
|
+
oas3_1: group({ ...resolvedConfig.rules, ...resolvedConfig.oas3_1Rules }),
|
|
31
|
+
oas3_2: group({ ...resolvedConfig.rules, ...resolvedConfig.oas3_2Rules }),
|
|
32
|
+
async2: group({ ...resolvedConfig.rules, ...resolvedConfig.async2Rules }),
|
|
33
|
+
async3: group({ ...resolvedConfig.rules, ...resolvedConfig.async3Rules }),
|
|
34
|
+
arazzo1: group({ ...resolvedConfig.rules, ...resolvedConfig.arazzo1Rules }),
|
|
35
|
+
overlay1: group({ ...resolvedConfig.rules, ...resolvedConfig.overlay1Rules }),
|
|
36
|
+
openrpc1: group({ ...resolvedConfig.rules, ...resolvedConfig.openrpc1Rules }),
|
|
37
|
+
};
|
|
38
|
+
this.preprocessors = {
|
|
39
|
+
oas2: { ...resolvedConfig.preprocessors, ...resolvedConfig.oas2Preprocessors },
|
|
40
|
+
oas3_0: {
|
|
41
|
+
...resolvedConfig.preprocessors,
|
|
42
|
+
...resolvedConfig.oas3_0Preprocessors,
|
|
43
|
+
},
|
|
44
|
+
oas3_1: {
|
|
45
|
+
...resolvedConfig.preprocessors,
|
|
46
|
+
...resolvedConfig.oas3_1Preprocessors,
|
|
47
|
+
},
|
|
48
|
+
oas3_2: {
|
|
49
|
+
...resolvedConfig.preprocessors,
|
|
50
|
+
...resolvedConfig.oas3_2Preprocessors,
|
|
51
|
+
},
|
|
52
|
+
async2: {
|
|
53
|
+
...resolvedConfig.preprocessors,
|
|
54
|
+
...resolvedConfig.async2Preprocessors,
|
|
55
|
+
},
|
|
56
|
+
async3: {
|
|
57
|
+
...resolvedConfig.preprocessors,
|
|
58
|
+
...resolvedConfig.async3Preprocessors,
|
|
59
|
+
},
|
|
60
|
+
arazzo1: {
|
|
61
|
+
...resolvedConfig.preprocessors,
|
|
62
|
+
...resolvedConfig.arazzo1Preprocessors,
|
|
63
|
+
},
|
|
64
|
+
overlay1: {
|
|
65
|
+
...resolvedConfig.preprocessors,
|
|
66
|
+
...resolvedConfig.overlay1Preprocessors,
|
|
67
|
+
},
|
|
68
|
+
openrpc1: {
|
|
69
|
+
...resolvedConfig.preprocessors,
|
|
70
|
+
...resolvedConfig.openrpc1Preprocessors,
|
|
71
|
+
},
|
|
72
|
+
};
|
|
73
|
+
this.decorators = {
|
|
74
|
+
oas2: { ...resolvedConfig.decorators, ...resolvedConfig.oas2Decorators },
|
|
75
|
+
oas3_0: { ...resolvedConfig.decorators, ...resolvedConfig.oas3_0Decorators },
|
|
76
|
+
oas3_1: { ...resolvedConfig.decorators, ...resolvedConfig.oas3_1Decorators },
|
|
77
|
+
oas3_2: { ...resolvedConfig.decorators, ...resolvedConfig.oas3_2Decorators },
|
|
78
|
+
async2: { ...resolvedConfig.decorators, ...resolvedConfig.async2Decorators },
|
|
79
|
+
async3: { ...resolvedConfig.decorators, ...resolvedConfig.async3Decorators },
|
|
80
|
+
arazzo1: { ...resolvedConfig.decorators, ...resolvedConfig.arazzo1Decorators },
|
|
81
|
+
overlay1: {
|
|
82
|
+
...resolvedConfig.decorators,
|
|
83
|
+
...resolvedConfig.overlay1Decorators,
|
|
84
|
+
},
|
|
85
|
+
openrpc1: {
|
|
86
|
+
...resolvedConfig.decorators,
|
|
87
|
+
...resolvedConfig.openrpc1Decorators,
|
|
88
|
+
},
|
|
89
|
+
};
|
|
90
|
+
this.ignore = opts.ignore ?? {};
|
|
91
|
+
}
|
|
92
|
+
forAlias(alias) {
|
|
93
|
+
if (alias === undefined || !isPlainObject(this.resolvedConfig?.apis?.[alias])) {
|
|
94
|
+
return this;
|
|
95
|
+
}
|
|
96
|
+
const { apis, ...rest } = this.resolvedConfig;
|
|
97
|
+
const { root: _root, output: _output, ...aliasConfig } = apis[alias];
|
|
98
|
+
return new Config({ ...rest, ...aliasConfig }, {
|
|
99
|
+
configPath: this.configPath,
|
|
100
|
+
document: this.document,
|
|
101
|
+
resolvedRefMap: this.resolvedRefMap,
|
|
102
|
+
alias,
|
|
103
|
+
plugins: this.plugins,
|
|
104
|
+
ignore: this.ignore,
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
saveIgnore() {
|
|
108
|
+
const dir = this.configPath ? path.dirname(this.configPath) : process.cwd();
|
|
109
|
+
const ignoreFile = path.join(dir, IGNORE_FILE);
|
|
110
|
+
const mapped = {};
|
|
111
|
+
for (const absFileName of Object.keys(this.ignore)) {
|
|
112
|
+
const mappedDefinitionName = isAbsoluteUrl(absFileName)
|
|
113
|
+
? absFileName
|
|
114
|
+
: slash(path.relative(dir, absFileName));
|
|
115
|
+
const ignoredRules = (mapped[mappedDefinitionName] = this.ignore[absFileName]);
|
|
116
|
+
for (const ruleId of Object.keys(ignoredRules)) {
|
|
117
|
+
ignoredRules[ruleId] = Array.from(ignoredRules[ruleId]);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
fs.writeFileSync(ignoreFile, IGNORE_BANNER + stringifyYaml(mapped));
|
|
121
|
+
}
|
|
122
|
+
addIgnore(problem) {
|
|
123
|
+
const ignore = this.ignore;
|
|
124
|
+
const loc = problem.location[0];
|
|
125
|
+
if (loc.pointer === undefined)
|
|
126
|
+
return;
|
|
127
|
+
const fileIgnore = (ignore[loc.source.absoluteRef] = ignore[loc.source.absoluteRef] || {});
|
|
128
|
+
const ruleIgnore = (fileIgnore[problem.ruleId] = fileIgnore[problem.ruleId] || new Set());
|
|
129
|
+
ruleIgnore.add(loc.pointer);
|
|
130
|
+
}
|
|
131
|
+
addProblemToIgnore(problem) {
|
|
132
|
+
const loc = problem.location[0];
|
|
133
|
+
if (loc.pointer === undefined)
|
|
134
|
+
return problem;
|
|
135
|
+
const fileIgnore = this.ignore[loc.source.absoluteRef] || {};
|
|
136
|
+
const ruleIgnore = fileIgnore[problem.ruleId];
|
|
137
|
+
const ignored = ruleIgnore && ruleIgnore.has(loc.pointer);
|
|
138
|
+
return ignored
|
|
139
|
+
? {
|
|
140
|
+
...problem,
|
|
141
|
+
ignored,
|
|
142
|
+
}
|
|
143
|
+
: problem;
|
|
144
|
+
}
|
|
145
|
+
extendTypes(types, version) {
|
|
146
|
+
let extendedTypes = types;
|
|
147
|
+
for (const plugin of this.plugins) {
|
|
148
|
+
if (plugin.typeExtension !== undefined) {
|
|
149
|
+
switch (version) {
|
|
150
|
+
case 'oas3_0':
|
|
151
|
+
case 'oas3_1':
|
|
152
|
+
case 'oas3_2':
|
|
153
|
+
if (!plugin.typeExtension.oas3)
|
|
154
|
+
continue;
|
|
155
|
+
extendedTypes = plugin.typeExtension.oas3(extendedTypes, version);
|
|
156
|
+
break;
|
|
157
|
+
case 'oas2':
|
|
158
|
+
if (!plugin.typeExtension.oas2)
|
|
159
|
+
continue;
|
|
160
|
+
extendedTypes = plugin.typeExtension.oas2(extendedTypes, version);
|
|
161
|
+
break;
|
|
162
|
+
case 'async2':
|
|
163
|
+
if (!plugin.typeExtension.async2)
|
|
164
|
+
continue;
|
|
165
|
+
extendedTypes = plugin.typeExtension.async2(extendedTypes, version);
|
|
166
|
+
break;
|
|
167
|
+
case 'async3':
|
|
168
|
+
if (!plugin.typeExtension.async3)
|
|
169
|
+
continue;
|
|
170
|
+
extendedTypes = plugin.typeExtension.async3(extendedTypes, version);
|
|
171
|
+
break;
|
|
172
|
+
case 'arazzo1':
|
|
173
|
+
if (!plugin.typeExtension.arazzo1)
|
|
174
|
+
continue;
|
|
175
|
+
extendedTypes = plugin.typeExtension.arazzo1(extendedTypes, version);
|
|
176
|
+
break;
|
|
177
|
+
case 'overlay1':
|
|
178
|
+
if (!plugin.typeExtension.overlay1)
|
|
179
|
+
continue;
|
|
180
|
+
extendedTypes = plugin.typeExtension.overlay1(extendedTypes, version);
|
|
181
|
+
break;
|
|
182
|
+
case 'openrpc1':
|
|
183
|
+
if (!plugin.typeExtension.openrpc1)
|
|
184
|
+
continue;
|
|
185
|
+
extendedTypes = plugin.typeExtension.openrpc1(extendedTypes, version);
|
|
186
|
+
break;
|
|
187
|
+
default:
|
|
188
|
+
throw new Error('Not implemented');
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
return extendedTypes;
|
|
193
|
+
}
|
|
194
|
+
getRuleSettings(ruleId, oasVersion) {
|
|
195
|
+
this._usedRules.add(ruleId);
|
|
196
|
+
this._usedVersions.add(oasVersion);
|
|
197
|
+
const settings = this.rules[oasVersion][ruleId] || 'off';
|
|
198
|
+
if (typeof settings === 'string') {
|
|
199
|
+
return {
|
|
200
|
+
severity: settings,
|
|
201
|
+
};
|
|
202
|
+
}
|
|
203
|
+
else {
|
|
204
|
+
return { severity: 'error', ...settings };
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
getPreprocessorSettings(ruleId, oasVersion) {
|
|
208
|
+
this._usedRules.add(ruleId);
|
|
209
|
+
this._usedVersions.add(oasVersion);
|
|
210
|
+
const settings = this.preprocessors[oasVersion][ruleId] || 'off';
|
|
211
|
+
if (typeof settings === 'string') {
|
|
212
|
+
return {
|
|
213
|
+
severity: settings === 'on' ? 'error' : settings,
|
|
214
|
+
};
|
|
215
|
+
}
|
|
216
|
+
else {
|
|
217
|
+
return { severity: 'error', ...settings };
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
getDecoratorSettings(ruleId, oasVersion) {
|
|
221
|
+
this._usedRules.add(ruleId);
|
|
222
|
+
this._usedVersions.add(oasVersion);
|
|
223
|
+
const settings = this.decorators[oasVersion][ruleId] || 'off';
|
|
224
|
+
if (typeof settings === 'string') {
|
|
225
|
+
return {
|
|
226
|
+
severity: settings === 'on' ? 'error' : settings,
|
|
227
|
+
};
|
|
228
|
+
}
|
|
229
|
+
else {
|
|
230
|
+
return { severity: 'error', ...settings };
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
getUnusedRules() {
|
|
234
|
+
const rules = [];
|
|
235
|
+
const decorators = [];
|
|
236
|
+
const preprocessors = [];
|
|
237
|
+
for (const usedVersion of Array.from(this._usedVersions)) {
|
|
238
|
+
rules.push(...Object.keys(this.rules[usedVersion]).filter((name) => !this._usedRules.has(name)));
|
|
239
|
+
decorators.push(...Object.keys(this.decorators[usedVersion]).filter((name) => !this._usedRules.has(name)));
|
|
240
|
+
preprocessors.push(...Object.keys(this.preprocessors[usedVersion]).filter((name) => !this._usedRules.has(name)));
|
|
241
|
+
}
|
|
242
|
+
return {
|
|
243
|
+
rules,
|
|
244
|
+
preprocessors,
|
|
245
|
+
decorators,
|
|
246
|
+
};
|
|
247
|
+
}
|
|
248
|
+
// TODO: add default case for redocly.yaml
|
|
249
|
+
getRulesForSpecVersion(version) {
|
|
250
|
+
switch (version) {
|
|
251
|
+
case 'oas3':
|
|
252
|
+
// eslint-disable-next-line no-case-declarations
|
|
253
|
+
const oas3Rules = [];
|
|
254
|
+
this.plugins.forEach((p) => p.preprocessors?.oas3 && oas3Rules.push(p.preprocessors.oas3));
|
|
255
|
+
this.plugins.forEach((p) => p.rules?.oas3 && oas3Rules.push(p.rules.oas3));
|
|
256
|
+
this.plugins.forEach((p) => p.decorators?.oas3 && oas3Rules.push(p.decorators.oas3));
|
|
257
|
+
return oas3Rules;
|
|
258
|
+
case 'oas2':
|
|
259
|
+
// eslint-disable-next-line no-case-declarations
|
|
260
|
+
const oas2Rules = [];
|
|
261
|
+
this.plugins.forEach((p) => p.preprocessors?.oas2 && oas2Rules.push(p.preprocessors.oas2));
|
|
262
|
+
this.plugins.forEach((p) => p.rules?.oas2 && oas2Rules.push(p.rules.oas2));
|
|
263
|
+
this.plugins.forEach((p) => p.decorators?.oas2 && oas2Rules.push(p.decorators.oas2));
|
|
264
|
+
return oas2Rules;
|
|
265
|
+
case 'async2':
|
|
266
|
+
// eslint-disable-next-line no-case-declarations
|
|
267
|
+
const asyncApi2Rules = [];
|
|
268
|
+
this.plugins.forEach((p) => p.preprocessors?.async2 && asyncApi2Rules.push(p.preprocessors.async2));
|
|
269
|
+
this.plugins.forEach((p) => p.rules?.async2 && asyncApi2Rules.push(p.rules.async2));
|
|
270
|
+
this.plugins.forEach((p) => p.decorators?.async2 && asyncApi2Rules.push(p.decorators.async2));
|
|
271
|
+
return asyncApi2Rules;
|
|
272
|
+
case 'async3':
|
|
273
|
+
// eslint-disable-next-line no-case-declarations
|
|
274
|
+
const asyncApi3Rules = [];
|
|
275
|
+
this.plugins.forEach((p) => p.preprocessors?.async3 && asyncApi3Rules.push(p.preprocessors.async3));
|
|
276
|
+
this.plugins.forEach((p) => p.rules?.async3 && asyncApi3Rules.push(p.rules.async3));
|
|
277
|
+
this.plugins.forEach((p) => p.decorators?.async3 && asyncApi3Rules.push(p.decorators.async3));
|
|
278
|
+
return asyncApi3Rules;
|
|
279
|
+
case 'arazzo1':
|
|
280
|
+
// eslint-disable-next-line no-case-declarations
|
|
281
|
+
const arazzo1Rules = [];
|
|
282
|
+
this.plugins.forEach((p) => p.preprocessors?.arazzo1 && arazzo1Rules.push(p.preprocessors.arazzo1));
|
|
283
|
+
this.plugins.forEach((p) => p.rules?.arazzo1 && arazzo1Rules.push(p.rules.arazzo1));
|
|
284
|
+
this.plugins.forEach((p) => p.decorators?.arazzo1 && arazzo1Rules.push(p.decorators.arazzo1));
|
|
285
|
+
return arazzo1Rules;
|
|
286
|
+
case 'overlay1':
|
|
287
|
+
// eslint-disable-next-line no-case-declarations
|
|
288
|
+
const overlay1Rules = [];
|
|
289
|
+
this.plugins.forEach((p) => p.preprocessors?.overlay1 && overlay1Rules.push(p.preprocessors.overlay1));
|
|
290
|
+
this.plugins.forEach((p) => p.rules?.overlay1 && overlay1Rules.push(p.rules.overlay1));
|
|
291
|
+
this.plugins.forEach((p) => p.decorators?.overlay1 && overlay1Rules.push(p.decorators.overlay1));
|
|
292
|
+
return overlay1Rules;
|
|
293
|
+
case 'openrpc1':
|
|
294
|
+
// eslint-disable-next-line no-case-declarations
|
|
295
|
+
const openrpc1Rules = [];
|
|
296
|
+
this.plugins.forEach((p) => p.preprocessors?.openrpc1 && openrpc1Rules.push(p.preprocessors.openrpc1));
|
|
297
|
+
this.plugins.forEach((p) => p.rules?.openrpc1 && openrpc1Rules.push(p.rules.openrpc1));
|
|
298
|
+
this.plugins.forEach((p) => p.decorators?.openrpc1 && openrpc1Rules.push(p.decorators.openrpc1));
|
|
299
|
+
return openrpc1Rules;
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
skipRules(rules) {
|
|
303
|
+
for (const ruleId of rules || []) {
|
|
304
|
+
for (const version of specVersions) {
|
|
305
|
+
if (this.rules[version][ruleId]) {
|
|
306
|
+
this.rules[version][ruleId] = 'off';
|
|
307
|
+
}
|
|
308
|
+
else if (Array.isArray(this.rules[version].assertions)) {
|
|
309
|
+
// skip assertions
|
|
310
|
+
for (const configurableRule of this.rules[version].assertions) {
|
|
311
|
+
if (configurableRule.assertionId === ruleId) {
|
|
312
|
+
configurableRule.severity = 'off';
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
skipPreprocessors(preprocessors) {
|
|
320
|
+
for (const preprocessorId of preprocessors || []) {
|
|
321
|
+
for (const version of specVersions) {
|
|
322
|
+
if (this.preprocessors[version][preprocessorId]) {
|
|
323
|
+
this.preprocessors[version][preprocessorId] = 'off';
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
skipDecorators(decorators) {
|
|
329
|
+
for (const decoratorId of decorators || []) {
|
|
330
|
+
for (const version of specVersions) {
|
|
331
|
+
if (this.decorators[version][decoratorId]) {
|
|
332
|
+
this.decorators[version][decoratorId] = 'off';
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
//# sourceMappingURL=config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/config/config.ts"],"names":[],"mappings":"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,KAAK,MAAM,gBAAgB,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,UAAU,EAAE,CAAC;wBAC9D,IAAI,gBAAgB,CAAC,WAAW,KAAK,MAAM,EAAE,CAAC;4BAC5C,gBAAgB,CAAC,QAAQ,GAAG,KAAK,CAAC;wBACpC,CAAC;oBACH,CAAC;gBACH,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;IAED,iBAAiB,CAAC,aAAwB;QACxC,KAAK,MAAM,cAAc,IAAI,aAAa,IAAI,EAAE,EAAE,CAAC;YACjD,KAAK,MAAM,OAAO,IAAI,YAAY,EAAE,CAAC;gBACnC,IAAI,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,cAAc,CAAC,EAAE,CAAC;oBAChD,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,cAAc,CAAC,GAAG,KAAK,CAAC;gBACtD,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;IAED,cAAc,CAAC,UAAqB;QAClC,KAAK,MAAM,WAAW,IAAI,UAAU,IAAI,EAAE,EAAE,CAAC;YAC3C,KAAK,MAAM,OAAO,IAAI,YAAY,EAAE,CAAC;gBACnC,IAAI,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,WAAW,CAAC,EAAE,CAAC;oBAC1C,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,WAAW,CAAC,GAAG,KAAK,CAAC;gBAChD,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;CACF"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const CONFIG_FILE_NAME = "redocly.yaml";
|
|
2
|
+
export declare const DEFAULT_CONFIG: {
|
|
3
|
+
extends: string[];
|
|
4
|
+
};
|
|
5
|
+
export declare const IGNORE_FILE = ".redocly.lint-ignore.yaml";
|
|
6
|
+
export declare const IGNORE_BANNER: string;
|
|
7
|
+
export declare const CONFIG_BUNDLER_VISITOR_ID = "configBundler";
|
|
8
|
+
export declare const PLUGINS_COLLECTOR_VISITOR_ID = "pluginsCollector";
|
|
9
|
+
export declare const DEFAULT_PROJECT_PLUGIN_PATHS: string[];
|
|
10
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/config/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,iBAAiB,CAAC;AAE/C,eAAO,MAAM,cAAc;;CAA+B,CAAC;AAE3D,eAAO,MAAM,WAAW,8BAA8B,CAAC;AACvD,eAAO,MAAM,aAAa,QAEqC,CAAC;AAEhE,eAAO,MAAM,yBAAyB,kBAAkB,CAAC;AACzD,eAAO,MAAM,4BAA4B,qBAAqB,CAAC;AAC/D,eAAO,MAAM,4BAA4B,UAIxC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export const CONFIG_FILE_NAME = 'redocly.yaml';
|
|
2
|
+
export const DEFAULT_CONFIG = { extends: ['recommended'] };
|
|
3
|
+
export const IGNORE_FILE = '.redocly.lint-ignore.yaml';
|
|
4
|
+
export const IGNORE_BANNER = `# This file instructs Redocly's linter to ignore the rules contained for specific parts of your API.\n` +
|
|
5
|
+
`# See https://redocly.com/docs/cli/ for more information.\n`;
|
|
6
|
+
export const CONFIG_BUNDLER_VISITOR_ID = 'configBundler';
|
|
7
|
+
export const PLUGINS_COLLECTOR_VISITOR_ID = 'pluginsCollector';
|
|
8
|
+
export const DEFAULT_PROJECT_PLUGIN_PATHS = [
|
|
9
|
+
'@theme/plugin.js',
|
|
10
|
+
'@theme/plugin.cjs',
|
|
11
|
+
'@theme/plugin.mjs',
|
|
12
|
+
];
|
|
13
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/config/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,gBAAgB,GAAG,cAAc,CAAC;AAE/C,MAAM,CAAC,MAAM,cAAc,GAAG,EAAE,OAAO,EAAE,CAAC,aAAa,CAAC,EAAE,CAAC;AAE3D,MAAM,CAAC,MAAM,WAAW,GAAG,2BAA2B,CAAC;AACvD,MAAM,CAAC,MAAM,aAAa,GACxB,wGAAwG;IACxG,6DAA6D,CAAC;AAEhE,MAAM,CAAC,MAAM,yBAAyB,GAAG,eAAe,CAAC;AACzD,MAAM,CAAC,MAAM,4BAA4B,GAAG,kBAAkB,CAAC;AAC/D,MAAM,CAAC,MAAM,4BAA4B,GAAG;IAC1C,kBAAkB;IAClB,mBAAmB;IACnB,mBAAmB;CACpB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-resolve-config.d.ts","sourceRoot":"","sources":["../../src/config/get-resolve-config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAElE,wBAAgB,gBAAgB,CAAC,OAAO,CAAC,EAAE,gBAAgB,GAAG,aAAa,CAO1E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-resolve-config.js","sourceRoot":"","sources":["../../src/config/get-resolve-config.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,gBAAgB,CAAC,OAA0B;IACzD,OAAO;QACL,IAAI,EAAE;YACJ,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,IAAI,EAAE;YACrC,WAAW,EAAE,SAAS;SACvB;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"group-assertion-rules.d.ts","sourceRoot":"","sources":["../../src/config/group-assertion-rules.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,mBAAmB,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAEvE,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,mBAAmB,EAC3B,OAAO,EAAE,MAAM,EAAE,GAChB,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAoC5B"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { asserts, buildAssertCustomFunction } from '../rules/common/assertions/asserts.js';
|
|
2
|
+
import { isPlainObject } from '../utils/is-plain-object.js';
|
|
3
|
+
export function groupAssertionRules(config, plugins) {
|
|
4
|
+
if (!config.rules) {
|
|
5
|
+
return {};
|
|
6
|
+
}
|
|
7
|
+
// Create a new record to avoid mutating original
|
|
8
|
+
const transformedRules = {};
|
|
9
|
+
// Collect assertion rules
|
|
10
|
+
const assertions = [];
|
|
11
|
+
for (const [ruleKey, rule] of Object.entries(config.rules)) {
|
|
12
|
+
if (ruleKey.startsWith('rule/') && isPlainObject(rule)) {
|
|
13
|
+
const assertion = rule;
|
|
14
|
+
if (plugins) {
|
|
15
|
+
registerCustomAssertions(plugins, assertion);
|
|
16
|
+
// We may have custom assertion inside where block
|
|
17
|
+
for (const context of assertion.where || []) {
|
|
18
|
+
registerCustomAssertions(plugins, context);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
assertions.push({
|
|
22
|
+
...assertion,
|
|
23
|
+
assertionId: ruleKey,
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
// If it's not an assertion, keep it as is
|
|
28
|
+
transformedRules[ruleKey] = rule;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
if (assertions.length > 0) {
|
|
32
|
+
transformedRules.assertions = assertions;
|
|
33
|
+
}
|
|
34
|
+
return transformedRules;
|
|
35
|
+
}
|
|
36
|
+
function registerCustomAssertions(plugins, assertion) {
|
|
37
|
+
for (const field of Object.keys(assertion.assertions || {})) {
|
|
38
|
+
const [pluginId, fn] = field.split('/');
|
|
39
|
+
if (!pluginId || !fn)
|
|
40
|
+
continue;
|
|
41
|
+
const plugin = plugins.find((plugin) => plugin.id === pluginId);
|
|
42
|
+
if (!plugin) {
|
|
43
|
+
throw Error(`Plugin ${pluginId} isn't found.`);
|
|
44
|
+
}
|
|
45
|
+
if (!plugin.assertions || !plugin.assertions[fn]) {
|
|
46
|
+
throw Error(`Plugin ${pluginId} doesn't export assertions function with name ${fn}.`);
|
|
47
|
+
}
|
|
48
|
+
asserts[field] = buildAssertCustomFunction(plugin.assertions[fn]);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=group-assertion-rules.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"group-assertion-rules.js","sourceRoot":"","sources":["../../src/config/group-assertion-rules.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,yBAAyB,EAAE,MAAM,uCAAuC,CAAC;AAC3F,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAG5D,MAAM,UAAU,mBAAmB,CACjC,MAA2B,EAC3B,OAAiB;IAEjB,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;QAClB,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,iDAAiD;IACjD,MAAM,gBAAgB,GAA+B,EAAE,CAAC;IAExD,0BAA0B;IAC1B,MAAM,UAAU,GAAgB,EAAE,CAAC;IACnC,KAAK,MAAM,CAAC,OAAO,EAAE,IAAI,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC;QAC3D,IAAI,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,aAAa,CAAC,IAAI,CAAC,EAAE,CAAC;YACvD,MAAM,SAAS,GAAG,IAAoB,CAAC;YAEvC,IAAI,OAAO,EAAE,CAAC;gBACZ,wBAAwB,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;gBAE7C,kDAAkD;gBAClD,KAAK,MAAM,OAAO,IAAI,SAAS,CAAC,KAAK,IAAI,EAAE,EAAE,CAAC;oBAC5C,wBAAwB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;gBAC7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{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,uBAAuB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { BaseResolver, type ResolvedRefMap } from '../resolve.js';
|
|
2
|
+
import { Config } from './config.js';
|
|
3
|
+
import type { RawUniversalConfig, IgnoreConfig } from './types.js';
|
|
4
|
+
export declare function loadIgnoreConfig(configPath: string | undefined, resolver: BaseResolver): Promise<IgnoreConfig>;
|
|
5
|
+
export declare function loadConfig(options?: {
|
|
6
|
+
configPath?: string;
|
|
7
|
+
customExtends?: string[];
|
|
8
|
+
externalRefResolver?: BaseResolver;
|
|
9
|
+
}): Promise<Config>;
|
|
10
|
+
export declare function findConfig(dir?: string): string | undefined;
|
|
11
|
+
type CreateConfigOptions = {
|
|
12
|
+
configPath?: string;
|
|
13
|
+
externalRefResolver?: BaseResolver;
|
|
14
|
+
resolvedRefMap?: ResolvedRefMap;
|
|
15
|
+
ignore?: IgnoreConfig;
|
|
16
|
+
};
|
|
17
|
+
export declare function createConfig(config?: string | RawUniversalConfig, { configPath, externalRefResolver, ignore }?: CreateConfigOptions): Promise<Config>;
|
|
18
|
+
export {};
|
|
19
|
+
//# sourceMappingURL=load.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"load.d.ts","sourceRoot":"","sources":["../../src/config/load.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,YAAY,EAGZ,KAAK,cAAc,EACpB,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,OAAO,KAAK,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAsBnE,wBAAsB,gBAAgB,CACpC,UAAU,EAAE,MAAM,GAAG,SAAS,EAC9B,QAAQ,EAAE,YAAY,GACrB,OAAO,CAAC,YAAY,CAAC,CAevB;AAED,wBAAsB,UAAU,CAC9B,OAAO,GAAE;IACP,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,mBAAmB,CAAC,EAAE,YAAY,CAAC;CAC/B,GACL,OAAO,CAAC,MAAM,CAAC,CA+BjB;AAED,wBAAgB,UAAU,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAI3D;AAED,KAAK,mBAAmB,GAAG;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,mBAAmB,CAAC,EAAE,YAAY,CAAC;IACnC,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,MAAM,CAAC,EAAE,YAAY,CAAC;CACvB,CAAC;AAEF,wBAAsB,YAAY,CAChC,MAAM,CAAC,EAAE,MAAM,GAAG,kBAAkB,EACpC,EAAE,UAAU,EAAE,mBAAmB,EAAE,MAAM,EAAE,GAAE,mBAAwB,GACpE,OAAO,CAAC,MAAM,CAAC,CAwBjB"}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import * as fs from 'node:fs';
|
|
2
|
+
import * as path from 'node:path';
|
|
3
|
+
import { isBrowser } from '../env.js';
|
|
4
|
+
import { isAbsoluteUrl, getDir, resolvePath } from '../ref-utils.js';
|
|
5
|
+
import { BaseResolver, makeDocumentFromString, } from '../resolve.js';
|
|
6
|
+
import { resolveConfig } from './config-resolvers.js';
|
|
7
|
+
import { Config } from './config.js';
|
|
8
|
+
import { CONFIG_FILE_NAME, IGNORE_FILE } from './constants.js';
|
|
9
|
+
function resolveIgnore(content, dir) {
|
|
10
|
+
const ignore = Object.create(null);
|
|
11
|
+
for (const fileName of Object.keys(content)) {
|
|
12
|
+
const fileIgnore = content[fileName];
|
|
13
|
+
const resolvedFileName = isAbsoluteUrl(fileName) ? fileName : resolvePath(dir, fileName);
|
|
14
|
+
ignore[resolvedFileName] = Object.create(null);
|
|
15
|
+
for (const ruleId of Object.keys(fileIgnore)) {
|
|
16
|
+
ignore[resolvedFileName][ruleId] = new Set(fileIgnore[ruleId]);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
return ignore;
|
|
20
|
+
}
|
|
21
|
+
export async function loadIgnoreConfig(configPath, resolver) {
|
|
22
|
+
const configDir = configPath ? getDir(configPath) : isBrowser ? '' : process.cwd();
|
|
23
|
+
const ignorePath = configDir ? resolvePath(configDir, IGNORE_FILE) : IGNORE_FILE;
|
|
24
|
+
if (fs?.existsSync && !isAbsoluteUrl(ignorePath) && !fs.existsSync(ignorePath)) {
|
|
25
|
+
return {};
|
|
26
|
+
}
|
|
27
|
+
const ignoreDocument = await resolver.resolveDocument(null, ignorePath, true);
|
|
28
|
+
if (ignoreDocument instanceof Error || !ignoreDocument.parsed) {
|
|
29
|
+
return {};
|
|
30
|
+
}
|
|
31
|
+
return resolveIgnore(ignoreDocument.parsed || {}, configDir);
|
|
32
|
+
}
|
|
33
|
+
export async function loadConfig(options = {}) {
|
|
34
|
+
const { configPath = findConfig(), customExtends, externalRefResolver } = options;
|
|
35
|
+
const resolver = externalRefResolver ?? new BaseResolver();
|
|
36
|
+
const rawConfigDocument = configPath
|
|
37
|
+
? await resolver.resolveDocument(null, configPath, true)
|
|
38
|
+
: undefined;
|
|
39
|
+
if (rawConfigDocument instanceof Error) {
|
|
40
|
+
throw rawConfigDocument;
|
|
41
|
+
}
|
|
42
|
+
const { resolvedConfig, resolvedRefMap, plugins } = await resolveConfig({
|
|
43
|
+
rawConfigDocument: rawConfigDocument ? cloneConfigDocument(rawConfigDocument) : undefined,
|
|
44
|
+
customExtends,
|
|
45
|
+
configPath,
|
|
46
|
+
externalRefResolver,
|
|
47
|
+
});
|
|
48
|
+
const ignore = await loadIgnoreConfig(configPath, resolver);
|
|
49
|
+
const config = new Config(resolvedConfig, {
|
|
50
|
+
configPath,
|
|
51
|
+
document: rawConfigDocument,
|
|
52
|
+
resolvedRefMap: resolvedRefMap,
|
|
53
|
+
plugins,
|
|
54
|
+
ignore,
|
|
55
|
+
});
|
|
56
|
+
return config;
|
|
57
|
+
}
|
|
58
|
+
export function findConfig(dir) {
|
|
59
|
+
if (!fs?.existsSync)
|
|
60
|
+
return;
|
|
61
|
+
const configPath = dir ? path.resolve(dir, CONFIG_FILE_NAME) : CONFIG_FILE_NAME;
|
|
62
|
+
return fs.existsSync(configPath) ? configPath : undefined;
|
|
63
|
+
}
|
|
64
|
+
export async function createConfig(config, { configPath, externalRefResolver, ignore } = {}) {
|
|
65
|
+
const rawConfigSource = typeof config === 'string' ? config : '';
|
|
66
|
+
const rawConfigDocument = makeDocumentFromString(rawConfigSource, configPath ?? '');
|
|
67
|
+
if (typeof config !== 'string' && config) {
|
|
68
|
+
rawConfigDocument.parsed = config;
|
|
69
|
+
}
|
|
70
|
+
const { resolvedConfig, resolvedRefMap, plugins } = await resolveConfig({
|
|
71
|
+
rawConfigDocument: cloneConfigDocument(rawConfigDocument),
|
|
72
|
+
configPath,
|
|
73
|
+
externalRefResolver,
|
|
74
|
+
});
|
|
75
|
+
return new Config(resolvedConfig, {
|
|
76
|
+
configPath,
|
|
77
|
+
document: rawConfigDocument,
|
|
78
|
+
resolvedRefMap,
|
|
79
|
+
plugins,
|
|
80
|
+
ignore,
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
function cloneConfigDocument(document) {
|
|
84
|
+
if (!document.parsed) {
|
|
85
|
+
return document;
|
|
86
|
+
}
|
|
87
|
+
const { plugins, resolve, ...rest } = document.parsed;
|
|
88
|
+
const cloned = {
|
|
89
|
+
...structuredClone(rest),
|
|
90
|
+
plugins: plugins?.slice(),
|
|
91
|
+
...(resolve && { resolve: { ...resolve } }),
|
|
92
|
+
};
|
|
93
|
+
return {
|
|
94
|
+
...document,
|
|
95
|
+
parsed: cloned,
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
//# sourceMappingURL=load.js.map
|