@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.
Files changed (394) hide show
  1. package/.output/nitro.json +1 -1
  2. package/.output/server/chunks/nitro/nitro.mjs +330 -194
  3. package/.output/server/chunks/nitro/nitro.mjs.map +1 -1
  4. package/.output/server/chunks/routes/api/health.get.mjs +10 -5
  5. package/.output/server/chunks/routes/api/health.get.mjs.map +1 -1
  6. package/.output/server/index.mjs +11 -6
  7. package/.output/server/index.mjs.map +1 -1
  8. package/.output/server/node_modules/anymatch/index.js +104 -0
  9. package/.output/server/node_modules/anymatch/package.json +48 -0
  10. package/.output/server/node_modules/chokidar/handler.js +632 -0
  11. package/.output/server/node_modules/chokidar/index.js +822 -0
  12. package/.output/server/node_modules/chokidar/package.json +63 -0
  13. package/.output/server/node_modules/normalize-path/index.js +35 -0
  14. package/.output/server/node_modules/normalize-path/package.json +77 -0
  15. package/.output/server/node_modules/picomatch/index.js +1 -15
  16. package/.output/server/node_modules/picomatch/lib/constants.js +5 -6
  17. package/.output/server/node_modules/picomatch/lib/parse.js +9 -3
  18. package/.output/server/node_modules/picomatch/lib/picomatch.js +4 -3
  19. package/.output/server/node_modules/picomatch/lib/utils.js +16 -24
  20. package/.output/server/node_modules/picomatch/package.json +5 -7
  21. package/.output/server/node_modules/readdirp/index.js +272 -0
  22. package/.output/server/node_modules/readdirp/package.json +66 -0
  23. package/.output/server/package.json +6 -10
  24. package/LICENSE +21 -0
  25. package/README.md +98 -42
  26. package/package.json +17 -24
  27. package/.output/server/node_modules/@redocly/ajv/dist/2020.js +0 -55
  28. package/.output/server/node_modules/@redocly/ajv/dist/ajv.js +0 -50
  29. package/.output/server/node_modules/@redocly/ajv/dist/compile/codegen/code.js +0 -156
  30. package/.output/server/node_modules/@redocly/ajv/dist/compile/codegen/index.js +0 -697
  31. package/.output/server/node_modules/@redocly/ajv/dist/compile/codegen/scope.js +0 -143
  32. package/.output/server/node_modules/@redocly/ajv/dist/compile/errors.js +0 -123
  33. package/.output/server/node_modules/@redocly/ajv/dist/compile/index.js +0 -249
  34. package/.output/server/node_modules/@redocly/ajv/dist/compile/names.js +0 -29
  35. package/.output/server/node_modules/@redocly/ajv/dist/compile/ref_error.js +0 -12
  36. package/.output/server/node_modules/@redocly/ajv/dist/compile/resolve.js +0 -155
  37. package/.output/server/node_modules/@redocly/ajv/dist/compile/rules.js +0 -26
  38. package/.output/server/node_modules/@redocly/ajv/dist/compile/util.js +0 -178
  39. package/.output/server/node_modules/@redocly/ajv/dist/compile/validate/applicability.js +0 -19
  40. package/.output/server/node_modules/@redocly/ajv/dist/compile/validate/boolSchema.js +0 -50
  41. package/.output/server/node_modules/@redocly/ajv/dist/compile/validate/dataType.js +0 -203
  42. package/.output/server/node_modules/@redocly/ajv/dist/compile/validate/defaults.js +0 -35
  43. package/.output/server/node_modules/@redocly/ajv/dist/compile/validate/index.js +0 -534
  44. package/.output/server/node_modules/@redocly/ajv/dist/compile/validate/keyword.js +0 -124
  45. package/.output/server/node_modules/@redocly/ajv/dist/compile/validate/subschema.js +0 -81
  46. package/.output/server/node_modules/@redocly/ajv/dist/core.js +0 -632
  47. package/.output/server/node_modules/@redocly/ajv/dist/draft4.js +0 -56
  48. package/.output/server/node_modules/@redocly/ajv/dist/refs/data.json +0 -13
  49. package/.output/server/node_modules/@redocly/ajv/dist/refs/json-schema-2020-12/index.js +0 -30
  50. package/.output/server/node_modules/@redocly/ajv/dist/refs/json-schema-2020-12/meta/applicator.json +0 -48
  51. package/.output/server/node_modules/@redocly/ajv/dist/refs/json-schema-2020-12/meta/content.json +0 -17
  52. package/.output/server/node_modules/@redocly/ajv/dist/refs/json-schema-2020-12/meta/core.json +0 -51
  53. package/.output/server/node_modules/@redocly/ajv/dist/refs/json-schema-2020-12/meta/format-annotation.json +0 -14
  54. package/.output/server/node_modules/@redocly/ajv/dist/refs/json-schema-2020-12/meta/meta-data.json +0 -37
  55. package/.output/server/node_modules/@redocly/ajv/dist/refs/json-schema-2020-12/meta/unevaluated.json +0 -15
  56. package/.output/server/node_modules/@redocly/ajv/dist/refs/json-schema-2020-12/meta/validation.json +0 -90
  57. package/.output/server/node_modules/@redocly/ajv/dist/refs/json-schema-2020-12/schema.json +0 -55
  58. package/.output/server/node_modules/@redocly/ajv/dist/refs/json-schema-draft-04.json +0 -138
  59. package/.output/server/node_modules/@redocly/ajv/dist/refs/json-schema-draft-07.json +0 -151
  60. package/.output/server/node_modules/@redocly/ajv/dist/runtime/equal.js +0 -7
  61. package/.output/server/node_modules/@redocly/ajv/dist/runtime/ucs2length.js +0 -24
  62. package/.output/server/node_modules/@redocly/ajv/dist/runtime/uri.js +0 -6
  63. package/.output/server/node_modules/@redocly/ajv/dist/runtime/validation_error.js +0 -11
  64. package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/applicator/additionalItems.js +0 -49
  65. package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/applicator/additionalProperties.js +0 -107
  66. package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/applicator/allOf.js +0 -23
  67. package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/applicator/anyOf.js +0 -12
  68. package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/applicator/contains.js +0 -95
  69. package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/applicator/dependencies.js +0 -85
  70. package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/applicator/dependentSchemas.js +0 -11
  71. package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/applicator/if.js +0 -66
  72. package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/applicator/index.js +0 -44
  73. package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/applicator/items.js +0 -52
  74. package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/applicator/items2020.js +0 -30
  75. package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/applicator/not.js +0 -26
  76. package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/applicator/oneOf.js +0 -60
  77. package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/applicator/patternProperties.js +0 -75
  78. package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/applicator/prefixItems.js +0 -12
  79. package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/applicator/properties.js +0 -55
  80. package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/applicator/propertyNames.js +0 -38
  81. package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/applicator/thenElse.js +0 -13
  82. package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/code.js +0 -138
  83. package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/core/id.js +0 -10
  84. package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/core/index.js +0 -16
  85. package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/core/ref.js +0 -132
  86. package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/discriminator/index.js +0 -139
  87. package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/discriminator/types.js +0 -9
  88. package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/draft2020.js +0 -23
  89. package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/draft4.js +0 -29
  90. package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/draft7.js +0 -17
  91. package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/dynamic/dynamicAnchor.js +0 -30
  92. package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/dynamic/dynamicRef.js +0 -51
  93. package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/dynamic/index.js +0 -9
  94. package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/dynamic/recursiveAnchor.js +0 -16
  95. package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/dynamic/recursiveRef.js +0 -10
  96. package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/format/format.js +0 -92
  97. package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/format/index.js +0 -6
  98. package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/metadata.js +0 -26
  99. package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/next.js +0 -8
  100. package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/oasContext.js +0 -26
  101. package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/unevaluated/index.js +0 -7
  102. package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/unevaluated/unevaluatedItems.js +0 -40
  103. package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.js +0 -84
  104. package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/validation/const.js +0 -25
  105. package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/validation/dependentRequired.js +0 -12
  106. package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/validation/draft04/limitNumber.js +0 -43
  107. package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/validation/draft04/limitNumberExclusive.js +0 -19
  108. package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/validation/enum.js +0 -48
  109. package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/validation/index.js +0 -37
  110. package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/validation/limitContains.js +0 -15
  111. package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/validation/limitItems.js +0 -24
  112. package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/validation/limitLength.js +0 -27
  113. package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/validation/limitNumber.js +0 -27
  114. package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/validation/limitProperties.js +0 -24
  115. package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/validation/multipleOf.js +0 -26
  116. package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/validation/pattern.js +0 -24
  117. package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/validation/readOnly.js +0 -20
  118. package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/validation/required.js +0 -86
  119. package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/validation/uniqueItems.js +0 -64
  120. package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/validation/writeOnly.js +0 -20
  121. package/.output/server/node_modules/@redocly/ajv/package.json +0 -130
  122. package/.output/server/node_modules/@redocly/config/lib/common.js +0 -90
  123. package/.output/server/node_modules/@redocly/config/lib/constants.js +0 -73
  124. package/.output/server/node_modules/@redocly/config/lib/default-theme-config-schema.js +0 -54
  125. package/.output/server/node_modules/@redocly/config/lib/entities-catalog-config-schema.js +0 -186
  126. package/.output/server/node_modules/@redocly/config/lib/entities-catalog-entity-file-schema.js +0 -283
  127. package/.output/server/node_modules/@redocly/config/lib/ex-theme-config-schemas.js +0 -661
  128. package/.output/server/node_modules/@redocly/config/lib/feedback-config-schema.js +0 -88
  129. package/.output/server/node_modules/@redocly/config/lib/graphql-config-schema.js +0 -157
  130. package/.output/server/node_modules/@redocly/config/lib/index.js +0 -38
  131. package/.output/server/node_modules/@redocly/config/lib/product-override-schema.js +0 -43
  132. package/.output/server/node_modules/@redocly/config/lib/redoc-config-schema.js +0 -120
  133. package/.output/server/node_modules/@redocly/config/lib/reference-docs-config-schema.js +0 -518
  134. package/.output/server/node_modules/@redocly/config/lib/remove-property-recursively.js +0 -25
  135. package/.output/server/node_modules/@redocly/config/lib/reunite-config-schema.js +0 -103
  136. package/.output/server/node_modules/@redocly/config/lib/root-config-schema.js +0 -551
  137. package/.output/server/node_modules/@redocly/config/lib/scorecards-config-schema.js +0 -244
  138. package/.output/server/node_modules/@redocly/config/lib/types/api-functions-types.js +0 -3
  139. package/.output/server/node_modules/@redocly/config/lib/types/catalog-entity-types.js +0 -3
  140. package/.output/server/node_modules/@redocly/config/lib/types/code-walkthrough-types.js +0 -3
  141. package/.output/server/node_modules/@redocly/config/lib/types/config-types.js +0 -3
  142. package/.output/server/node_modules/@redocly/config/lib/types/index.js +0 -21
  143. package/.output/server/node_modules/@redocly/config/lib/types/portal-shared-types.js +0 -18
  144. package/.output/server/node_modules/@redocly/config/package.json +0 -28
  145. package/.output/server/node_modules/@redocly/openapi-core/lib/bundle/bundle-document.js +0 -85
  146. package/.output/server/node_modules/@redocly/openapi-core/lib/bundle/bundle-visitor.js +0 -257
  147. package/.output/server/node_modules/@redocly/openapi-core/lib/bundle/bundle.js +0 -74
  148. package/.output/server/node_modules/@redocly/openapi-core/lib/config/all.js +0 -310
  149. package/.output/server/node_modules/@redocly/openapi-core/lib/config/builtIn.js +0 -58
  150. package/.output/server/node_modules/@redocly/openapi-core/lib/config/bundle-extends.js +0 -27
  151. package/.output/server/node_modules/@redocly/openapi-core/lib/config/config-resolvers.js +0 -335
  152. package/.output/server/node_modules/@redocly/openapi-core/lib/config/config.js +0 -338
  153. package/.output/server/node_modules/@redocly/openapi-core/lib/config/constants.js +0 -13
  154. package/.output/server/node_modules/@redocly/openapi-core/lib/config/get-resolve-config.js +0 -9
  155. package/.output/server/node_modules/@redocly/openapi-core/lib/config/group-assertion-rules.js +0 -51
  156. package/.output/server/node_modules/@redocly/openapi-core/lib/config/index.js +0 -8
  157. package/.output/server/node_modules/@redocly/openapi-core/lib/config/load.js +0 -98
  158. package/.output/server/node_modules/@redocly/openapi-core/lib/config/minimal.js +0 -289
  159. package/.output/server/node_modules/@redocly/openapi-core/lib/config/recommended-strict.js +0 -289
  160. package/.output/server/node_modules/@redocly/openapi-core/lib/config/recommended.js +0 -289
  161. package/.output/server/node_modules/@redocly/openapi-core/lib/config/rules.js +0 -35
  162. package/.output/server/node_modules/@redocly/openapi-core/lib/config/spec.js +0 -289
  163. package/.output/server/node_modules/@redocly/openapi-core/lib/config/types.js +0 -2
  164. package/.output/server/node_modules/@redocly/openapi-core/lib/config/utils.js +0 -129
  165. package/.output/server/node_modules/@redocly/openapi-core/lib/config/visitors.js +0 -88
  166. package/.output/server/node_modules/@redocly/openapi-core/lib/decorators/arazzo/index.js +0 -2
  167. package/.output/server/node_modules/@redocly/openapi-core/lib/decorators/async2/index.js +0 -2
  168. package/.output/server/node_modules/@redocly/openapi-core/lib/decorators/async3/index.js +0 -2
  169. package/.output/server/node_modules/@redocly/openapi-core/lib/decorators/common/filters/filter-helper.js +0 -65
  170. package/.output/server/node_modules/@redocly/openapi-core/lib/decorators/common/filters/filter-in.js +0 -14
  171. package/.output/server/node_modules/@redocly/openapi-core/lib/decorators/common/filters/filter-out.js +0 -14
  172. package/.output/server/node_modules/@redocly/openapi-core/lib/decorators/common/info-description-override.js +0 -21
  173. package/.output/server/node_modules/@redocly/openapi-core/lib/decorators/common/info-override.js +0 -14
  174. package/.output/server/node_modules/@redocly/openapi-core/lib/decorators/common/media-type-examples-override.js +0 -58
  175. package/.output/server/node_modules/@redocly/openapi-core/lib/decorators/common/operation-description-override.js +0 -27
  176. package/.output/server/node_modules/@redocly/openapi-core/lib/decorators/common/remove-x-internal.js +0 -68
  177. package/.output/server/node_modules/@redocly/openapi-core/lib/decorators/common/tag-description-override.js +0 -23
  178. package/.output/server/node_modules/@redocly/openapi-core/lib/decorators/oas2/index.js +0 -19
  179. package/.output/server/node_modules/@redocly/openapi-core/lib/decorators/oas2/remove-unused-components.js +0 -88
  180. package/.output/server/node_modules/@redocly/openapi-core/lib/decorators/oas3/index.js +0 -21
  181. package/.output/server/node_modules/@redocly/openapi-core/lib/decorators/oas3/remove-unused-components.js +0 -116
  182. package/.output/server/node_modules/@redocly/openapi-core/lib/decorators/openrpc/index.js +0 -2
  183. package/.output/server/node_modules/@redocly/openapi-core/lib/decorators/overlay1/index.js +0 -2
  184. package/.output/server/node_modules/@redocly/openapi-core/lib/detect-spec.js +0 -79
  185. package/.output/server/node_modules/@redocly/openapi-core/lib/env.js +0 -5
  186. package/.output/server/node_modules/@redocly/openapi-core/lib/errors/yaml-parse-error.js +0 -14
  187. package/.output/server/node_modules/@redocly/openapi-core/lib/format/codeframes.js +0 -177
  188. package/.output/server/node_modules/@redocly/openapi-core/lib/format/format.js +0 -365
  189. package/.output/server/node_modules/@redocly/openapi-core/lib/index.js +0 -49
  190. package/.output/server/node_modules/@redocly/openapi-core/lib/js-yaml/index.js +0 -11
  191. package/.output/server/node_modules/@redocly/openapi-core/lib/lint-entity.js +0 -171
  192. package/.output/server/node_modules/@redocly/openapi-core/lib/lint.js +0 -123
  193. package/.output/server/node_modules/@redocly/openapi-core/lib/logger.js +0 -56
  194. package/.output/server/node_modules/@redocly/openapi-core/lib/oas-types.js +0 -35
  195. package/.output/server/node_modules/@redocly/openapi-core/lib/ref-utils.js +0 -106
  196. package/.output/server/node_modules/@redocly/openapi-core/lib/resolve.js +0 -326
  197. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/ajv.js +0 -106
  198. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/arazzo/criteria-unique.js +0 -68
  199. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/arazzo/index.js +0 -52
  200. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/arazzo/outputs-defined.js +0 -139
  201. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/arazzo/parameters-unique.js +0 -27
  202. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/arazzo/requestBody-replacements-unique.js +0 -30
  203. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/arazzo/sourceDescription-type.js +0 -19
  204. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/arazzo/sourceDescriptions-name-unique.js +0 -21
  205. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/arazzo/sourceDescriptions-not-empty.js +0 -15
  206. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/arazzo/step-onFailure-unique.js +0 -27
  207. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/arazzo/step-onSuccess-unique.js +0 -27
  208. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/arazzo/stepId-unique.js +0 -23
  209. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/arazzo/workflow-dependsOn.js +0 -53
  210. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/arazzo/workflowId-unique.js +0 -19
  211. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/async2/channels-kebab-case.js +0 -16
  212. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/async2/index.js +0 -32
  213. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/async2/no-channel-trailing-slash.js +0 -13
  214. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/async3/channels-kebab-case.js +0 -16
  215. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/async3/index.js +0 -32
  216. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/async3/no-channel-trailing-slash.js +0 -13
  217. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/catalog-entity/entity-key-valid.js +0 -39
  218. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/assertions/asserts.js +0 -269
  219. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/assertions/index.js +0 -22
  220. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/assertions/utils.js +0 -215
  221. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/info-contact.js +0 -14
  222. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/info-license-strict.js +0 -23
  223. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/info-license.js +0 -14
  224. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/no-ambiguous-paths.js +0 -42
  225. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/no-duplicated-tag-names.js +0 -21
  226. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/no-enum-type-mismatch.js +0 -38
  227. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/no-http-verbs-in-paths.js +0 -31
  228. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/no-identical-paths.js +0 -21
  229. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/no-invalid-parameter-examples.js +0 -32
  230. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/no-invalid-schema-examples.js +0 -34
  231. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/no-path-trailing-slash.js +0 -13
  232. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/no-required-schema-properties-undefined.js +0 -78
  233. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/no-schema-type-mismatch.js +0 -19
  234. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/no-unresolved-refs.js +0 -42
  235. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/operation-2xx-response.js +0 -20
  236. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/operation-4xx-response.js +0 -20
  237. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/operation-description.js +0 -9
  238. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/operation-operationId-unique.js +0 -17
  239. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/operation-operationId-url-safe.js +0 -15
  240. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/operation-operationId.js +0 -13
  241. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/operation-parameters-unique.js +0 -37
  242. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/operation-singular-tag.js +0 -13
  243. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/operation-summary.js +0 -9
  244. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/operation-tag-defined.js +0 -27
  245. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/parameter-description.js +0 -19
  246. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/path-declaration-must-exist.js +0 -13
  247. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/path-http-verbs-order.js +0 -23
  248. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/path-not-include-query.js +0 -15
  249. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/path-params-defined.js +0 -125
  250. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/path-segment-plural.js +0 -30
  251. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/paths-kebab-case.js +0 -17
  252. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/required-string-property-missing-min-length.js +0 -34
  253. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/response-contains-header.js +0 -26
  254. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/scalar-property-missing-example.js +0 -39
  255. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/security-defined.js +0 -62
  256. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/spec-strict-refs.js +0 -27
  257. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/struct.js +0 -150
  258. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/tag-description.js +0 -9
  259. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/tags-alphabetical.js +0 -18
  260. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/oas2/boolean-parameter-prefixes.js +0 -19
  261. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/oas2/index.js +0 -93
  262. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/oas2/request-mime-type.js +0 -14
  263. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/oas2/response-contains-property.js +0 -34
  264. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/oas2/response-mime-type.js +0 -14
  265. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/oas3/array-parameter-serialization.js +0 -26
  266. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/oas3/boolean-parameter-prefixes.js +0 -21
  267. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/oas3/component-name-unique.js +0 -130
  268. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/oas3/index.js +0 -129
  269. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/oas3/no-empty-servers.js +0 -20
  270. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/oas3/no-example-value-and-externalValue.js +0 -13
  271. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/oas3/no-invalid-media-type-examples.js +0 -59
  272. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/oas3/no-server-example.com.js +0 -15
  273. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/oas3/no-server-trailing-slash.js +0 -15
  274. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/oas3/no-server-variables-empty-enum.js +0 -58
  275. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/oas3/no-undefined-server-variable.js +0 -28
  276. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/oas3/no-unused-components.js +0 -83
  277. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/oas3/nullable-type-sibling.js +0 -15
  278. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/oas3/operation-4xx-problem-details-rfc7807.js +0 -33
  279. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/oas3/request-mime-type.js +0 -28
  280. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/oas3/response-contains-property.js +0 -36
  281. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/oas3/response-mime-type.js +0 -28
  282. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/oas3/spec-components-invalid-map-name.js +0 -59
  283. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/oas3/spec-discriminator-defaultMapping.js +0 -32
  284. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/oas3/spec-example-values.js +0 -31
  285. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/oas3/spec-no-invalid-encoding-combinations.js +0 -16
  286. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/oas3/spec-no-invalid-tag-parents.js +0 -38
  287. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/oas3/spec-querystring-parameters.js +0 -65
  288. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/openrpc/index.js +0 -20
  289. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/openrpc/no-unused-components.js +0 -82
  290. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/openrpc/spec-no-duplicated-method-params.js +0 -28
  291. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/openrpc/spec-no-required-params-after-optional.js +0 -31
  292. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/other/stats.js +0 -74
  293. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/overlay1/index.js +0 -12
  294. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/respect/no-criteria-xpath.js +0 -20
  295. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/respect/no-x-security-both-scheme-and-scheme-name.js +0 -30
  296. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/respect/no-x-security-scheme-name-without-openapi.js +0 -25
  297. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/respect/respect-supported-versions.js +0 -18
  298. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/respect/x-security-scheme-name-reference.js +0 -35
  299. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/respect/x-security-scheme-required-values.js +0 -60
  300. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/utils.js +0 -172
  301. package/.output/server/node_modules/@redocly/openapi-core/lib/types/arazzo.js +0 -482
  302. package/.output/server/node_modules/@redocly/openapi-core/lib/types/asyncapi2.js +0 -1157
  303. package/.output/server/node_modules/@redocly/openapi-core/lib/types/asyncapi3.js +0 -511
  304. package/.output/server/node_modules/@redocly/openapi-core/lib/types/entity.js +0 -32
  305. package/.output/server/node_modules/@redocly/openapi-core/lib/types/index.js +0 -90
  306. package/.output/server/node_modules/@redocly/openapi-core/lib/types/json-schema-adapter.js +0 -174
  307. package/.output/server/node_modules/@redocly/openapi-core/lib/types/json-schema-draft7.shared.js +0 -101
  308. package/.output/server/node_modules/@redocly/openapi-core/lib/types/oas2.js +0 -454
  309. package/.output/server/node_modules/@redocly/openapi-core/lib/types/oas3.js +0 -828
  310. package/.output/server/node_modules/@redocly/openapi-core/lib/types/oas3_1.js +0 -292
  311. package/.output/server/node_modules/@redocly/openapi-core/lib/types/oas3_2.js +0 -306
  312. package/.output/server/node_modules/@redocly/openapi-core/lib/types/openrpc.js +0 -360
  313. package/.output/server/node_modules/@redocly/openapi-core/lib/types/overlay.js +0 -61
  314. package/.output/server/node_modules/@redocly/openapi-core/lib/types/redocly-yaml.js +0 -555
  315. package/.output/server/node_modules/@redocly/openapi-core/lib/typings/arazzo.js +0 -3
  316. package/.output/server/node_modules/@redocly/openapi-core/lib/utils/assign-config.js +0 -28
  317. package/.output/server/node_modules/@redocly/openapi-core/lib/utils/dequal.js +0 -36
  318. package/.output/server/node_modules/@redocly/openapi-core/lib/utils/does-yaml-file-exist.js +0 -7
  319. package/.output/server/node_modules/@redocly/openapi-core/lib/utils/error.js +0 -3
  320. package/.output/server/node_modules/@redocly/openapi-core/lib/utils/get-intersection-length.js +0 -11
  321. package/.output/server/node_modules/@redocly/openapi-core/lib/utils/get-matching-status-code-range.js +0 -4
  322. package/.output/server/node_modules/@redocly/openapi-core/lib/utils/get-own.js +0 -4
  323. package/.output/server/node_modules/@redocly/openapi-core/lib/utils/identity.js +0 -4
  324. package/.output/server/node_modules/@redocly/openapi-core/lib/utils/is-custom-rule-id.js +0 -4
  325. package/.output/server/node_modules/@redocly/openapi-core/lib/utils/is-defined.js +0 -4
  326. package/.output/server/node_modules/@redocly/openapi-core/lib/utils/is-empty-array.js +0 -4
  327. package/.output/server/node_modules/@redocly/openapi-core/lib/utils/is-empty-object.js +0 -5
  328. package/.output/server/node_modules/@redocly/openapi-core/lib/utils/is-not-empty-array.js +0 -4
  329. package/.output/server/node_modules/@redocly/openapi-core/lib/utils/is-not-empty-object.js +0 -6
  330. package/.output/server/node_modules/@redocly/openapi-core/lib/utils/is-not-string.js +0 -5
  331. package/.output/server/node_modules/@redocly/openapi-core/lib/utils/is-ordered.js +0 -27
  332. package/.output/server/node_modules/@redocly/openapi-core/lib/utils/is-path-parameter.js +0 -4
  333. package/.output/server/node_modules/@redocly/openapi-core/lib/utils/is-plain-object.js +0 -4
  334. package/.output/server/node_modules/@redocly/openapi-core/lib/utils/is-string.js +0 -4
  335. package/.output/server/node_modules/@redocly/openapi-core/lib/utils/is-truthy.js +0 -4
  336. package/.output/server/node_modules/@redocly/openapi-core/lib/utils/keys-of.js +0 -6
  337. package/.output/server/node_modules/@redocly/openapi-core/lib/utils/make-ref-id.js +0 -4
  338. package/.output/server/node_modules/@redocly/openapi-core/lib/utils/next-tick.js +0 -6
  339. package/.output/server/node_modules/@redocly/openapi-core/lib/utils/oas-has-component.js +0 -4
  340. package/.output/server/node_modules/@redocly/openapi-core/lib/utils/omit.js +0 -8
  341. package/.output/server/node_modules/@redocly/openapi-core/lib/utils/pause.js +0 -4
  342. package/.output/server/node_modules/@redocly/openapi-core/lib/utils/pluralize.js +0 -8
  343. package/.output/server/node_modules/@redocly/openapi-core/lib/utils/read-file-from-url.js +0 -26
  344. package/.output/server/node_modules/@redocly/openapi-core/lib/utils/regex-from-string.js +0 -5
  345. package/.output/server/node_modules/@redocly/openapi-core/lib/utils/scorecards.js +0 -99
  346. package/.output/server/node_modules/@redocly/openapi-core/lib/utils/slash.js +0 -11
  347. package/.output/server/node_modules/@redocly/openapi-core/lib/utils/split-camel-case-into-words.js +0 -13
  348. package/.output/server/node_modules/@redocly/openapi-core/lib/utils/stack.js +0 -7
  349. package/.output/server/node_modules/@redocly/openapi-core/lib/utils/validate-mime-type.js +0 -31
  350. package/.output/server/node_modules/@redocly/openapi-core/lib/utils/yaml-fs-helper.js +0 -23
  351. package/.output/server/node_modules/@redocly/openapi-core/lib/visitors.js +0 -177
  352. package/.output/server/node_modules/@redocly/openapi-core/lib/walk.js +0 -303
  353. package/.output/server/node_modules/@redocly/openapi-core/package.json +0 -74
  354. package/.output/server/node_modules/ajv-formats/dist/formats.js +0 -208
  355. package/.output/server/node_modules/ajv-formats/dist/index.js +0 -37
  356. package/.output/server/node_modules/ajv-formats/dist/limit.js +0 -69
  357. package/.output/server/node_modules/ajv-formats/package.json +0 -74
  358. package/.output/server/node_modules/colorette/index.js +0 -82
  359. package/.output/server/node_modules/colorette/package.json +0 -39
  360. package/.output/server/node_modules/js-levenshtein/index.js +0 -105
  361. package/.output/server/node_modules/js-levenshtein/package.json +0 -49
  362. package/.output/server/node_modules/pluralize/package.json +0 -40
  363. package/.output/server/node_modules/pluralize/pluralize.js +0 -503
  364. package/.output/server/node_modules/yaml-ast-parser/dist/src/common.js +0 -45
  365. package/.output/server/node_modules/yaml-ast-parser/dist/src/dumper.js +0 -644
  366. package/.output/server/node_modules/yaml-ast-parser/dist/src/exception.js +0 -40
  367. package/.output/server/node_modules/yaml-ast-parser/dist/src/index.js +0 -22
  368. package/.output/server/node_modules/yaml-ast-parser/dist/src/loader.js +0 -1416
  369. package/.output/server/node_modules/yaml-ast-parser/dist/src/mark.js +0 -62
  370. package/.output/server/node_modules/yaml-ast-parser/dist/src/scalarInference.js +0 -82
  371. package/.output/server/node_modules/yaml-ast-parser/dist/src/schema/core.js +0 -8
  372. package/.output/server/node_modules/yaml-ast-parser/dist/src/schema/default_full.js +0 -14
  373. package/.output/server/node_modules/yaml-ast-parser/dist/src/schema/default_safe.js +0 -19
  374. package/.output/server/node_modules/yaml-ast-parser/dist/src/schema/failsafe.js +0 -10
  375. package/.output/server/node_modules/yaml-ast-parser/dist/src/schema/json.js +0 -14
  376. package/.output/server/node_modules/yaml-ast-parser/dist/src/schema.js +0 -78
  377. package/.output/server/node_modules/yaml-ast-parser/dist/src/type/binary.js +0 -92
  378. package/.output/server/node_modules/yaml-ast-parser/dist/src/type/bool.js +0 -32
  379. package/.output/server/node_modules/yaml-ast-parser/dist/src/type/float.js +0 -95
  380. package/.output/server/node_modules/yaml-ast-parser/dist/src/type/int.js +0 -155
  381. package/.output/server/node_modules/yaml-ast-parser/dist/src/type/js/regexp.js +0 -64
  382. package/.output/server/node_modules/yaml-ast-parser/dist/src/type/js/undefined.js +0 -22
  383. package/.output/server/node_modules/yaml-ast-parser/dist/src/type/map.js +0 -7
  384. package/.output/server/node_modules/yaml-ast-parser/dist/src/type/merge.js +0 -10
  385. package/.output/server/node_modules/yaml-ast-parser/dist/src/type/null.js +0 -30
  386. package/.output/server/node_modules/yaml-ast-parser/dist/src/type/omap.js +0 -46
  387. package/.output/server/node_modules/yaml-ast-parser/dist/src/type/pairs.js +0 -55
  388. package/.output/server/node_modules/yaml-ast-parser/dist/src/type/seq.js +0 -7
  389. package/.output/server/node_modules/yaml-ast-parser/dist/src/type/set.js +0 -22
  390. package/.output/server/node_modules/yaml-ast-parser/dist/src/type/str.js +0 -7
  391. package/.output/server/node_modules/yaml-ast-parser/dist/src/type/timestamp.js +0 -70
  392. package/.output/server/node_modules/yaml-ast-parser/dist/src/type.js +0 -54
  393. package/.output/server/node_modules/yaml-ast-parser/dist/src/yamlAST.js +0 -82
  394. package/.output/server/node_modules/yaml-ast-parser/package.json +0 -39
