@kubb/agent 4.27.2 → 4.28.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/.output/nitro.json +1 -1
- package/.output/server/chunks/nitro/nitro.mjs +330 -194
- package/.output/server/chunks/nitro/nitro.mjs.map +1 -1
- package/.output/server/chunks/routes/api/health.get.mjs +10 -5
- package/.output/server/chunks/routes/api/health.get.mjs.map +1 -1
- package/.output/server/index.mjs +11 -6
- package/.output/server/index.mjs.map +1 -1
- package/.output/server/node_modules/anymatch/index.js +104 -0
- package/.output/server/node_modules/anymatch/package.json +48 -0
- package/.output/server/node_modules/chokidar/handler.js +632 -0
- package/.output/server/node_modules/chokidar/index.js +822 -0
- package/.output/server/node_modules/chokidar/package.json +63 -0
- package/.output/server/node_modules/normalize-path/index.js +35 -0
- package/.output/server/node_modules/normalize-path/package.json +77 -0
- package/.output/server/node_modules/picomatch/index.js +1 -15
- package/.output/server/node_modules/picomatch/lib/constants.js +5 -6
- package/.output/server/node_modules/picomatch/lib/parse.js +9 -3
- package/.output/server/node_modules/picomatch/lib/picomatch.js +4 -3
- package/.output/server/node_modules/picomatch/lib/utils.js +16 -24
- package/.output/server/node_modules/picomatch/package.json +5 -7
- package/.output/server/node_modules/readdirp/index.js +272 -0
- package/.output/server/node_modules/readdirp/package.json +66 -0
- package/.output/server/package.json +6 -10
- package/LICENSE +21 -0
- package/README.md +98 -42
- package/package.json +17 -24
- package/.output/server/node_modules/@redocly/ajv/dist/2020.js +0 -55
- package/.output/server/node_modules/@redocly/ajv/dist/ajv.js +0 -50
- package/.output/server/node_modules/@redocly/ajv/dist/compile/codegen/code.js +0 -156
- package/.output/server/node_modules/@redocly/ajv/dist/compile/codegen/index.js +0 -697
- package/.output/server/node_modules/@redocly/ajv/dist/compile/codegen/scope.js +0 -143
- package/.output/server/node_modules/@redocly/ajv/dist/compile/errors.js +0 -123
- package/.output/server/node_modules/@redocly/ajv/dist/compile/index.js +0 -249
- package/.output/server/node_modules/@redocly/ajv/dist/compile/names.js +0 -29
- package/.output/server/node_modules/@redocly/ajv/dist/compile/ref_error.js +0 -12
- package/.output/server/node_modules/@redocly/ajv/dist/compile/resolve.js +0 -155
- package/.output/server/node_modules/@redocly/ajv/dist/compile/rules.js +0 -26
- package/.output/server/node_modules/@redocly/ajv/dist/compile/util.js +0 -178
- package/.output/server/node_modules/@redocly/ajv/dist/compile/validate/applicability.js +0 -19
- package/.output/server/node_modules/@redocly/ajv/dist/compile/validate/boolSchema.js +0 -50
- package/.output/server/node_modules/@redocly/ajv/dist/compile/validate/dataType.js +0 -203
- package/.output/server/node_modules/@redocly/ajv/dist/compile/validate/defaults.js +0 -35
- package/.output/server/node_modules/@redocly/ajv/dist/compile/validate/index.js +0 -534
- package/.output/server/node_modules/@redocly/ajv/dist/compile/validate/keyword.js +0 -124
- package/.output/server/node_modules/@redocly/ajv/dist/compile/validate/subschema.js +0 -81
- package/.output/server/node_modules/@redocly/ajv/dist/core.js +0 -632
- package/.output/server/node_modules/@redocly/ajv/dist/draft4.js +0 -56
- package/.output/server/node_modules/@redocly/ajv/dist/refs/data.json +0 -13
- package/.output/server/node_modules/@redocly/ajv/dist/refs/json-schema-2020-12/index.js +0 -30
- package/.output/server/node_modules/@redocly/ajv/dist/refs/json-schema-2020-12/meta/applicator.json +0 -48
- package/.output/server/node_modules/@redocly/ajv/dist/refs/json-schema-2020-12/meta/content.json +0 -17
- package/.output/server/node_modules/@redocly/ajv/dist/refs/json-schema-2020-12/meta/core.json +0 -51
- package/.output/server/node_modules/@redocly/ajv/dist/refs/json-schema-2020-12/meta/format-annotation.json +0 -14
- package/.output/server/node_modules/@redocly/ajv/dist/refs/json-schema-2020-12/meta/meta-data.json +0 -37
- package/.output/server/node_modules/@redocly/ajv/dist/refs/json-schema-2020-12/meta/unevaluated.json +0 -15
- package/.output/server/node_modules/@redocly/ajv/dist/refs/json-schema-2020-12/meta/validation.json +0 -90
- package/.output/server/node_modules/@redocly/ajv/dist/refs/json-schema-2020-12/schema.json +0 -55
- package/.output/server/node_modules/@redocly/ajv/dist/refs/json-schema-draft-04.json +0 -138
- package/.output/server/node_modules/@redocly/ajv/dist/refs/json-schema-draft-07.json +0 -151
- package/.output/server/node_modules/@redocly/ajv/dist/runtime/equal.js +0 -7
- package/.output/server/node_modules/@redocly/ajv/dist/runtime/ucs2length.js +0 -24
- package/.output/server/node_modules/@redocly/ajv/dist/runtime/uri.js +0 -6
- package/.output/server/node_modules/@redocly/ajv/dist/runtime/validation_error.js +0 -11
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/applicator/additionalItems.js +0 -49
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/applicator/additionalProperties.js +0 -107
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/applicator/allOf.js +0 -23
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/applicator/anyOf.js +0 -12
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/applicator/contains.js +0 -95
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/applicator/dependencies.js +0 -85
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/applicator/dependentSchemas.js +0 -11
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/applicator/if.js +0 -66
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/applicator/index.js +0 -44
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/applicator/items.js +0 -52
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/applicator/items2020.js +0 -30
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/applicator/not.js +0 -26
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/applicator/oneOf.js +0 -60
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/applicator/patternProperties.js +0 -75
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/applicator/prefixItems.js +0 -12
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/applicator/properties.js +0 -55
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/applicator/propertyNames.js +0 -38
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/applicator/thenElse.js +0 -13
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/code.js +0 -138
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/core/id.js +0 -10
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/core/index.js +0 -16
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/core/ref.js +0 -132
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/discriminator/index.js +0 -139
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/discriminator/types.js +0 -9
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/draft2020.js +0 -23
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/draft4.js +0 -29
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/draft7.js +0 -17
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/dynamic/dynamicAnchor.js +0 -30
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/dynamic/dynamicRef.js +0 -51
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/dynamic/index.js +0 -9
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/dynamic/recursiveAnchor.js +0 -16
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/dynamic/recursiveRef.js +0 -10
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/format/format.js +0 -92
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/format/index.js +0 -6
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/metadata.js +0 -26
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/next.js +0 -8
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/oasContext.js +0 -26
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/unevaluated/index.js +0 -7
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/unevaluated/unevaluatedItems.js +0 -40
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.js +0 -84
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/validation/const.js +0 -25
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/validation/dependentRequired.js +0 -12
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/validation/draft04/limitNumber.js +0 -43
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/validation/draft04/limitNumberExclusive.js +0 -19
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/validation/enum.js +0 -48
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/validation/index.js +0 -37
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/validation/limitContains.js +0 -15
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/validation/limitItems.js +0 -24
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/validation/limitLength.js +0 -27
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/validation/limitNumber.js +0 -27
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/validation/limitProperties.js +0 -24
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/validation/multipleOf.js +0 -26
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/validation/pattern.js +0 -24
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/validation/readOnly.js +0 -20
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/validation/required.js +0 -86
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/validation/uniqueItems.js +0 -64
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/validation/writeOnly.js +0 -20
- package/.output/server/node_modules/@redocly/ajv/package.json +0 -130
- package/.output/server/node_modules/@redocly/config/lib/common.js +0 -90
- package/.output/server/node_modules/@redocly/config/lib/constants.js +0 -73
- package/.output/server/node_modules/@redocly/config/lib/default-theme-config-schema.js +0 -54
- package/.output/server/node_modules/@redocly/config/lib/entities-catalog-config-schema.js +0 -186
- package/.output/server/node_modules/@redocly/config/lib/entities-catalog-entity-file-schema.js +0 -283
- package/.output/server/node_modules/@redocly/config/lib/ex-theme-config-schemas.js +0 -661
- package/.output/server/node_modules/@redocly/config/lib/feedback-config-schema.js +0 -88
- package/.output/server/node_modules/@redocly/config/lib/graphql-config-schema.js +0 -157
- package/.output/server/node_modules/@redocly/config/lib/index.js +0 -38
- package/.output/server/node_modules/@redocly/config/lib/product-override-schema.js +0 -43
- package/.output/server/node_modules/@redocly/config/lib/redoc-config-schema.js +0 -120
- package/.output/server/node_modules/@redocly/config/lib/reference-docs-config-schema.js +0 -518
- package/.output/server/node_modules/@redocly/config/lib/remove-property-recursively.js +0 -25
- package/.output/server/node_modules/@redocly/config/lib/reunite-config-schema.js +0 -103
- package/.output/server/node_modules/@redocly/config/lib/root-config-schema.js +0 -551
- package/.output/server/node_modules/@redocly/config/lib/scorecards-config-schema.js +0 -244
- package/.output/server/node_modules/@redocly/config/lib/types/api-functions-types.js +0 -3
- package/.output/server/node_modules/@redocly/config/lib/types/catalog-entity-types.js +0 -3
- package/.output/server/node_modules/@redocly/config/lib/types/code-walkthrough-types.js +0 -3
- package/.output/server/node_modules/@redocly/config/lib/types/config-types.js +0 -3
- package/.output/server/node_modules/@redocly/config/lib/types/index.js +0 -21
- package/.output/server/node_modules/@redocly/config/lib/types/portal-shared-types.js +0 -18
- package/.output/server/node_modules/@redocly/config/package.json +0 -28
- package/.output/server/node_modules/@redocly/openapi-core/lib/bundle/bundle-document.js +0 -85
- package/.output/server/node_modules/@redocly/openapi-core/lib/bundle/bundle-visitor.js +0 -257
- package/.output/server/node_modules/@redocly/openapi-core/lib/bundle/bundle.js +0 -74
- package/.output/server/node_modules/@redocly/openapi-core/lib/config/all.js +0 -310
- package/.output/server/node_modules/@redocly/openapi-core/lib/config/builtIn.js +0 -58
- package/.output/server/node_modules/@redocly/openapi-core/lib/config/bundle-extends.js +0 -27
- package/.output/server/node_modules/@redocly/openapi-core/lib/config/config-resolvers.js +0 -335
- package/.output/server/node_modules/@redocly/openapi-core/lib/config/config.js +0 -338
- package/.output/server/node_modules/@redocly/openapi-core/lib/config/constants.js +0 -13
- package/.output/server/node_modules/@redocly/openapi-core/lib/config/get-resolve-config.js +0 -9
- package/.output/server/node_modules/@redocly/openapi-core/lib/config/group-assertion-rules.js +0 -51
- package/.output/server/node_modules/@redocly/openapi-core/lib/config/index.js +0 -8
- package/.output/server/node_modules/@redocly/openapi-core/lib/config/load.js +0 -98
- package/.output/server/node_modules/@redocly/openapi-core/lib/config/minimal.js +0 -289
- package/.output/server/node_modules/@redocly/openapi-core/lib/config/recommended-strict.js +0 -289
- package/.output/server/node_modules/@redocly/openapi-core/lib/config/recommended.js +0 -289
- package/.output/server/node_modules/@redocly/openapi-core/lib/config/rules.js +0 -35
- package/.output/server/node_modules/@redocly/openapi-core/lib/config/spec.js +0 -289
- package/.output/server/node_modules/@redocly/openapi-core/lib/config/types.js +0 -2
- package/.output/server/node_modules/@redocly/openapi-core/lib/config/utils.js +0 -129
- package/.output/server/node_modules/@redocly/openapi-core/lib/config/visitors.js +0 -88
- package/.output/server/node_modules/@redocly/openapi-core/lib/decorators/arazzo/index.js +0 -2
- package/.output/server/node_modules/@redocly/openapi-core/lib/decorators/async2/index.js +0 -2
- package/.output/server/node_modules/@redocly/openapi-core/lib/decorators/async3/index.js +0 -2
- package/.output/server/node_modules/@redocly/openapi-core/lib/decorators/common/filters/filter-helper.js +0 -65
- package/.output/server/node_modules/@redocly/openapi-core/lib/decorators/common/filters/filter-in.js +0 -14
- package/.output/server/node_modules/@redocly/openapi-core/lib/decorators/common/filters/filter-out.js +0 -14
- package/.output/server/node_modules/@redocly/openapi-core/lib/decorators/common/info-description-override.js +0 -21
- package/.output/server/node_modules/@redocly/openapi-core/lib/decorators/common/info-override.js +0 -14
- package/.output/server/node_modules/@redocly/openapi-core/lib/decorators/common/media-type-examples-override.js +0 -58
- package/.output/server/node_modules/@redocly/openapi-core/lib/decorators/common/operation-description-override.js +0 -27
- package/.output/server/node_modules/@redocly/openapi-core/lib/decorators/common/remove-x-internal.js +0 -68
- package/.output/server/node_modules/@redocly/openapi-core/lib/decorators/common/tag-description-override.js +0 -23
- package/.output/server/node_modules/@redocly/openapi-core/lib/decorators/oas2/index.js +0 -19
- package/.output/server/node_modules/@redocly/openapi-core/lib/decorators/oas2/remove-unused-components.js +0 -88
- package/.output/server/node_modules/@redocly/openapi-core/lib/decorators/oas3/index.js +0 -21
- package/.output/server/node_modules/@redocly/openapi-core/lib/decorators/oas3/remove-unused-components.js +0 -116
- package/.output/server/node_modules/@redocly/openapi-core/lib/decorators/openrpc/index.js +0 -2
- package/.output/server/node_modules/@redocly/openapi-core/lib/decorators/overlay1/index.js +0 -2
- package/.output/server/node_modules/@redocly/openapi-core/lib/detect-spec.js +0 -79
- package/.output/server/node_modules/@redocly/openapi-core/lib/env.js +0 -5
- package/.output/server/node_modules/@redocly/openapi-core/lib/errors/yaml-parse-error.js +0 -14
- package/.output/server/node_modules/@redocly/openapi-core/lib/format/codeframes.js +0 -177
- package/.output/server/node_modules/@redocly/openapi-core/lib/format/format.js +0 -365
- package/.output/server/node_modules/@redocly/openapi-core/lib/index.js +0 -49
- package/.output/server/node_modules/@redocly/openapi-core/lib/js-yaml/index.js +0 -11
- package/.output/server/node_modules/@redocly/openapi-core/lib/lint-entity.js +0 -171
- package/.output/server/node_modules/@redocly/openapi-core/lib/lint.js +0 -123
- package/.output/server/node_modules/@redocly/openapi-core/lib/logger.js +0 -56
- package/.output/server/node_modules/@redocly/openapi-core/lib/oas-types.js +0 -35
- package/.output/server/node_modules/@redocly/openapi-core/lib/ref-utils.js +0 -106
- package/.output/server/node_modules/@redocly/openapi-core/lib/resolve.js +0 -326
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/ajv.js +0 -106
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/arazzo/criteria-unique.js +0 -68
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/arazzo/index.js +0 -52
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/arazzo/outputs-defined.js +0 -139
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/arazzo/parameters-unique.js +0 -27
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/arazzo/requestBody-replacements-unique.js +0 -30
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/arazzo/sourceDescription-type.js +0 -19
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/arazzo/sourceDescriptions-name-unique.js +0 -21
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/arazzo/sourceDescriptions-not-empty.js +0 -15
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/arazzo/step-onFailure-unique.js +0 -27
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/arazzo/step-onSuccess-unique.js +0 -27
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/arazzo/stepId-unique.js +0 -23
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/arazzo/workflow-dependsOn.js +0 -53
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/arazzo/workflowId-unique.js +0 -19
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/async2/channels-kebab-case.js +0 -16
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/async2/index.js +0 -32
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/async2/no-channel-trailing-slash.js +0 -13
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/async3/channels-kebab-case.js +0 -16
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/async3/index.js +0 -32
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/async3/no-channel-trailing-slash.js +0 -13
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/catalog-entity/entity-key-valid.js +0 -39
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/assertions/asserts.js +0 -269
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/assertions/index.js +0 -22
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/assertions/utils.js +0 -215
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/info-contact.js +0 -14
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/info-license-strict.js +0 -23
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/info-license.js +0 -14
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/no-ambiguous-paths.js +0 -42
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/no-duplicated-tag-names.js +0 -21
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/no-enum-type-mismatch.js +0 -38
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/no-http-verbs-in-paths.js +0 -31
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/no-identical-paths.js +0 -21
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/no-invalid-parameter-examples.js +0 -32
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/no-invalid-schema-examples.js +0 -34
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/no-path-trailing-slash.js +0 -13
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/no-required-schema-properties-undefined.js +0 -78
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/no-schema-type-mismatch.js +0 -19
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/no-unresolved-refs.js +0 -42
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/operation-2xx-response.js +0 -20
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/operation-4xx-response.js +0 -20
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/operation-description.js +0 -9
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/operation-operationId-unique.js +0 -17
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/operation-operationId-url-safe.js +0 -15
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/operation-operationId.js +0 -13
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/operation-parameters-unique.js +0 -37
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/operation-singular-tag.js +0 -13
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/operation-summary.js +0 -9
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/operation-tag-defined.js +0 -27
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/parameter-description.js +0 -19
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/path-declaration-must-exist.js +0 -13
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/path-http-verbs-order.js +0 -23
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/path-not-include-query.js +0 -15
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/path-params-defined.js +0 -125
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/path-segment-plural.js +0 -30
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/paths-kebab-case.js +0 -17
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/required-string-property-missing-min-length.js +0 -34
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/response-contains-header.js +0 -26
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/scalar-property-missing-example.js +0 -39
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/security-defined.js +0 -62
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/spec-strict-refs.js +0 -27
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/struct.js +0 -150
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/tag-description.js +0 -9
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/tags-alphabetical.js +0 -18
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/oas2/boolean-parameter-prefixes.js +0 -19
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/oas2/index.js +0 -93
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/oas2/request-mime-type.js +0 -14
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/oas2/response-contains-property.js +0 -34
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/oas2/response-mime-type.js +0 -14
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/oas3/array-parameter-serialization.js +0 -26
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/oas3/boolean-parameter-prefixes.js +0 -21
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/oas3/component-name-unique.js +0 -130
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/oas3/index.js +0 -129
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/oas3/no-empty-servers.js +0 -20
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/oas3/no-example-value-and-externalValue.js +0 -13
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/oas3/no-invalid-media-type-examples.js +0 -59
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/oas3/no-server-example.com.js +0 -15
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/oas3/no-server-trailing-slash.js +0 -15
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/oas3/no-server-variables-empty-enum.js +0 -58
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/oas3/no-undefined-server-variable.js +0 -28
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/oas3/no-unused-components.js +0 -83
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/oas3/nullable-type-sibling.js +0 -15
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/oas3/operation-4xx-problem-details-rfc7807.js +0 -33
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/oas3/request-mime-type.js +0 -28
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/oas3/response-contains-property.js +0 -36
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/oas3/response-mime-type.js +0 -28
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/oas3/spec-components-invalid-map-name.js +0 -59
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/oas3/spec-discriminator-defaultMapping.js +0 -32
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/oas3/spec-example-values.js +0 -31
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/oas3/spec-no-invalid-encoding-combinations.js +0 -16
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/oas3/spec-no-invalid-tag-parents.js +0 -38
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/oas3/spec-querystring-parameters.js +0 -65
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/openrpc/index.js +0 -20
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/openrpc/no-unused-components.js +0 -82
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/openrpc/spec-no-duplicated-method-params.js +0 -28
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/openrpc/spec-no-required-params-after-optional.js +0 -31
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/other/stats.js +0 -74
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/overlay1/index.js +0 -12
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/respect/no-criteria-xpath.js +0 -20
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/respect/no-x-security-both-scheme-and-scheme-name.js +0 -30
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/respect/no-x-security-scheme-name-without-openapi.js +0 -25
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/respect/respect-supported-versions.js +0 -18
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/respect/x-security-scheme-name-reference.js +0 -35
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/respect/x-security-scheme-required-values.js +0 -60
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/utils.js +0 -172
- package/.output/server/node_modules/@redocly/openapi-core/lib/types/arazzo.js +0 -482
- package/.output/server/node_modules/@redocly/openapi-core/lib/types/asyncapi2.js +0 -1157
- package/.output/server/node_modules/@redocly/openapi-core/lib/types/asyncapi3.js +0 -511
- package/.output/server/node_modules/@redocly/openapi-core/lib/types/entity.js +0 -32
- package/.output/server/node_modules/@redocly/openapi-core/lib/types/index.js +0 -90
- package/.output/server/node_modules/@redocly/openapi-core/lib/types/json-schema-adapter.js +0 -174
- package/.output/server/node_modules/@redocly/openapi-core/lib/types/json-schema-draft7.shared.js +0 -101
- package/.output/server/node_modules/@redocly/openapi-core/lib/types/oas2.js +0 -454
- package/.output/server/node_modules/@redocly/openapi-core/lib/types/oas3.js +0 -828
- package/.output/server/node_modules/@redocly/openapi-core/lib/types/oas3_1.js +0 -292
- package/.output/server/node_modules/@redocly/openapi-core/lib/types/oas3_2.js +0 -306
- package/.output/server/node_modules/@redocly/openapi-core/lib/types/openrpc.js +0 -360
- package/.output/server/node_modules/@redocly/openapi-core/lib/types/overlay.js +0 -61
- package/.output/server/node_modules/@redocly/openapi-core/lib/types/redocly-yaml.js +0 -555
- package/.output/server/node_modules/@redocly/openapi-core/lib/typings/arazzo.js +0 -3
- package/.output/server/node_modules/@redocly/openapi-core/lib/utils/assign-config.js +0 -28
- package/.output/server/node_modules/@redocly/openapi-core/lib/utils/dequal.js +0 -36
- package/.output/server/node_modules/@redocly/openapi-core/lib/utils/does-yaml-file-exist.js +0 -7
- package/.output/server/node_modules/@redocly/openapi-core/lib/utils/error.js +0 -3
- package/.output/server/node_modules/@redocly/openapi-core/lib/utils/get-intersection-length.js +0 -11
- package/.output/server/node_modules/@redocly/openapi-core/lib/utils/get-matching-status-code-range.js +0 -4
- package/.output/server/node_modules/@redocly/openapi-core/lib/utils/get-own.js +0 -4
- package/.output/server/node_modules/@redocly/openapi-core/lib/utils/identity.js +0 -4
- package/.output/server/node_modules/@redocly/openapi-core/lib/utils/is-custom-rule-id.js +0 -4
- package/.output/server/node_modules/@redocly/openapi-core/lib/utils/is-defined.js +0 -4
- package/.output/server/node_modules/@redocly/openapi-core/lib/utils/is-empty-array.js +0 -4
- package/.output/server/node_modules/@redocly/openapi-core/lib/utils/is-empty-object.js +0 -5
- package/.output/server/node_modules/@redocly/openapi-core/lib/utils/is-not-empty-array.js +0 -4
- package/.output/server/node_modules/@redocly/openapi-core/lib/utils/is-not-empty-object.js +0 -6
- package/.output/server/node_modules/@redocly/openapi-core/lib/utils/is-not-string.js +0 -5
- package/.output/server/node_modules/@redocly/openapi-core/lib/utils/is-ordered.js +0 -27
- package/.output/server/node_modules/@redocly/openapi-core/lib/utils/is-path-parameter.js +0 -4
- package/.output/server/node_modules/@redocly/openapi-core/lib/utils/is-plain-object.js +0 -4
- package/.output/server/node_modules/@redocly/openapi-core/lib/utils/is-string.js +0 -4
- package/.output/server/node_modules/@redocly/openapi-core/lib/utils/is-truthy.js +0 -4
- package/.output/server/node_modules/@redocly/openapi-core/lib/utils/keys-of.js +0 -6
- package/.output/server/node_modules/@redocly/openapi-core/lib/utils/make-ref-id.js +0 -4
- package/.output/server/node_modules/@redocly/openapi-core/lib/utils/next-tick.js +0 -6
- package/.output/server/node_modules/@redocly/openapi-core/lib/utils/oas-has-component.js +0 -4
- package/.output/server/node_modules/@redocly/openapi-core/lib/utils/omit.js +0 -8
- package/.output/server/node_modules/@redocly/openapi-core/lib/utils/pause.js +0 -4
- package/.output/server/node_modules/@redocly/openapi-core/lib/utils/pluralize.js +0 -8
- package/.output/server/node_modules/@redocly/openapi-core/lib/utils/read-file-from-url.js +0 -26
- package/.output/server/node_modules/@redocly/openapi-core/lib/utils/regex-from-string.js +0 -5
- package/.output/server/node_modules/@redocly/openapi-core/lib/utils/scorecards.js +0 -99
- package/.output/server/node_modules/@redocly/openapi-core/lib/utils/slash.js +0 -11
- package/.output/server/node_modules/@redocly/openapi-core/lib/utils/split-camel-case-into-words.js +0 -13
- package/.output/server/node_modules/@redocly/openapi-core/lib/utils/stack.js +0 -7
- package/.output/server/node_modules/@redocly/openapi-core/lib/utils/validate-mime-type.js +0 -31
- package/.output/server/node_modules/@redocly/openapi-core/lib/utils/yaml-fs-helper.js +0 -23
- package/.output/server/node_modules/@redocly/openapi-core/lib/visitors.js +0 -177
- package/.output/server/node_modules/@redocly/openapi-core/lib/walk.js +0 -303
- package/.output/server/node_modules/@redocly/openapi-core/package.json +0 -74
- package/.output/server/node_modules/ajv-formats/dist/formats.js +0 -208
- package/.output/server/node_modules/ajv-formats/dist/index.js +0 -37
- package/.output/server/node_modules/ajv-formats/dist/limit.js +0 -69
- package/.output/server/node_modules/ajv-formats/package.json +0 -74
- package/.output/server/node_modules/colorette/index.js +0 -82
- package/.output/server/node_modules/colorette/package.json +0 -39
- package/.output/server/node_modules/js-levenshtein/index.js +0 -105
- package/.output/server/node_modules/js-levenshtein/package.json +0 -49
- package/.output/server/node_modules/pluralize/package.json +0 -40
- package/.output/server/node_modules/pluralize/pluralize.js +0 -503
- package/.output/server/node_modules/yaml-ast-parser/dist/src/common.js +0 -45
- package/.output/server/node_modules/yaml-ast-parser/dist/src/dumper.js +0 -644
- package/.output/server/node_modules/yaml-ast-parser/dist/src/exception.js +0 -40
- package/.output/server/node_modules/yaml-ast-parser/dist/src/index.js +0 -22
- package/.output/server/node_modules/yaml-ast-parser/dist/src/loader.js +0 -1416
- package/.output/server/node_modules/yaml-ast-parser/dist/src/mark.js +0 -62
- package/.output/server/node_modules/yaml-ast-parser/dist/src/scalarInference.js +0 -82
- package/.output/server/node_modules/yaml-ast-parser/dist/src/schema/core.js +0 -8
- package/.output/server/node_modules/yaml-ast-parser/dist/src/schema/default_full.js +0 -14
- package/.output/server/node_modules/yaml-ast-parser/dist/src/schema/default_safe.js +0 -19
- package/.output/server/node_modules/yaml-ast-parser/dist/src/schema/failsafe.js +0 -10
- package/.output/server/node_modules/yaml-ast-parser/dist/src/schema/json.js +0 -14
- package/.output/server/node_modules/yaml-ast-parser/dist/src/schema.js +0 -78
- package/.output/server/node_modules/yaml-ast-parser/dist/src/type/binary.js +0 -92
- package/.output/server/node_modules/yaml-ast-parser/dist/src/type/bool.js +0 -32
- package/.output/server/node_modules/yaml-ast-parser/dist/src/type/float.js +0 -95
- package/.output/server/node_modules/yaml-ast-parser/dist/src/type/int.js +0 -155
- package/.output/server/node_modules/yaml-ast-parser/dist/src/type/js/regexp.js +0 -64
- package/.output/server/node_modules/yaml-ast-parser/dist/src/type/js/undefined.js +0 -22
- package/.output/server/node_modules/yaml-ast-parser/dist/src/type/map.js +0 -7
- package/.output/server/node_modules/yaml-ast-parser/dist/src/type/merge.js +0 -10
- package/.output/server/node_modules/yaml-ast-parser/dist/src/type/null.js +0 -30
- package/.output/server/node_modules/yaml-ast-parser/dist/src/type/omap.js +0 -46
- package/.output/server/node_modules/yaml-ast-parser/dist/src/type/pairs.js +0 -55
- package/.output/server/node_modules/yaml-ast-parser/dist/src/type/seq.js +0 -7
- package/.output/server/node_modules/yaml-ast-parser/dist/src/type/set.js +0 -22
- package/.output/server/node_modules/yaml-ast-parser/dist/src/type/str.js +0 -7
- package/.output/server/node_modules/yaml-ast-parser/dist/src/type/timestamp.js +0 -70
- package/.output/server/node_modules/yaml-ast-parser/dist/src/type.js +0 -54
- package/.output/server/node_modules/yaml-ast-parser/dist/src/yamlAST.js +0 -82
- package/.output/server/node_modules/yaml-ast-parser/package.json +0 -39
|
@@ -1,177 +0,0 @@
|
|
|
1
|
-
import * as yamlAst from 'yaml-ast-parser';
|
|
2
|
-
import { parsePointer } from '../ref-utils.js';
|
|
3
|
-
import { colorize, colorOptions } from '../logger.js';
|
|
4
|
-
const MAX_LINE_LENGTH = 150;
|
|
5
|
-
const MAX_CODEFRAME_LINES = 3;
|
|
6
|
-
export function getCodeframe(location, color) {
|
|
7
|
-
colorOptions.enabled = color;
|
|
8
|
-
const { start, end = { line: start.line, col: start.col + 1 }, source } = location;
|
|
9
|
-
const lines = source.getLines();
|
|
10
|
-
const startLineNum = start.line;
|
|
11
|
-
const endLineNum = Math.max(Math.min(end.line, lines.length), start.line);
|
|
12
|
-
let skipLines = Math.max(endLineNum - startLineNum - MAX_CODEFRAME_LINES + 1, 0);
|
|
13
|
-
if (skipLines < 2)
|
|
14
|
-
skipLines = 0; // do not skip one line
|
|
15
|
-
// Lines specified like this: ["prefix", "string"],
|
|
16
|
-
const prefixedLines = [];
|
|
17
|
-
let currentPad = 0;
|
|
18
|
-
for (let i = startLineNum; i <= endLineNum; i++) {
|
|
19
|
-
if (skipLines > 0 && i >= endLineNum - skipLines)
|
|
20
|
-
break;
|
|
21
|
-
const line = lines[i - 1] || '';
|
|
22
|
-
if (line !== '')
|
|
23
|
-
currentPad = padSize(line);
|
|
24
|
-
const startIdx = i === startLineNum ? start.col - 1 : currentPad;
|
|
25
|
-
const endIdx = i === endLineNum ? end.col - 1 : line.length;
|
|
26
|
-
prefixedLines.push([`${i}`, markLine(line, startIdx, endIdx, colorize.red)]);
|
|
27
|
-
if (!color)
|
|
28
|
-
prefixedLines.push(['', underlineLine(line, startIdx, endIdx)]);
|
|
29
|
-
}
|
|
30
|
-
if (skipLines > 0) {
|
|
31
|
-
prefixedLines.push([
|
|
32
|
-
`…`,
|
|
33
|
-
`${whitespace(currentPad)}${colorize.gray(`< ${skipLines} more lines >`)}`,
|
|
34
|
-
]);
|
|
35
|
-
// print last line
|
|
36
|
-
prefixedLines.push([
|
|
37
|
-
`${endLineNum}`,
|
|
38
|
-
markLine(lines[endLineNum - 1], -1, end.col - 1, colorize.red),
|
|
39
|
-
]);
|
|
40
|
-
if (!color)
|
|
41
|
-
prefixedLines.push(['', underlineLine(lines[endLineNum - 1], -1, end.col - 1)]);
|
|
42
|
-
}
|
|
43
|
-
return printPrefixedLines([
|
|
44
|
-
[`${startLineNum - 2}`, markLine(lines[startLineNum - 1 - 2])],
|
|
45
|
-
[`${startLineNum - 1}`, markLine(lines[startLineNum - 1 - 1])],
|
|
46
|
-
...prefixedLines,
|
|
47
|
-
[`${endLineNum + 1}`, markLine(lines[endLineNum - 1 + 1])],
|
|
48
|
-
[`${endLineNum + 2}`, markLine(lines[endLineNum - 1 + 2])],
|
|
49
|
-
]);
|
|
50
|
-
function markLine(line, startIdx = -1, endIdx = +Infinity, variant = colorize.gray) {
|
|
51
|
-
if (!color)
|
|
52
|
-
return line;
|
|
53
|
-
if (!line)
|
|
54
|
-
return line;
|
|
55
|
-
if (startIdx === -1) {
|
|
56
|
-
startIdx = padSize(line);
|
|
57
|
-
}
|
|
58
|
-
endIdx = Math.min(endIdx, line.length);
|
|
59
|
-
return (line.substr(0, startIdx) + variant(line.substring(startIdx, endIdx)) + line.substr(endIdx));
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
function printPrefixedLines(lines) {
|
|
63
|
-
const existingLines = lines.filter(([_, line]) => line !== undefined);
|
|
64
|
-
const padLen = Math.max(...existingLines.map(([prefix]) => prefix.length));
|
|
65
|
-
const dedentLen = Math.min(...existingLines.map(([_, line]) => (line === '' ? Infinity : padSize(line))));
|
|
66
|
-
return existingLines
|
|
67
|
-
.map(([prefix, line]) => colorize.gray(leftPad(padLen, prefix) + ' |') +
|
|
68
|
-
(line ? ' ' + limitLineLength(line.substring(dedentLen)) : ''))
|
|
69
|
-
.join('\n');
|
|
70
|
-
}
|
|
71
|
-
function limitLineLength(line, maxLen = MAX_LINE_LENGTH) {
|
|
72
|
-
const overflowLen = line.length - maxLen;
|
|
73
|
-
if (overflowLen > 0) {
|
|
74
|
-
const charsMoreText = colorize.gray(`...<${overflowLen} chars>`);
|
|
75
|
-
return line.substring(0, maxLen - charsMoreText.length) + charsMoreText;
|
|
76
|
-
}
|
|
77
|
-
else {
|
|
78
|
-
return line;
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
function underlineLine(line, startIdx = -1, endIdx = +Infinity) {
|
|
82
|
-
if (startIdx === -1) {
|
|
83
|
-
startIdx = padSize(line);
|
|
84
|
-
}
|
|
85
|
-
endIdx = Math.min(endIdx, line.length);
|
|
86
|
-
return whitespace(startIdx) + '^'.repeat(Math.max(endIdx - startIdx, 1));
|
|
87
|
-
}
|
|
88
|
-
function whitespace(len) {
|
|
89
|
-
return ' '.repeat(len);
|
|
90
|
-
}
|
|
91
|
-
function leftPad(len, str) {
|
|
92
|
-
return whitespace(len - str.length) + str;
|
|
93
|
-
}
|
|
94
|
-
function padSize(line) {
|
|
95
|
-
for (let i = 0; i < line.length; i++) {
|
|
96
|
-
if (line[i] !== ' ')
|
|
97
|
-
return i;
|
|
98
|
-
}
|
|
99
|
-
return line.length;
|
|
100
|
-
}
|
|
101
|
-
export function getLineColLocation(location) {
|
|
102
|
-
if (location.pointer === undefined)
|
|
103
|
-
return location;
|
|
104
|
-
const { source, pointer, reportOnKey } = location;
|
|
105
|
-
const ast = source.getAst(yamlAst.safeLoad);
|
|
106
|
-
const astNode = getAstNodeByPointer(ast, pointer, !!reportOnKey);
|
|
107
|
-
return {
|
|
108
|
-
...location,
|
|
109
|
-
pointer: undefined,
|
|
110
|
-
...positionsToLoc(source.body, astNode?.startPosition ?? 1, astNode?.endPosition ?? 1),
|
|
111
|
-
};
|
|
112
|
-
}
|
|
113
|
-
function positionsToLoc(source, startPos, endPos) {
|
|
114
|
-
let currentLine = 1;
|
|
115
|
-
let currentCol = 1;
|
|
116
|
-
let start = { line: 1, col: 1 };
|
|
117
|
-
for (let i = 0; i < endPos - 1; i++) {
|
|
118
|
-
if (i === startPos - 1) {
|
|
119
|
-
start = { line: currentLine, col: currentCol + 1 };
|
|
120
|
-
}
|
|
121
|
-
if (source[i] === '\n') {
|
|
122
|
-
currentLine++;
|
|
123
|
-
currentCol = 1;
|
|
124
|
-
if (i === startPos - 1) {
|
|
125
|
-
start = { line: currentLine, col: currentCol };
|
|
126
|
-
}
|
|
127
|
-
if (source[i + 1] === '\r')
|
|
128
|
-
i++; // TODO: test it
|
|
129
|
-
continue;
|
|
130
|
-
}
|
|
131
|
-
currentCol++;
|
|
132
|
-
}
|
|
133
|
-
const end = startPos === endPos ? { ...start } : { line: currentLine, col: currentCol + 1 };
|
|
134
|
-
return { start, end };
|
|
135
|
-
}
|
|
136
|
-
export function getAstNodeByPointer(root, pointer, reportOnKey) {
|
|
137
|
-
const pointerSegments = parsePointer(pointer.substr(2));
|
|
138
|
-
if (root === undefined) {
|
|
139
|
-
return undefined;
|
|
140
|
-
}
|
|
141
|
-
let currentNode = root;
|
|
142
|
-
for (const key of pointerSegments) {
|
|
143
|
-
if (currentNode.kind === yamlAst.Kind.MAP) {
|
|
144
|
-
const mapping = currentNode.mappings.find((m) => m.key.value === key);
|
|
145
|
-
if (!mapping)
|
|
146
|
-
break;
|
|
147
|
-
currentNode = mapping;
|
|
148
|
-
if (!mapping?.value)
|
|
149
|
-
break; // If node has value - return value, if not - return node itself
|
|
150
|
-
currentNode = mapping.value;
|
|
151
|
-
}
|
|
152
|
-
else if (currentNode.kind === yamlAst.Kind.SEQ) {
|
|
153
|
-
const elem = currentNode.items[parseInt(key, 10)];
|
|
154
|
-
if (!elem)
|
|
155
|
-
break;
|
|
156
|
-
currentNode = elem;
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
if (!reportOnKey) {
|
|
160
|
-
return currentNode;
|
|
161
|
-
}
|
|
162
|
-
else {
|
|
163
|
-
const parent = currentNode.parent;
|
|
164
|
-
if (!parent)
|
|
165
|
-
return currentNode;
|
|
166
|
-
if (parent.kind === yamlAst.Kind.SEQ) {
|
|
167
|
-
return currentNode;
|
|
168
|
-
}
|
|
169
|
-
else if (parent.kind === yamlAst.Kind.MAPPING) {
|
|
170
|
-
return parent.key;
|
|
171
|
-
}
|
|
172
|
-
else {
|
|
173
|
-
return currentNode;
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
//# sourceMappingURL=codeframes.js.map
|
|
@@ -1,365 +0,0 @@
|
|
|
1
|
-
import * as path from 'node:path';
|
|
2
|
-
import { colorOptions, colorize, logger } from '../logger.js';
|
|
3
|
-
import { getCodeframe, getLineColLocation } from './codeframes.js';
|
|
4
|
-
import { env, isBrowser } from '../env.js';
|
|
5
|
-
import { isAbsoluteUrl } from '../ref-utils.js';
|
|
6
|
-
const ERROR_MESSAGE = {
|
|
7
|
-
INVALID_SEVERITY_LEVEL: 'Invalid severity level; accepted values: error or warn',
|
|
8
|
-
};
|
|
9
|
-
const BG_COLORS = {
|
|
10
|
-
warn: (str) => colorize.bgYellow(colorize.black(str)),
|
|
11
|
-
error: colorize.bgRed,
|
|
12
|
-
};
|
|
13
|
-
const COLORS = {
|
|
14
|
-
warn: colorize.yellow,
|
|
15
|
-
error: colorize.red,
|
|
16
|
-
};
|
|
17
|
-
const SEVERITY_NAMES = {
|
|
18
|
-
warn: 'Warning',
|
|
19
|
-
error: 'Error',
|
|
20
|
-
};
|
|
21
|
-
const CODECLIMATE_SEVERITY_MAPPING = {
|
|
22
|
-
error: 'critical',
|
|
23
|
-
warn: 'minor',
|
|
24
|
-
};
|
|
25
|
-
const MAX_SUGGEST = +(env.REDOCLY_CLI_LINT_MAX_SUGGESTIONS ?? 5);
|
|
26
|
-
function severityToNumber(severity) {
|
|
27
|
-
return severity === 'error' ? 1 : 2;
|
|
28
|
-
}
|
|
29
|
-
export function getTotals(problems) {
|
|
30
|
-
let errors = 0;
|
|
31
|
-
let warnings = 0;
|
|
32
|
-
let ignored = 0;
|
|
33
|
-
for (const m of problems) {
|
|
34
|
-
if (m.ignored) {
|
|
35
|
-
ignored++;
|
|
36
|
-
continue;
|
|
37
|
-
}
|
|
38
|
-
if (m.severity === 'error')
|
|
39
|
-
errors++;
|
|
40
|
-
if (m.severity === 'warn')
|
|
41
|
-
warnings++;
|
|
42
|
-
}
|
|
43
|
-
return {
|
|
44
|
-
errors,
|
|
45
|
-
warnings,
|
|
46
|
-
ignored,
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
|
-
export function formatProblems(problems, opts) {
|
|
50
|
-
const { maxProblems = 100, cwd = isBrowser ? '' : process.cwd(), format = 'codeframe', color = colorOptions.enabled, totals = getTotals(problems), version = '2.0', command, } = opts;
|
|
51
|
-
colorOptions.enabled = color; // force colors if specified
|
|
52
|
-
const totalProblems = problems.length;
|
|
53
|
-
problems = problems.filter((m) => !m.ignored);
|
|
54
|
-
const ignoredProblems = totalProblems - problems.length;
|
|
55
|
-
problems = problems
|
|
56
|
-
.sort((a, b) => severityToNumber(a.severity) - severityToNumber(b.severity))
|
|
57
|
-
.slice(0, maxProblems);
|
|
58
|
-
if (!totalProblems && format !== 'json')
|
|
59
|
-
return;
|
|
60
|
-
switch (format) {
|
|
61
|
-
case 'json':
|
|
62
|
-
outputJSON();
|
|
63
|
-
break;
|
|
64
|
-
case 'codeframe':
|
|
65
|
-
for (let i = 0; i < problems.length; i++) {
|
|
66
|
-
const problem = problems[i];
|
|
67
|
-
if (command === 'bundle') {
|
|
68
|
-
logger.info(`${formatCodeframe(problem, i)}\n`);
|
|
69
|
-
}
|
|
70
|
-
else {
|
|
71
|
-
logger.output(`${formatCodeframe(problem, i)}\n`);
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
break;
|
|
75
|
-
case 'stylish': {
|
|
76
|
-
const groupedByFile = groupByFiles(problems);
|
|
77
|
-
for (const [file, { ruleIdPad, locationPad: positionPad, fileProblems }] of Object.entries(groupedByFile)) {
|
|
78
|
-
logger.output(`${colorize.blue(isAbsoluteUrl(file) ? file : path.relative(cwd, file))}:\n`);
|
|
79
|
-
for (let i = 0; i < fileProblems.length; i++) {
|
|
80
|
-
const problem = fileProblems[i];
|
|
81
|
-
logger.output(`${formatStylish(problem, positionPad, ruleIdPad)}\n`);
|
|
82
|
-
}
|
|
83
|
-
logger.output('\n');
|
|
84
|
-
}
|
|
85
|
-
break;
|
|
86
|
-
}
|
|
87
|
-
case 'markdown': {
|
|
88
|
-
const groupedByFile = groupByFiles(problems);
|
|
89
|
-
for (const [file, { fileProblems }] of Object.entries(groupedByFile)) {
|
|
90
|
-
logger.output(`## Lint: ${isAbsoluteUrl(file) ? file : path.relative(cwd, file)}\n\n`);
|
|
91
|
-
logger.output(`| Severity | Location | Problem | Message |\n`);
|
|
92
|
-
logger.output(`|---|---|---|---|\n`);
|
|
93
|
-
for (let i = 0; i < fileProblems.length; i++) {
|
|
94
|
-
const problem = fileProblems[i];
|
|
95
|
-
logger.output(`${formatMarkdown(problem)}\n`);
|
|
96
|
-
}
|
|
97
|
-
logger.output('\n');
|
|
98
|
-
if (totals.errors > 0) {
|
|
99
|
-
logger.output(`Validation failed\nErrors: ${totals.errors}\n`);
|
|
100
|
-
}
|
|
101
|
-
else {
|
|
102
|
-
logger.output('Validation successful\n');
|
|
103
|
-
}
|
|
104
|
-
if (totals.warnings > 0) {
|
|
105
|
-
logger.output(`Warnings: ${totals.warnings}\n`);
|
|
106
|
-
}
|
|
107
|
-
logger.output('\n');
|
|
108
|
-
}
|
|
109
|
-
break;
|
|
110
|
-
}
|
|
111
|
-
case 'checkstyle': {
|
|
112
|
-
const groupedByFile = groupByFiles(problems);
|
|
113
|
-
logger.output('<?xml version="1.0" encoding="UTF-8"?>\n');
|
|
114
|
-
logger.output('<checkstyle version="4.3">\n');
|
|
115
|
-
for (const [file, { fileProblems }] of Object.entries(groupedByFile)) {
|
|
116
|
-
logger.output(`<file name="${xmlEscape(isAbsoluteUrl(file) ? file : path.relative(cwd, file))}">\n`);
|
|
117
|
-
fileProblems.forEach(formatCheckstyle);
|
|
118
|
-
logger.output(`</file>\n`);
|
|
119
|
-
}
|
|
120
|
-
logger.output(`</checkstyle>\n`);
|
|
121
|
-
break;
|
|
122
|
-
}
|
|
123
|
-
case 'codeclimate':
|
|
124
|
-
outputForCodeClimate();
|
|
125
|
-
break;
|
|
126
|
-
case 'summary':
|
|
127
|
-
formatSummary(problems);
|
|
128
|
-
break;
|
|
129
|
-
case 'github-actions':
|
|
130
|
-
outputForGithubActions(problems, cwd);
|
|
131
|
-
}
|
|
132
|
-
if (totalProblems - ignoredProblems > maxProblems) {
|
|
133
|
-
logger.info(`< ... ${totalProblems - maxProblems} more problems hidden > ${colorize.gray('increase with `--max-problems N`')}\n`);
|
|
134
|
-
}
|
|
135
|
-
function outputForCodeClimate() {
|
|
136
|
-
const issues = problems.map((p) => {
|
|
137
|
-
const location = p.location[0]; // TODO: support multiple location
|
|
138
|
-
const lineCol = getLineColLocation(location);
|
|
139
|
-
return {
|
|
140
|
-
description: p.message,
|
|
141
|
-
location: {
|
|
142
|
-
path: isAbsoluteUrl(location.source.absoluteRef)
|
|
143
|
-
? location.source.absoluteRef
|
|
144
|
-
: path.relative(cwd, location.source.absoluteRef),
|
|
145
|
-
lines: {
|
|
146
|
-
begin: lineCol.start.line,
|
|
147
|
-
},
|
|
148
|
-
},
|
|
149
|
-
severity: CODECLIMATE_SEVERITY_MAPPING[p.severity],
|
|
150
|
-
fingerprint: `${p.ruleId}${p.location.length > 0 ? '-' + p.location[0].pointer : ''}`,
|
|
151
|
-
};
|
|
152
|
-
});
|
|
153
|
-
logger.output(JSON.stringify(issues, null, 2));
|
|
154
|
-
}
|
|
155
|
-
function outputJSON() {
|
|
156
|
-
const resultObject = {
|
|
157
|
-
totals,
|
|
158
|
-
version,
|
|
159
|
-
problems: problems.map((p) => {
|
|
160
|
-
const problem = {
|
|
161
|
-
...p,
|
|
162
|
-
location: p.location.map((location) => ({
|
|
163
|
-
...location,
|
|
164
|
-
source: {
|
|
165
|
-
ref: isAbsoluteUrl(location.source.absoluteRef)
|
|
166
|
-
? location.source.absoluteRef
|
|
167
|
-
: path.relative(cwd, location.source.absoluteRef),
|
|
168
|
-
},
|
|
169
|
-
})),
|
|
170
|
-
from: p.from
|
|
171
|
-
? {
|
|
172
|
-
...p.from,
|
|
173
|
-
source: {
|
|
174
|
-
ref: isAbsoluteUrl(p.from?.source.absoluteRef)
|
|
175
|
-
? p.from?.source.absoluteRef
|
|
176
|
-
: path.relative(cwd, p.from?.source.absoluteRef || cwd),
|
|
177
|
-
},
|
|
178
|
-
}
|
|
179
|
-
: undefined,
|
|
180
|
-
};
|
|
181
|
-
if (env.FORMAT_JSON_WITH_CODEFRAMES) {
|
|
182
|
-
const location = p.location[0]; // TODO: support multiple locations
|
|
183
|
-
const loc = getLineColLocation(location);
|
|
184
|
-
problem.codeframe = getCodeframe(loc, color);
|
|
185
|
-
}
|
|
186
|
-
return problem;
|
|
187
|
-
}),
|
|
188
|
-
};
|
|
189
|
-
logger.output(JSON.stringify(resultObject, null, 2));
|
|
190
|
-
}
|
|
191
|
-
function getBgColor(problem) {
|
|
192
|
-
const { severity } = problem;
|
|
193
|
-
if (!BG_COLORS[severity]) {
|
|
194
|
-
throw new Error(ERROR_MESSAGE.INVALID_SEVERITY_LEVEL);
|
|
195
|
-
}
|
|
196
|
-
return BG_COLORS[severity];
|
|
197
|
-
}
|
|
198
|
-
function formatCodeframe(problem, idx) {
|
|
199
|
-
const bgColor = getBgColor(problem);
|
|
200
|
-
const location = problem.location[0]; // TODO: support multiple locations
|
|
201
|
-
const relativePath = isAbsoluteUrl(location.source.absoluteRef)
|
|
202
|
-
? location.source.absoluteRef
|
|
203
|
-
: path.relative(cwd, location.source.absoluteRef);
|
|
204
|
-
const loc = getLineColLocation(location);
|
|
205
|
-
const atPointer = location.pointer ? colorize.gray(`at ${location.pointer}`) : '';
|
|
206
|
-
const fileWithLoc = `${relativePath}:${loc.start.line}:${loc.start.col}`;
|
|
207
|
-
return (`[${idx + 1}] ${bgColor(fileWithLoc)} ${atPointer}\n\n` +
|
|
208
|
-
`${problem.message}\n\n` +
|
|
209
|
-
formatDidYouMean(problem) +
|
|
210
|
-
getCodeframe(loc, color) +
|
|
211
|
-
'\n\n' +
|
|
212
|
-
formatFrom(cwd, problem.from) +
|
|
213
|
-
`${SEVERITY_NAMES[problem.severity]} was generated by the ${colorize.blue(problem.ruleId)} rule.\n\n`);
|
|
214
|
-
}
|
|
215
|
-
function formatStylish(problem, locationPad, ruleIdPad) {
|
|
216
|
-
const color = COLORS[problem.severity];
|
|
217
|
-
if (!SEVERITY_NAMES[problem.severity]) {
|
|
218
|
-
return 'Error not found severity. Please check your config file. Allowed values: `warn,error,off`';
|
|
219
|
-
}
|
|
220
|
-
const severityName = color(SEVERITY_NAMES[problem.severity].toLowerCase().padEnd(7));
|
|
221
|
-
const { start } = problem.location[0];
|
|
222
|
-
return ` ${`${start.line}:${start.col}`.padEnd(locationPad)} ${severityName} ${problem.ruleId.padEnd(ruleIdPad)} ${problem.message}`;
|
|
223
|
-
}
|
|
224
|
-
function formatMarkdown(problem) {
|
|
225
|
-
if (!SEVERITY_NAMES[problem.severity]) {
|
|
226
|
-
return 'Error not found severity. Please check your config file. Allowed values: `warn,error,off`';
|
|
227
|
-
}
|
|
228
|
-
const severityName = SEVERITY_NAMES[problem.severity].toLowerCase();
|
|
229
|
-
const { start } = problem.location[0];
|
|
230
|
-
return `| ${severityName} | line ${`${start.line}:${start.col}`} | [${problem.ruleId}](https://redocly.com/docs/cli/rules/${problem.ruleId}/) | ${problem.message.replaceAll('\n', '<br>')} |`;
|
|
231
|
-
}
|
|
232
|
-
function formatCheckstyle(problem) {
|
|
233
|
-
const { line, col } = problem.location[0].start;
|
|
234
|
-
const severity = problem.severity == 'warn' ? 'warning' : 'error';
|
|
235
|
-
const message = xmlEscape(problem.message);
|
|
236
|
-
const source = xmlEscape(problem.ruleId);
|
|
237
|
-
logger.output(`<error line="${line}" column="${col}" severity="${severity}" message="${message}" source="${source}" />\n`);
|
|
238
|
-
}
|
|
239
|
-
}
|
|
240
|
-
function formatSummary(problems) {
|
|
241
|
-
const counts = {};
|
|
242
|
-
for (const problem of problems) {
|
|
243
|
-
counts[problem.ruleId] = counts[problem.ruleId] || { count: 0, severity: problem.severity };
|
|
244
|
-
counts[problem.ruleId].count++;
|
|
245
|
-
}
|
|
246
|
-
const sorted = Object.entries(counts).sort(([, a], [, b]) => {
|
|
247
|
-
const severityDiff = severityToNumber(a.severity) - severityToNumber(b.severity);
|
|
248
|
-
return severityDiff || b.count - a.count;
|
|
249
|
-
});
|
|
250
|
-
for (const [ruleId, info] of sorted) {
|
|
251
|
-
const color = COLORS[info.severity];
|
|
252
|
-
const severityName = color(SEVERITY_NAMES[info.severity].toLowerCase().padEnd(7));
|
|
253
|
-
logger.output(`${severityName} ${ruleId}: ${info.count}\n`);
|
|
254
|
-
}
|
|
255
|
-
logger.output('\n');
|
|
256
|
-
}
|
|
257
|
-
function formatFrom(cwd, location) {
|
|
258
|
-
if (!location)
|
|
259
|
-
return '';
|
|
260
|
-
const relativePath = path.relative(cwd, location.source.absoluteRef);
|
|
261
|
-
const loc = getLineColLocation(location);
|
|
262
|
-
const fileWithLoc = `${relativePath}:${loc.start.line}:${loc.start.col}`;
|
|
263
|
-
const atPointer = location.pointer ? colorize.gray(`at ${location.pointer}`) : '';
|
|
264
|
-
return `referenced from ${colorize.blue(fileWithLoc)} ${atPointer} \n\n`;
|
|
265
|
-
}
|
|
266
|
-
function formatDidYouMean(problem) {
|
|
267
|
-
if (problem.suggest.length === 0)
|
|
268
|
-
return '';
|
|
269
|
-
if (problem.suggest.length === 1) {
|
|
270
|
-
return `Did you mean: ${problem.suggest[0]} ?\n\n`;
|
|
271
|
-
}
|
|
272
|
-
else {
|
|
273
|
-
return `Did you mean:\n - ${problem.suggest.slice(0, MAX_SUGGEST).join('\n - ')}\n\n`;
|
|
274
|
-
}
|
|
275
|
-
}
|
|
276
|
-
const groupByFiles = (problems) => {
|
|
277
|
-
const fileGroups = {};
|
|
278
|
-
for (const problem of problems) {
|
|
279
|
-
const absoluteRef = problem.location[0].source.absoluteRef; // TODO: multiple errors
|
|
280
|
-
fileGroups[absoluteRef] = fileGroups[absoluteRef] || {
|
|
281
|
-
fileProblems: [],
|
|
282
|
-
ruleIdPad: 0,
|
|
283
|
-
locationPad: 0,
|
|
284
|
-
};
|
|
285
|
-
const mappedProblem = { ...problem, location: problem.location.map(getLineColLocation) };
|
|
286
|
-
fileGroups[absoluteRef].fileProblems.push(mappedProblem);
|
|
287
|
-
fileGroups[absoluteRef].ruleIdPad = Math.max(problem.ruleId.length, fileGroups[absoluteRef].ruleIdPad);
|
|
288
|
-
fileGroups[absoluteRef].locationPad = Math.max(Math.max(...mappedProblem.location.map((loc) => `${loc.start.line}:${loc.start.col}`.length)), fileGroups[absoluteRef].locationPad);
|
|
289
|
-
}
|
|
290
|
-
return fileGroups;
|
|
291
|
-
};
|
|
292
|
-
function xmlEscape(s) {
|
|
293
|
-
// eslint-disable-next-line no-control-regex
|
|
294
|
-
return s.replace(/[<>&"'\x00-\x1F\x7F\u0080-\uFFFF]/gu, (char) => {
|
|
295
|
-
switch (char) {
|
|
296
|
-
case '<':
|
|
297
|
-
return '<';
|
|
298
|
-
case '>':
|
|
299
|
-
return '>';
|
|
300
|
-
case '&':
|
|
301
|
-
return '&';
|
|
302
|
-
case '"':
|
|
303
|
-
return '"';
|
|
304
|
-
case "'":
|
|
305
|
-
return ''';
|
|
306
|
-
default:
|
|
307
|
-
return `&#${char.charCodeAt(0)};`;
|
|
308
|
-
}
|
|
309
|
-
});
|
|
310
|
-
}
|
|
311
|
-
function outputForGithubActions(problems, cwd) {
|
|
312
|
-
for (const problem of problems) {
|
|
313
|
-
for (const location of problem.location.map(getLineColLocation)) {
|
|
314
|
-
let command;
|
|
315
|
-
switch (problem.severity) {
|
|
316
|
-
case 'error':
|
|
317
|
-
command = 'error';
|
|
318
|
-
break;
|
|
319
|
-
case 'warn':
|
|
320
|
-
command = 'warning';
|
|
321
|
-
break;
|
|
322
|
-
}
|
|
323
|
-
const suggest = formatDidYouMean(problem);
|
|
324
|
-
const message = suggest !== '' ? problem.message + '\n\n' + suggest : problem.message;
|
|
325
|
-
const properties = {
|
|
326
|
-
title: problem.ruleId,
|
|
327
|
-
file: isAbsoluteUrl(location.source.absoluteRef)
|
|
328
|
-
? location.source.absoluteRef
|
|
329
|
-
: path.relative(cwd, location.source.absoluteRef),
|
|
330
|
-
line: location.start.line,
|
|
331
|
-
col: location.start.col,
|
|
332
|
-
endLine: location.end?.line,
|
|
333
|
-
endColumn: location.end?.col,
|
|
334
|
-
};
|
|
335
|
-
logger.output(`::${command} ${formatProperties(properties)}::${escapeMessage(message)}\n`);
|
|
336
|
-
}
|
|
337
|
-
}
|
|
338
|
-
function formatProperties(props) {
|
|
339
|
-
return Object.entries(props)
|
|
340
|
-
.filter(([, v]) => v !== null && v !== undefined)
|
|
341
|
-
.map(([k, v]) => `${k}=${escapeProperty(v)}`)
|
|
342
|
-
.join(',');
|
|
343
|
-
}
|
|
344
|
-
function toString(v) {
|
|
345
|
-
if (v === null || v === undefined) {
|
|
346
|
-
return '';
|
|
347
|
-
}
|
|
348
|
-
else if (typeof v === 'string' || v instanceof String) {
|
|
349
|
-
return v;
|
|
350
|
-
}
|
|
351
|
-
return JSON.stringify(v);
|
|
352
|
-
}
|
|
353
|
-
function escapeMessage(v) {
|
|
354
|
-
return toString(v).replace(/%/g, '%25').replace(/\r/g, '%0D').replace(/\n/g, '%0A');
|
|
355
|
-
}
|
|
356
|
-
function escapeProperty(v) {
|
|
357
|
-
return toString(v)
|
|
358
|
-
.replace(/%/g, '%25')
|
|
359
|
-
.replace(/\r/g, '%0D')
|
|
360
|
-
.replace(/\n/g, '%0A')
|
|
361
|
-
.replace(/:/g, '%3A')
|
|
362
|
-
.replace(/,/g, '%2C');
|
|
363
|
-
}
|
|
364
|
-
}
|
|
365
|
-
//# sourceMappingURL=format.js.map
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
export { doesYamlFileExist } from './utils/does-yaml-file-exist.js';
|
|
2
|
-
export { dequal } from './utils/dequal.js';
|
|
3
|
-
export { isEmptyObject } from './utils/is-empty-object.js';
|
|
4
|
-
export { isNotEmptyArray } from './utils/is-not-empty-array.js';
|
|
5
|
-
export { isNotEmptyObject } from './utils/is-not-empty-object.js';
|
|
6
|
-
export { isPlainObject } from './utils/is-plain-object.js';
|
|
7
|
-
export { isString } from './utils/is-string.js';
|
|
8
|
-
export { isTruthy } from './utils/is-truthy.js';
|
|
9
|
-
export { keysOf } from './utils/keys-of.js';
|
|
10
|
-
export { pause } from './utils/pause.js';
|
|
11
|
-
export { pluralize } from './utils/pluralize.js';
|
|
12
|
-
export { readFileFromUrl } from './utils/read-file-from-url.js';
|
|
13
|
-
export { slash } from './utils/slash.js';
|
|
14
|
-
export { Oas2Types } from './types/oas2.js';
|
|
15
|
-
export { Oas3Types } from './types/oas3.js';
|
|
16
|
-
export { Oas3_1Types } from './types/oas3_1.js';
|
|
17
|
-
export { Oas3_2Types } from './types/oas3_2.js';
|
|
18
|
-
export { AsyncApi2Types } from './types/asyncapi2.js';
|
|
19
|
-
export { AsyncApi3Types } from './types/asyncapi3.js';
|
|
20
|
-
export { Arazzo1Types } from './types/arazzo.js';
|
|
21
|
-
export { Overlay1Types } from './types/overlay.js';
|
|
22
|
-
export { OpenRpcTypes } from './types/openrpc.js';
|
|
23
|
-
export { ConfigTypes, createConfigTypes } from './types/redocly-yaml.js';
|
|
24
|
-
export { createEntityTypes } from './types/entity.js';
|
|
25
|
-
export { normalizeTypes } from './types/index.js';
|
|
26
|
-
export { Stats } from './rules/other/stats.js';
|
|
27
|
-
export { loadConfig, loadIgnoreConfig, createConfig, findConfig, resolvePlugins, ConfigValidationError, Config, // FIXME: export it as a type
|
|
28
|
-
} from './config/index.js';
|
|
29
|
-
export * from './config/constants.js';
|
|
30
|
-
export { Source, BaseResolver, ResolveError, resolveDocument, makeDocumentFromString, } from './resolve.js';
|
|
31
|
-
export { YamlParseError } from './errors/yaml-parse-error.js';
|
|
32
|
-
export { parseYaml, stringifyYaml } from './js-yaml/index.js';
|
|
33
|
-
export { unescapePointerFragment, isRef, isAbsoluteUrl, getDir, resolvePath, escapePointerFragment, } from './ref-utils.js';
|
|
34
|
-
export { detectSpec } from './detect-spec.js';
|
|
35
|
-
export { getTypes } from './oas-types.js';
|
|
36
|
-
export { getMajorSpecVersion } from './detect-spec.js';
|
|
37
|
-
export { normalizeVisitors, } from './visitors.js';
|
|
38
|
-
export { walkDocument, } from './walk.js';
|
|
39
|
-
export { getAstNodeByPointer, getLineColLocation, getCodeframe } from './format/codeframes.js';
|
|
40
|
-
export { formatProblems, getTotals } from './format/format.js';
|
|
41
|
-
export { lint, lint as validate, lintDocument, lintFromString, lintConfig } from './lint.js';
|
|
42
|
-
export { lintEntityFile, lintEntityWithScorecardLevel, lintSchema } from './lint-entity.js';
|
|
43
|
-
export { bundle, bundleFromString } from './bundle/bundle.js';
|
|
44
|
-
export { bundleDocument } from './bundle/bundle-document.js';
|
|
45
|
-
export { mapTypeToComponent } from './bundle/bundle-visitor.js';
|
|
46
|
-
export { logger } from './logger.js';
|
|
47
|
-
export { HandledError } from './utils/error.js';
|
|
48
|
-
export { isBrowser } from './env.js';
|
|
49
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
// TODO: add a type for "types" https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/js-yaml/index.d.ts
|
|
2
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
3
|
-
// @ts-ignore
|
|
4
|
-
import { JSON_SCHEMA, types, load, dump } from 'js-yaml';
|
|
5
|
-
const DEFAULT_SCHEMA_WITHOUT_TIMESTAMP = JSON_SCHEMA.extend({
|
|
6
|
-
implicit: [types.merge],
|
|
7
|
-
explicit: [types.binary, types.omap, types.pairs, types.set],
|
|
8
|
-
});
|
|
9
|
-
export const parseYaml = (str, opts) => load(str, { schema: DEFAULT_SCHEMA_WITHOUT_TIMESTAMP, ...opts });
|
|
10
|
-
export const stringifyYaml = (obj, opts) => dump(obj, opts);
|
|
11
|
-
//# sourceMappingURL=index.js.map
|