@@ -1,269 +0,0 @@
1
- import { isPlainObject } from '../../../utils/is-plain-object.js';
2
- import { isString as runOnValue } from '../../../utils/is-string.js';
3
- import { isTruthy } from '../../../utils/is-truthy.js';
4
- import { getIntersectionLength } from '../../../utils/get-intersection-length.js';
5
- import { isOrdered } from '../../../utils/is-ordered.js';
6
- import { regexFromString } from '../../../utils/regex-from-string.js';
7
- export const runOnKeysSet = new Set([
8
- 'mutuallyExclusive',
9
- 'mutuallyRequired',
10
- 'enum',
11
- 'pattern',
12
- 'notPattern',
13
- 'minLength',
14
- 'maxLength',
15
- 'casing',
16
- 'sortOrder',
17
- 'disallowed',
18
- 'required',
19
- 'requireAny',
20
- 'ref',
21
- 'const',
22
- 'defined', // In case if `property` for assertions is not added
23
- ]);
24
- export const runOnValuesSet = new Set([
25
- 'pattern',
26
- 'notPattern',
27
- 'enum',
28
- 'defined',
29
- 'nonEmpty',
30
- 'minLength',
31
- 'maxLength',
32
- 'casing',
33
- 'sortOrder',
34
- 'ref',
35
- 'const',
36
- ]);
37
- export const asserts = {
38
- pattern: (value, condition, { baseLocation, rawValue }) => {
39
- if (typeof value === 'undefined' || isPlainObject(value))
40
- return []; // property doesn't exist or is an object, no need to lint it with this assert
41
- const values = Array.isArray(value) ? value : [value];
42
- const regex = regexFromString(condition);
43
- return values
44
- .map((_val) => !regex?.test(_val) && {
45
- message: `"${_val}" should match a regex ${condition}`,
46
- location: runOnValue(value)
47
- ? baseLocation
48
- : isPlainObject(rawValue)
49
- ? baseLocation.child(_val).key()
50
- : baseLocation.key(),
51
- })
52
- .filter(isTruthy);
53
- },
54
- notPattern: (value, condition, { baseLocation, rawValue }) => {
55
- if (typeof value === 'undefined' || isPlainObject(value))
56
- return []; // property doesn't exist or is an object, no need to lint it with this assert
57
- const values = Array.isArray(value) ? value : [value];
58
- const regex = regexFromString(condition);
59
- return values
60
- .map((_val) => regex?.test(_val) && {
61
- message: `"${_val}" should not match a regex ${condition}`,
62
- location: runOnValue(value)
63
- ? baseLocation
64
- : isPlainObject(rawValue)
65
- ? baseLocation.child(_val).key()
66
- : baseLocation.key(),
67
- })
68
- .filter(isTruthy);
69
- },
70
- enum: (value, condition, { baseLocation }) => {
71
- if (typeof value === 'undefined' || isPlainObject(value))
72
- return []; // property doesn't exist or is an object, no need to lint it with this assert
73
- const values = Array.isArray(value) ? value : [value];
74
- return values
75
- .map((_val) => !condition.includes(_val) && {
76
- message: `"${_val}" should be one of the predefined values`,
77
- location: runOnValue(value) ? baseLocation : baseLocation.child(_val).key(),
78
- })
79
- .filter(isTruthy);
80
- },
81
- defined: (value, condition = true, { baseLocation }) => {
82
- const isDefined = typeof value !== 'undefined';
83
- const isValid = condition ? isDefined : !isDefined;
84
- return isValid
85
- ? []
86
- : [
87
- {
88
- message: condition ? `Should be defined` : 'Should be not defined',
89
- location: baseLocation,
90
- },
91
- ];
92
- },
93
- required: (value, keys, { baseLocation }) => {
94
- return keys
95
- .map((requiredKey) => !value.includes(requiredKey) && {
96
- message: `${requiredKey} is required`,
97
- location: baseLocation.key(),
98
- })
99
- .filter(isTruthy);
100
- },
101
- disallowed: (value, condition, { baseLocation }) => {
102
- if (typeof value === 'undefined' || isPlainObject(value))
103
- return []; // property doesn't exist or is an object, no need to lint it with this assert
104
- const values = Array.isArray(value) ? value : [value];
105
- return values
106
- .map((_val) => condition.includes(_val) && {
107
- message: `"${_val}" is disallowed`,
108
- location: runOnValue(value) ? baseLocation : baseLocation.child(_val).key(),
109
- })
110
- .filter(isTruthy);
111
- },
112
- const: (value, condition, { baseLocation }) => {
113
- if (typeof value === 'undefined')
114
- return [];
115
- if (Array.isArray(value)) {
116
- return value
117
- .map((_val) => condition !== _val && {
118
- message: `"${_val}" should be equal ${condition} `,
119
- location: runOnValue(value) ? baseLocation : baseLocation.child(_val).key(),
120
- })
121
- .filter(isTruthy);
122
- }
123
- else {
124
- return value !== condition
125
- ? [
126
- {
127
- message: `${value} should be equal ${condition}`,
128
- location: baseLocation,
129
- },
130
- ]
131
- : [];
132
- }
133
- },
134
- nonEmpty: (value, condition = true, { baseLocation }) => {
135
- const isEmpty = typeof value === 'undefined' || value === null || value === '';
136
- const isValid = condition ? !isEmpty : isEmpty;
137
- return isValid
138
- ? []
139
- : [
140
- {
141
- message: condition ? `Should not be empty` : 'Should be empty',
142
- location: baseLocation,
143
- },
144
- ];
145
- },
146
- minLength: (value, condition, { baseLocation }) => {
147
- if (typeof value === 'undefined' || value.length >= condition)
148
- return []; // property doesn't exist, no need to lint it with this assert
149
- return [
150
- {
151
- message: `Should have at least ${condition} characters`,
152
- location: baseLocation,
153
- },
154
- ];
155
- },
156
- maxLength: (value, condition, { baseLocation }) => {
157
- if (typeof value === 'undefined' || value.length <= condition)
158
- return []; // property doesn't exist, no need to lint it with this assert
159
- return [
160
- {
161
- message: `Should have at most ${condition} characters`,
162
- location: baseLocation,
163
- },
164
- ];
165
- },
166
- casing: (value, condition, { baseLocation }) => {
167
- if (typeof value === 'undefined' || isPlainObject(value))
168
- return []; // property doesn't exist or is an object, no need to lint it with this assert
169
- const values = Array.isArray(value) ? value : [value];
170
- const casingRegexes = {
171
- camelCase: /^[a-z][a-zA-Z0-9]*$/g,
172
- 'kebab-case': /^([a-z][a-z0-9]*)(-[a-z0-9]+)*$/g,
173
- snake_case: /^([a-z][a-z0-9]*)(_[a-z0-9]+)*$/g,
174
- PascalCase: /^[A-Z][a-zA-Z0-9]+$/g,
175
- MACRO_CASE: /^([A-Z][A-Z0-9]*)(_[A-Z0-9]+)*$/g,
176
- 'COBOL-CASE': /^([A-Z][A-Z0-9]*)(-[A-Z0-9]+)*$/g,
177
- flatcase: /^[a-z][a-z0-9]+$/g,
178
- };
179
- return values
180
- .map((_val) => !_val.match(casingRegexes[condition]) && {
181
- message: `"${_val}" should use ${condition}`,
182
- location: runOnValue(value) ? baseLocation : baseLocation.child(_val).key(),
183
- })
184
- .filter(isTruthy);
185
- },
186
- sortOrder: (value, condition, { baseLocation }) => {
187
- const direction = condition.direction || condition;
188
- const property = condition.property;
189
- if (Array.isArray(value) && value.length > 0 && isPlainObject(value[0]) && !property) {
190
- return [
191
- {
192
- message: `Please define a property to sort objects by`,
193
- location: baseLocation,
194
- },
195
- ];
196
- }
197
- if (typeof value === 'undefined' || isOrdered(value, condition))
198
- return [];
199
- return [
200
- {
201
- message: `Should be sorted in ${direction === 'asc' ? 'an ascending' : 'a descending'} order${property ? ` by property ${property}` : ''}`,
202
- location: baseLocation,
203
- },
204
- ];
205
- },
206
- mutuallyExclusive: (value, condition, { baseLocation }) => {
207
- if (getIntersectionLength(value, condition) < 2)
208
- return [];
209
- return [
210
- {
211
- message: `${condition.join(', ')} keys should be mutually exclusive`,
212
- location: baseLocation.key(),
213
- },
214
- ];
215
- },
216
- mutuallyRequired: (value, condition, { baseLocation }) => {
217
- const isValid = getIntersectionLength(value, condition) > 0
218
- ? getIntersectionLength(value, condition) === condition.length
219
- : true;
220
- return isValid
221
- ? []
222
- : [
223
- {
224
- message: `Properties ${condition.join(', ')} are mutually required`,
225
- location: baseLocation.key(),
226
- },
227
- ];
228
- },
229
- requireAny: (value, condition, { baseLocation }) => {
230
- return getIntersectionLength(value, condition) >= 1
231
- ? []
232
- : [
233
- {
234
- message: `Should have any of ${condition.join(', ')}`,
235
- location: baseLocation.key(),
236
- },
237
- ];
238
- },
239
- ref: (_value, condition, { baseLocation, rawValue }) => {
240
- if (typeof rawValue === 'undefined')
241
- return []; // property doesn't exist, no need to lint it with this assert
242
- const hasRef = rawValue.hasOwnProperty('$ref');
243
- if (typeof condition === 'boolean') {
244
- const isValid = condition ? hasRef : !hasRef;
245
- return isValid
246
- ? []
247
- : [
248
- {
249
- message: condition ? `should use $ref` : 'should not use $ref',
250
- location: hasRef ? baseLocation : baseLocation.key(),
251
- },
252
- ];
253
- }
254
- const regex = regexFromString(condition);
255
- const isValid = hasRef && regex?.test(rawValue['$ref']);
256
- return isValid
257
- ? []
258
- : [
259
- {
260
- message: `$ref value should match ${condition}`,
261
- location: hasRef ? baseLocation : baseLocation.key(),
262
- },
263
- ];
264
- },
265
- };
266
- export function buildAssertCustomFunction(fn) {
267
- return (value, options, ctx) => fn.call(null, value, options, ctx);
268
- }
269
- //# sourceMappingURL=asserts.js.map
@@ -1,22 +0,0 @@
1
- import { buildSubjectVisitor, buildVisitorObject } from './utils.js';
2
- import { isString } from '../../../utils/is-string.js';
3
- import { isPlainObject } from '../../../utils/is-plain-object.js';
4
- export const Assertions = (opts) => {
5
- const visitors = [];
6
- // As 'Assertions' has an array of asserts,
7
- // that array spreads into an 'opts' object on init rules phase here
8
- // https://github.com/Redocly/redocly-cli/blob/main/packages/core/src/config/config.ts#L311
9
- // that is why we need to iterate through 'opts' values;
10
- // before - filter only object 'opts' values
11
- const assertions = Object.values(opts).filter((opt) => isPlainObject(opt));
12
- for (const [_, assertion] of assertions.entries()) {
13
- if (!isString(assertion.subject.type)) {
14
- throw new Error(`${assertion.assertionId}: 'type' (String) is required`);
15
- }
16
- const subjectVisitor = buildSubjectVisitor(assertion.assertionId, assertion);
17
- const visitorObject = buildVisitorObject(assertion, subjectVisitor);
18
- visitors.push(visitorObject);
19
- }
20
- return visitors;
21
- };
22
- //# sourceMappingURL=index.js.map
@@ -1,215 +0,0 @@
1
- import { asserts, runOnKeysSet, runOnValuesSet } from './asserts.js';
2
- import { colorize } from '../../../logger.js';
3
- import { isRef, isAbsoluteUrl } from '../../../ref-utils.js';
4
- import { isTruthy } from '../../../utils/is-truthy.js';
5
- import { keysOf } from '../../../utils/keys-of.js';
6
- import { isString } from '../../../utils/is-string.js';
7
- import { regexFromString } from '../../../utils/regex-from-string.js';
8
- const assertionMessageTemplates = {
9
- problems: '{{problems}}',
10
- assertionName: '{{assertionName}}',
11
- nodeType: '{{nodeType}}',
12
- key: '{{key}}',
13
- property: '{{property}}',
14
- file: '{{file}}',
15
- pointer: '{{pointer}}',
16
- };
17
- function getPredicatesFromLocators(locators) {
18
- const { filterInParentKeys, filterOutParentKeys, matchParentKeys } = locators;
19
- const keyMatcher = matchParentKeys && regexFromString(matchParentKeys);
20
- const matchKeysPredicate = keyMatcher && ((key) => keyMatcher.test(key.toString()));
21
- const filterInPredicate = Array.isArray(filterInParentKeys) &&
22
- ((key) => filterInParentKeys.includes(key.toString()));
23
- const filterOutPredicate = Array.isArray(filterOutParentKeys) &&
24
- ((key) => !filterOutParentKeys.includes(key.toString()));
25
- return [matchKeysPredicate, filterInPredicate, filterOutPredicate].filter(isTruthy);
26
- }
27
- export function getAssertsToApply(assertion) {
28
- const assertsToApply = keysOf(asserts)
29
- .filter((assertName) => assertion.assertions[assertName] !== undefined)
30
- .map((assertName) => {
31
- return {
32
- name: assertName,
33
- conditions: assertion.assertions[assertName],
34
- runsOnKeys: runOnKeysSet.has(assertName),
35
- runsOnValues: runOnValuesSet.has(assertName),
36
- };
37
- });
38
- const shouldRunOnKeys = assertsToApply.find((assert) => assert.runsOnKeys && !assert.runsOnValues);
39
- const shouldRunOnValues = assertsToApply.find((assert) => assert.runsOnValues && !assert.runsOnKeys);
40
- if (shouldRunOnValues && !assertion.subject.property) {
41
- throw new Error(`The '${shouldRunOnValues.name}' assertion can't be used on all keys. Please provide a single property.`);
42
- }
43
- if (shouldRunOnKeys && assertion.subject.property) {
44
- throw new Error(`The '${shouldRunOnKeys.name}' assertion can't be used on properties. Please remove the 'property' key.`);
45
- }
46
- return assertsToApply;
47
- }
48
- function getAssertionProperties({ subject }) {
49
- return (Array.isArray(subject.property) ? subject.property : [subject?.property]).filter(Boolean);
50
- }
51
- function applyAssertions(assertionDefinition, asserts, ctx) {
52
- const properties = getAssertionProperties(assertionDefinition);
53
- const assertResults = [];
54
- for (const assert of asserts) {
55
- if (properties.length) {
56
- for (const property of properties) {
57
- assertResults.push(runAssertion({
58
- assert,
59
- ctx,
60
- assertionProperty: property,
61
- }));
62
- }
63
- }
64
- else {
65
- assertResults.push(runAssertion({
66
- assert,
67
- ctx,
68
- }));
69
- }
70
- }
71
- return assertResults.flat();
72
- }
73
- export function buildVisitorObject(assertion, subjectVisitor) {
74
- const targetVisitorLocatorPredicates = getPredicatesFromLocators(assertion.subject);
75
- const targetVisitorSkipFunction = targetVisitorLocatorPredicates.length
76
- ? (_, key) => !targetVisitorLocatorPredicates.every((predicate) => predicate(key))
77
- : undefined;
78
- const targetVisitor = {
79
- [assertion.subject.type]: {
80
- enter: subjectVisitor,
81
- ...(targetVisitorSkipFunction && { skip: targetVisitorSkipFunction }),
82
- },
83
- };
84
- if (!Array.isArray(assertion.where)) {
85
- return targetVisitor;
86
- }
87
- let currentVisitorLevel = {};
88
- const visitor = currentVisitorLevel;
89
- const context = assertion.where;
90
- for (let index = 0; index < context.length; index++) {
91
- const assertionDefinitionNode = context[index];
92
- if (!isString(assertionDefinitionNode.subject?.type)) {
93
- throw new Error(`${assertion.assertionId} -> where -> [${index}]: 'type' (String) is required`);
94
- }
95
- const locatorPredicates = getPredicatesFromLocators(assertionDefinitionNode.subject);
96
- const assertsToApply = getAssertsToApply(assertionDefinitionNode);
97
- const skipFunction = (node, key, ctx) => !locatorPredicates.every((predicate) => predicate(key)) ||
98
- !!applyAssertions(assertionDefinitionNode, assertsToApply, { ...ctx, node }).length;
99
- const nodeVisitor = {
100
- ...((locatorPredicates.length || assertsToApply.length) && { skip: skipFunction }),
101
- };
102
- if (assertionDefinitionNode.subject.type === assertion.subject.type &&
103
- index === context.length - 1) {
104
- // We have to merge the visitors if the last node inside the `where` is the same as the subject.
105
- targetVisitor[assertion.subject.type] = {
106
- enter: subjectVisitor,
107
- ...((nodeVisitor.skip && { skip: nodeVisitor.skip }) ||
108
- (targetVisitorSkipFunction && {
109
- skip: (node, key, ctx // We may have locators defined on assertion level and on where level for the same node type
110
- ) => !!(nodeVisitor.skip?.(node, key, ctx) || targetVisitorSkipFunction?.(node, key)),
111
- })),
112
- };
113
- }
114
- else {
115
- currentVisitorLevel = currentVisitorLevel[assertionDefinitionNode.subject?.type] =
116
- nodeVisitor;
117
- }
118
- }
119
- currentVisitorLevel[assertion.subject.type] = targetVisitor[assertion.subject.type];
120
- return visitor;
121
- }
122
- export function buildSubjectVisitor(assertId, assertion) {
123
- return (node, ctx) => {
124
- const properties = getAssertionProperties(assertion);
125
- const defaultMessage = `${colorize.blue(assertId)} failed because the ${colorize.blue(assertion.subject.type)} ${colorize.blue(properties.join(', '))} didn't meet the assertions: ${assertionMessageTemplates.problems}`.replace(/ +/g, ' ');
126
- const problems = applyAssertions(assertion, getAssertsToApply(assertion), {
127
- ...ctx,
128
- node,
129
- });
130
- if (problems.length) {
131
- for (const problemGroup of groupProblemsByPointer(problems)) {
132
- const message = assertion.message || defaultMessage;
133
- const problemMessage = getProblemsMessage(problemGroup);
134
- const placeholders = {
135
- problems: problemMessage,
136
- assertionName: assertId,
137
- nodeType: assertion.subject.type,
138
- property: properties.join(', '),
139
- key: String(ctx.key),
140
- pointer: ctx.location.pointer,
141
- file: getFilenameFromPath(ctx.location.source.absoluteRef),
142
- };
143
- ctx.report({
144
- message: interpolateMessagePlaceholders(message, placeholders),
145
- location: getProblemsLocation(problemGroup) || ctx.location,
146
- forceSeverity: assertion.severity || 'error',
147
- suggest: assertion.suggest || [],
148
- ruleId: assertId,
149
- });
150
- }
151
- }
152
- };
153
- }
154
- function groupProblemsByPointer(problems) {
155
- const groups = {};
156
- for (const problem of problems) {
157
- if (!problem.location)
158
- continue;
159
- const pointer = problem.location.pointer;
160
- groups[pointer] = groups[pointer] || [];
161
- groups[pointer].push(problem);
162
- }
163
- return Object.values(groups);
164
- }
165
- function getProblemsLocation(problems) {
166
- return problems.length ? problems[0].location : undefined;
167
- }
168
- function getProblemsMessage(problems) {
169
- return problems.length === 1
170
- ? (problems[0].message ?? '')
171
- : problems.map((problem) => `\n- ${problem.message ?? ''}`).join('');
172
- }
173
- function getFilenameFromPath(absoluteRef) {
174
- if (isAbsoluteUrl(absoluteRef)) {
175
- const parts = absoluteRef.split('/');
176
- return parts.at(-1) || absoluteRef;
177
- }
178
- const parts = absoluteRef.split(/[/\\]/);
179
- return parts.at(-1) || absoluteRef;
180
- }
181
- function interpolateMessagePlaceholders(message, placeholders) {
182
- let result = message;
183
- for (const key of Object.keys(assertionMessageTemplates)) {
184
- const template = assertionMessageTemplates[key];
185
- const value = placeholders[key];
186
- if (!template)
187
- continue;
188
- result = result.split(template).join(value);
189
- }
190
- return result;
191
- }
192
- export function runAssertion({ assert, ctx, assertionProperty, }) {
193
- const currentLocation = assert.name === 'ref' ? ctx.rawLocation : ctx.location;
194
- if (assertionProperty) {
195
- const values = isRef(ctx.node[assertionProperty])
196
- ? ctx.resolve(ctx.node[assertionProperty])?.node
197
- : ctx.node[assertionProperty];
198
- const rawValues = ctx.rawNode[assertionProperty];
199
- const location = currentLocation.child(assertionProperty);
200
- return asserts[assert.name](values, assert.conditions, {
201
- ...ctx,
202
- baseLocation: location,
203
- rawValue: rawValues,
204
- });
205
- }
206
- else {
207
- const value = Array.isArray(ctx.node) ? ctx.node : Object.keys(ctx.node);
208
- return asserts[assert.name](value, assert.conditions, {
209
- ...ctx,
210
- rawValue: ctx.rawNode,
211
- baseLocation: currentLocation,
212
- });
213
- }
214
- }
215
- //# sourceMappingURL=utils.js.map
@@ -1,14 +0,0 @@
1
- import { missingRequiredField } from '../utils.js';
2
- export const InfoContact = () => {
3
- return {
4
- Info(info, { report, location }) {
5
- if (!info.contact) {
6
- report({
7
- message: missingRequiredField('Info', 'contact'),
8
- location: location.child('contact').key(),
9
- });
10
- }
11
- },
12
- };
13
- };
14
- //# sourceMappingURL=info-contact.js.map
@@ -1,23 +0,0 @@
1
- import { detectSpec } from '../../detect-spec.js';
2
- import { validateDefinedAndNonEmpty, validateOneOfDefinedAndNonEmpty } from '../utils.js';
3
- export const InfoLicenseStrict = () => {
4
- let specVersion;
5
- return {
6
- Root: {
7
- enter(root) {
8
- specVersion = detectSpec(root);
9
- },
10
- License: {
11
- leave(license, ctx) {
12
- if (specVersion === 'oas3_1' || specVersion === 'oas3_2') {
13
- validateOneOfDefinedAndNonEmpty(['url', 'identifier'], license, ctx);
14
- }
15
- else {
16
- validateDefinedAndNonEmpty('url', license, ctx);
17
- }
18
- },
19
- },
20
- },
21
- };
22
- };
23
- //# sourceMappingURL=info-license-strict.js.map
@@ -1,14 +0,0 @@
1
- import { missingRequiredField } from '../utils.js';
2
- export const InfoLicense = () => {
3
- return {
4
- Info(info, { report }) {
5
- if (!info.license) {
6
- report({
7
- message: missingRequiredField('Info', 'license'),
8
- location: { reportOnKey: true },
9
- });
10
- }
11
- },
12
- };
13
- };
14
- //# sourceMappingURL=info-license.js.map
@@ -1,42 +0,0 @@
1
- export const NoAmbiguousPaths = () => {
2
- return {
3
- Paths(pathMap, { report, location }) {
4
- const seenPaths = [];
5
- for (const currentPath of Object.keys(pathMap)) {
6
- const ambiguousPath = seenPaths.find((seenPath) => arePathsAmbiguous(seenPath, currentPath));
7
- if (ambiguousPath) {
8
- report({
9
- message: `Paths should resolve unambiguously. Found two ambiguous paths: \`${ambiguousPath}\` and \`${currentPath}\`.`,
10
- location: location.child([currentPath]).key(),
11
- });
12
- }
13
- seenPaths.push(currentPath);
14
- }
15
- },
16
- };
17
- };
18
- function arePathsAmbiguous(a, b) {
19
- const partsA = a.split('/');
20
- const partsB = b.split('/');
21
- if (partsA.length !== partsB.length)
22
- return false;
23
- let aVars = 0;
24
- let bVars = 0;
25
- let ambiguous = true;
26
- for (let i = 0; i < partsA.length; i++) {
27
- const aIsVar = partsA[i].match(/^{.+?}$/);
28
- const bIsVar = partsB[i].match(/^{.+?}$/);
29
- if (aIsVar || bIsVar) {
30
- if (aIsVar)
31
- aVars++;
32
- if (bIsVar)
33
- bVars++;
34
- continue;
35
- }
36
- else if (partsA[i] !== partsB[i]) {
37
- ambiguous = false;
38
- }
39
- }
40
- return ambiguous && aVars === bVars;
41
- }
42
- //# sourceMappingURL=no-ambiguous-paths.js.map
@@ -1,21 +0,0 @@
1
- import { getTagName } from '../utils.js';
2
- export const NoDuplicatedTagNames = ({ ignoreCase = false, }) => {
3
- const tagNames = new Set();
4
- return {
5
- Tag: {
6
- leave(tag, ctx) {
7
- const tagName = getTagName(tag, ignoreCase);
8
- if (tagNames.has(tagName)) {
9
- ctx.report({
10
- message: `Duplicate tag name found: '${tag.name}'.`,
11
- location: ctx.location,
12
- });
13
- }
14
- else {
15
- tagNames.add(tagName);
16
- }
17
- },
18
- },
19
- };
20
- };
21
- //# sourceMappingURL=no-duplicated-tag-names.js.map
@@ -1,38 +0,0 @@
1
- import { matchesJsonSchemaType, oasTypeOf } from '../utils.js';
2
- export const NoEnumTypeMismatch = () => {
3
- return {
4
- Schema(schema, { report, location }) {
5
- if (schema.enum && !Array.isArray(schema.enum))
6
- return;
7
- if (schema.enum && schema.type && !Array.isArray(schema.type)) {
8
- const typeMismatchedValues = schema.enum.filter((item) => !matchesJsonSchemaType(item, schema.type, schema.nullable));
9
- for (const mismatchedValue of typeMismatchedValues) {
10
- report({
11
- message: `All values of \`enum\` field must be of the same type as the \`type\` field: expected "${schema.type}" but received "${oasTypeOf(mismatchedValue)}".`,
12
- location: location.child(['enum', schema.enum.indexOf(mismatchedValue)]),
13
- });
14
- }
15
- }
16
- if (schema.enum && schema.type && Array.isArray(schema.type)) {
17
- const mismatchedResults = {};
18
- for (const enumValue of schema.enum) {
19
- mismatchedResults[enumValue] = [];
20
- for (const type of schema.type) {
21
- const valid = matchesJsonSchemaType(enumValue, type, schema.nullable);
22
- if (!valid)
23
- mismatchedResults[enumValue].push(type);
24
- }
25
- if (mismatchedResults[enumValue].length !== schema.type.length)
26
- delete mismatchedResults[enumValue];
27
- }
28
- for (const mismatchedKey of Object.keys(mismatchedResults)) {
29
- report({
30
- message: `Enum value \`${mismatchedKey}\` must be of allowed types: \`${schema.type}\`.`,
31
- location: location.child(['enum', schema.enum.indexOf(mismatchedKey)]),
32
- });
33
- }
34
- }
35
- },
36
- };
37
- };
38
- //# sourceMappingURL=no-enum-type-mismatch.js.map