@redocly/openapi-core 0.0.0-snapshot.1744801622 → 0.0.0-snapshot.1747233324

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 (651) hide show
  1. package/lib/benchmark/benches/lint-with-many-rules.bench.d.ts +2 -1
  2. package/lib/benchmark/benches/lint-with-many-rules.bench.d.ts.map +1 -0
  3. package/lib/benchmark/benches/lint-with-many-rules.bench.js +17 -19
  4. package/lib/benchmark/benches/lint-with-many-rules.bench.js.map +1 -0
  5. package/lib/benchmark/benches/lint-with-nested-rule.bench.d.ts +2 -1
  6. package/lib/benchmark/benches/lint-with-nested-rule.bench.d.ts.map +1 -0
  7. package/lib/benchmark/benches/lint-with-nested-rule.bench.js +15 -19
  8. package/lib/benchmark/benches/lint-with-nested-rule.bench.js.map +1 -0
  9. package/lib/benchmark/benches/lint-with-no-rules.bench.d.ts +2 -1
  10. package/lib/benchmark/benches/lint-with-no-rules.bench.d.ts.map +1 -0
  11. package/lib/benchmark/benches/lint-with-no-rules.bench.js +15 -19
  12. package/lib/benchmark/benches/lint-with-no-rules.bench.js.map +1 -0
  13. package/lib/benchmark/benches/lint-with-top-level-rule-report.bench.d.ts +2 -1
  14. package/lib/benchmark/benches/lint-with-top-level-rule-report.bench.d.ts.map +1 -0
  15. package/lib/benchmark/benches/lint-with-top-level-rule-report.bench.js +15 -19
  16. package/lib/benchmark/benches/lint-with-top-level-rule-report.bench.js.map +1 -0
  17. package/lib/benchmark/benches/lint-with-top-level-rule.bench.d.ts +2 -1
  18. package/lib/benchmark/benches/lint-with-top-level-rule.bench.d.ts.map +1 -0
  19. package/lib/benchmark/benches/lint-with-top-level-rule.bench.js +15 -19
  20. package/lib/benchmark/benches/lint-with-top-level-rule.bench.js.map +1 -0
  21. package/lib/benchmark/benches/recommended-oas3.bench.d.ts +2 -1
  22. package/lib/benchmark/benches/recommended-oas3.bench.d.ts.map +1 -0
  23. package/lib/benchmark/benches/recommended-oas3.bench.js +15 -18
  24. package/lib/benchmark/benches/recommended-oas3.bench.js.map +1 -0
  25. package/lib/benchmark/benches/resolve-with-no-external.bench.d.ts +2 -1
  26. package/lib/benchmark/benches/resolve-with-no-external.bench.d.ts.map +1 -0
  27. package/lib/benchmark/benches/resolve-with-no-external.bench.js +14 -17
  28. package/lib/benchmark/benches/resolve-with-no-external.bench.js.map +1 -0
  29. package/lib/benchmark/utils.d.ts +5 -4
  30. package/lib/benchmark/utils.d.ts.map +1 -0
  31. package/lib/benchmark/utils.js +11 -14
  32. package/lib/benchmark/utils.js.map +1 -0
  33. package/lib/bundle.d.ts +8 -9
  34. package/lib/bundle.d.ts.map +1 -0
  35. package/lib/bundle.js +72 -84
  36. package/lib/bundle.js.map +1 -0
  37. package/lib/config/all.d.ts +2 -1
  38. package/lib/config/all.d.ts.map +1 -0
  39. package/lib/config/all.js +2 -3
  40. package/lib/config/all.js.map +1 -0
  41. package/lib/config/builtIn.d.ts +2 -1
  42. package/lib/config/builtIn.d.ts.map +1 -0
  43. package/lib/config/builtIn.js +44 -49
  44. package/lib/config/builtIn.js.map +1 -0
  45. package/lib/config/config-resolvers.d.ts +6 -5
  46. package/lib/config/config-resolvers.d.ts.map +1 -0
  47. package/lib/config/config-resolvers.js +86 -98
  48. package/lib/config/config-resolvers.js.map +1 -0
  49. package/lib/config/config.d.ts +6 -8
  50. package/lib/config/config.d.ts.map +1 -0
  51. package/lib/config/config.js +63 -92
  52. package/lib/config/config.js.map +1 -0
  53. package/lib/config/index.d.ts +8 -7
  54. package/lib/config/index.d.ts.map +1 -0
  55. package/lib/config/index.js +8 -23
  56. package/lib/config/index.js.map +1 -0
  57. package/lib/config/load.d.ts +5 -8
  58. package/lib/config/load.d.ts.map +1 -0
  59. package/lib/config/load.js +28 -73
  60. package/lib/config/load.js.map +1 -0
  61. package/lib/config/minimal.d.ts +2 -1
  62. package/lib/config/minimal.d.ts.map +1 -0
  63. package/lib/config/minimal.js +2 -3
  64. package/lib/config/minimal.js.map +1 -0
  65. package/lib/config/recommended-strict.d.ts +2 -1
  66. package/lib/config/recommended-strict.d.ts.map +1 -0
  67. package/lib/config/recommended-strict.js +2 -3
  68. package/lib/config/recommended-strict.js.map +1 -0
  69. package/lib/config/recommended.d.ts +2 -1
  70. package/lib/config/recommended.d.ts.map +1 -0
  71. package/lib/config/recommended.js +2 -3
  72. package/lib/config/recommended.js.map +1 -0
  73. package/lib/config/rules.d.ts +4 -3
  74. package/lib/config/rules.d.ts.map +1 -0
  75. package/lib/config/rules.js +4 -6
  76. package/lib/config/rules.js.map +1 -0
  77. package/lib/config/spec.d.ts +2 -1
  78. package/lib/config/spec.d.ts.map +1 -0
  79. package/lib/config/spec.js +2 -3
  80. package/lib/config/spec.js.map +1 -0
  81. package/lib/config/types.d.ts +6 -13
  82. package/lib/config/types.d.ts.map +1 -0
  83. package/lib/config/types.js +2 -2
  84. package/lib/config/types.js.map +1 -0
  85. package/lib/config/utils.d.ts +3 -2
  86. package/lib/config/utils.d.ts.map +1 -0
  87. package/lib/config/utils.js +74 -100
  88. package/lib/config/utils.js.map +1 -0
  89. package/lib/decorators/arazzo/index.d.ts +1 -0
  90. package/lib/decorators/arazzo/index.d.ts.map +1 -0
  91. package/lib/decorators/arazzo/index.js +2 -4
  92. package/lib/decorators/arazzo/index.js.map +1 -0
  93. package/lib/decorators/async2/index.d.ts +1 -0
  94. package/lib/decorators/async2/index.d.ts.map +1 -0
  95. package/lib/decorators/async2/index.js +2 -4
  96. package/lib/decorators/async2/index.js.map +1 -0
  97. package/lib/decorators/async3/index.d.ts +1 -0
  98. package/lib/decorators/async3/index.d.ts.map +1 -0
  99. package/lib/decorators/async3/index.js +2 -4
  100. package/lib/decorators/async3/index.js.map +1 -0
  101. package/lib/decorators/common/filters/filter-helper.d.ts +2 -1
  102. package/lib/decorators/common/filters/filter-helper.d.ts.map +1 -0
  103. package/lib/decorators/common/filters/filter-helper.js +9 -12
  104. package/lib/decorators/common/filters/filter-helper.js.map +1 -0
  105. package/lib/decorators/common/filters/filter-in.d.ts +2 -1
  106. package/lib/decorators/common/filters/filter-in.d.ts.map +1 -0
  107. package/lib/decorators/common/filters/filter-in.js +5 -8
  108. package/lib/decorators/common/filters/filter-in.js.map +1 -0
  109. package/lib/decorators/common/filters/filter-out.d.ts +2 -1
  110. package/lib/decorators/common/filters/filter-out.d.ts.map +1 -0
  111. package/lib/decorators/common/filters/filter-out.js +5 -8
  112. package/lib/decorators/common/filters/filter-out.js.map +1 -0
  113. package/lib/decorators/common/info-description-override.d.ts +2 -1
  114. package/lib/decorators/common/info-description-override.d.ts.map +1 -0
  115. package/lib/decorators/common/info-description-override.js +4 -7
  116. package/lib/decorators/common/info-description-override.js.map +1 -0
  117. package/lib/decorators/common/info-override.d.ts +2 -1
  118. package/lib/decorators/common/info-override.d.ts.map +1 -0
  119. package/lib/decorators/common/info-override.js +2 -5
  120. package/lib/decorators/common/info-override.js.map +1 -0
  121. package/lib/decorators/common/media-type-examples-override.d.ts +2 -1
  122. package/lib/decorators/common/media-type-examples-override.d.ts.map +1 -0
  123. package/lib/decorators/common/media-type-examples-override.js +7 -10
  124. package/lib/decorators/common/media-type-examples-override.js.map +1 -0
  125. package/lib/decorators/common/operation-description-override.d.ts +2 -1
  126. package/lib/decorators/common/operation-description-override.d.ts.map +1 -0
  127. package/lib/decorators/common/operation-description-override.js +4 -7
  128. package/lib/decorators/common/operation-description-override.js.map +1 -0
  129. package/lib/decorators/common/remove-x-internal.d.ts +2 -1
  130. package/lib/decorators/common/remove-x-internal.d.ts.map +1 -0
  131. package/lib/decorators/common/remove-x-internal.js +11 -14
  132. package/lib/decorators/common/remove-x-internal.js.map +1 -0
  133. package/lib/decorators/common/tag-description-override.d.ts +2 -1
  134. package/lib/decorators/common/tag-description-override.d.ts.map +1 -0
  135. package/lib/decorators/common/tag-description-override.js +4 -7
  136. package/lib/decorators/common/tag-description-override.js.map +1 -0
  137. package/lib/decorators/oas2/index.d.ts +2 -2
  138. package/lib/decorators/oas2/index.d.ts.map +1 -0
  139. package/lib/decorators/oas2/index.js +16 -20
  140. package/lib/decorators/oas2/index.js.map +1 -0
  141. package/lib/decorators/oas2/remove-unused-components.d.ts +2 -1
  142. package/lib/decorators/oas2/remove-unused-components.d.ts.map +1 -0
  143. package/lib/decorators/oas2/remove-unused-components.js +4 -7
  144. package/lib/decorators/oas2/remove-unused-components.js.map +1 -0
  145. package/lib/decorators/oas3/index.d.ts +2 -2
  146. package/lib/decorators/oas3/index.d.ts.map +1 -0
  147. package/lib/decorators/oas3/index.js +18 -22
  148. package/lib/decorators/oas3/index.js.map +1 -0
  149. package/lib/decorators/oas3/remove-unused-components.d.ts +2 -1
  150. package/lib/decorators/oas3/remove-unused-components.d.ts.map +1 -0
  151. package/lib/decorators/oas3/remove-unused-components.js +5 -8
  152. package/lib/decorators/oas3/remove-unused-components.js.map +1 -0
  153. package/lib/decorators/overlay1/index.d.ts +1 -0
  154. package/lib/decorators/overlay1/index.d.ts.map +1 -0
  155. package/lib/decorators/overlay1/index.js +2 -4
  156. package/lib/decorators/overlay1/index.js.map +1 -0
  157. package/lib/env.d.ts +1 -0
  158. package/lib/env.d.ts.map +1 -0
  159. package/lib/env.js +3 -5
  160. package/lib/env.js.map +1 -0
  161. package/lib/format/codeframes.d.ts +2 -1
  162. package/lib/format/codeframes.d.ts.map +1 -0
  163. package/lib/format/codeframes.js +15 -19
  164. package/lib/format/codeframes.js.map +1 -0
  165. package/lib/format/format.d.ts +2 -1
  166. package/lib/format/format.d.ts.map +1 -0
  167. package/lib/format/format.js +57 -62
  168. package/lib/format/format.js.map +1 -0
  169. package/lib/index.d.ts +29 -26
  170. package/lib/index.d.ts.map +1 -0
  171. package/lib/index.js +24 -98
  172. package/lib/index.js.map +1 -0
  173. package/lib/js-yaml/index.d.ts +1 -0
  174. package/lib/js-yaml/index.d.ts.map +1 -0
  175. package/lib/js-yaml/index.js +7 -11
  176. package/lib/js-yaml/index.js.map +1 -0
  177. package/lib/lint.d.ts +11 -10
  178. package/lib/lint.d.ts.map +1 -0
  179. package/lib/lint.js +40 -45
  180. package/lib/lint.js.map +1 -0
  181. package/lib/logger.d.ts +2 -1
  182. package/lib/logger.d.ts.map +1 -0
  183. package/lib/logger.js +15 -17
  184. package/lib/logger.js.map +1 -0
  185. package/lib/oas-types.d.ts +4 -3
  186. package/lib/oas-types.d.ts.map +1 -0
  187. package/lib/oas-types.js +27 -32
  188. package/lib/oas-types.js.map +1 -0
  189. package/lib/ref-utils.d.ts +3 -2
  190. package/lib/ref-utils.d.ts.map +1 -0
  191. package/lib/ref-utils.js +18 -33
  192. package/lib/ref-utils.js.map +1 -0
  193. package/lib/resolve.d.ts +3 -2
  194. package/lib/resolve.d.ts.map +1 -0
  195. package/lib/resolve.js +36 -45
  196. package/lib/resolve.js.map +1 -0
  197. package/lib/rules/ajv.d.ts +4 -3
  198. package/lib/rules/ajv.d.ts.map +1 -0
  199. package/lib/rules/ajv.js +7 -10
  200. package/lib/rules/ajv.js.map +1 -0
  201. package/lib/rules/arazzo/criteria-unique.d.ts +2 -1
  202. package/lib/rules/arazzo/criteria-unique.d.ts.map +1 -0
  203. package/lib/rules/arazzo/criteria-unique.js +2 -5
  204. package/lib/rules/arazzo/criteria-unique.js.map +1 -0
  205. package/lib/rules/arazzo/index.d.ts +2 -1
  206. package/lib/rules/arazzo/index.d.ts.map +1 -0
  207. package/lib/rules/arazzo/index.js +33 -35
  208. package/lib/rules/arazzo/index.js.map +1 -0
  209. package/lib/rules/arazzo/parameters-unique.d.ts +2 -1
  210. package/lib/rules/arazzo/parameters-unique.d.ts.map +1 -0
  211. package/lib/rules/arazzo/parameters-unique.js +2 -5
  212. package/lib/rules/arazzo/parameters-unique.js.map +1 -0
  213. package/lib/rules/arazzo/requestBody-replacements-unique.d.ts +2 -1
  214. package/lib/rules/arazzo/requestBody-replacements-unique.d.ts.map +1 -0
  215. package/lib/rules/arazzo/requestBody-replacements-unique.js +2 -5
  216. package/lib/rules/arazzo/requestBody-replacements-unique.js.map +1 -0
  217. package/lib/rules/arazzo/sourceDescription-type.d.ts +2 -1
  218. package/lib/rules/arazzo/sourceDescription-type.d.ts.map +1 -0
  219. package/lib/rules/arazzo/sourceDescription-type.js +2 -5
  220. package/lib/rules/arazzo/sourceDescription-type.js.map +1 -0
  221. package/lib/rules/arazzo/sourceDescriptions-name-unique.d.ts +2 -1
  222. package/lib/rules/arazzo/sourceDescriptions-name-unique.d.ts.map +1 -0
  223. package/lib/rules/arazzo/sourceDescriptions-name-unique.js +2 -5
  224. package/lib/rules/arazzo/sourceDescriptions-name-unique.js.map +1 -0
  225. package/lib/rules/arazzo/sourceDescriptions-not-empty.d.ts +2 -1
  226. package/lib/rules/arazzo/sourceDescriptions-not-empty.d.ts.map +1 -0
  227. package/lib/rules/arazzo/sourceDescriptions-not-empty.js +2 -5
  228. package/lib/rules/arazzo/sourceDescriptions-not-empty.js.map +1 -0
  229. package/lib/rules/arazzo/step-onFailure-unique.d.ts +2 -1
  230. package/lib/rules/arazzo/step-onFailure-unique.d.ts.map +1 -0
  231. package/lib/rules/arazzo/step-onFailure-unique.js +2 -5
  232. package/lib/rules/arazzo/step-onFailure-unique.js.map +1 -0
  233. package/lib/rules/arazzo/step-onSuccess-unique.d.ts +2 -1
  234. package/lib/rules/arazzo/step-onSuccess-unique.d.ts.map +1 -0
  235. package/lib/rules/arazzo/step-onSuccess-unique.js +2 -5
  236. package/lib/rules/arazzo/step-onSuccess-unique.js.map +1 -0
  237. package/lib/rules/arazzo/stepId-unique.d.ts +2 -1
  238. package/lib/rules/arazzo/stepId-unique.d.ts.map +1 -0
  239. package/lib/rules/arazzo/stepId-unique.js +2 -5
  240. package/lib/rules/arazzo/stepId-unique.js.map +1 -0
  241. package/lib/rules/arazzo/workflow-dependsOn.d.ts +2 -1
  242. package/lib/rules/arazzo/workflow-dependsOn.d.ts.map +1 -0
  243. package/lib/rules/arazzo/workflow-dependsOn.js +2 -5
  244. package/lib/rules/arazzo/workflow-dependsOn.js.map +1 -0
  245. package/lib/rules/arazzo/workflowId-unique.d.ts +2 -1
  246. package/lib/rules/arazzo/workflowId-unique.d.ts.map +1 -0
  247. package/lib/rules/arazzo/workflowId-unique.js +2 -5
  248. package/lib/rules/arazzo/workflowId-unique.js.map +1 -0
  249. package/lib/rules/async2/channels-kebab-case.d.ts +2 -1
  250. package/lib/rules/async2/channels-kebab-case.d.ts.map +1 -0
  251. package/lib/rules/async2/channels-kebab-case.js +2 -5
  252. package/lib/rules/async2/channels-kebab-case.js.map +1 -0
  253. package/lib/rules/async2/index.d.ts +2 -1
  254. package/lib/rules/async2/index.d.ts.map +1 -0
  255. package/lib/rules/async2/index.js +21 -26
  256. package/lib/rules/async2/index.js.map +1 -0
  257. package/lib/rules/async2/no-channel-trailing-slash.d.ts +2 -1
  258. package/lib/rules/async2/no-channel-trailing-slash.d.ts.map +1 -0
  259. package/lib/rules/async2/no-channel-trailing-slash.js +2 -5
  260. package/lib/rules/async2/no-channel-trailing-slash.js.map +1 -0
  261. package/lib/rules/async3/channels-kebab-case.d.ts +2 -1
  262. package/lib/rules/async3/channels-kebab-case.d.ts.map +1 -0
  263. package/lib/rules/async3/channels-kebab-case.js +2 -5
  264. package/lib/rules/async3/channels-kebab-case.js.map +1 -0
  265. package/lib/rules/async3/index.d.ts +2 -1
  266. package/lib/rules/async3/index.d.ts.map +1 -0
  267. package/lib/rules/async3/index.js +21 -26
  268. package/lib/rules/async3/index.js.map +1 -0
  269. package/lib/rules/async3/no-channel-trailing-slash.d.ts +2 -1
  270. package/lib/rules/async3/no-channel-trailing-slash.d.ts.map +1 -0
  271. package/lib/rules/async3/no-channel-trailing-slash.js +3 -6
  272. package/lib/rules/async3/no-channel-trailing-slash.js.map +1 -0
  273. package/lib/rules/common/assertions/asserts.d.ts +3 -2
  274. package/lib/rules/common/assertions/asserts.d.ts.map +1 -0
  275. package/lib/rules/common/assertions/asserts.js +35 -38
  276. package/lib/rules/common/assertions/asserts.js.map +1 -0
  277. package/lib/rules/common/assertions/index.d.ts +4 -3
  278. package/lib/rules/common/assertions/index.d.ts.map +1 -0
  279. package/lib/rules/common/assertions/index.js +7 -10
  280. package/lib/rules/common/assertions/index.js.map +1 -0
  281. package/lib/rules/common/assertions/utils.d.ts +5 -4
  282. package/lib/rules/common/assertions/utils.d.ts.map +1 -0
  283. package/lib/rules/common/assertions/utils.js +21 -29
  284. package/lib/rules/common/assertions/utils.js.map +1 -0
  285. package/lib/rules/common/info-contact.d.ts +2 -1
  286. package/lib/rules/common/info-contact.d.ts.map +1 -0
  287. package/lib/rules/common/info-contact.js +4 -7
  288. package/lib/rules/common/info-contact.js.map +1 -0
  289. package/lib/rules/common/info-license-strict.d.ts +2 -1
  290. package/lib/rules/common/info-license-strict.d.ts.map +1 -0
  291. package/lib/rules/common/info-license-strict.js +7 -10
  292. package/lib/rules/common/info-license-strict.js.map +1 -0
  293. package/lib/rules/common/info-license-url.d.ts +2 -1
  294. package/lib/rules/common/info-license-url.d.ts.map +1 -0
  295. package/lib/rules/common/info-license-url.js +4 -7
  296. package/lib/rules/common/info-license-url.js.map +1 -0
  297. package/lib/rules/common/info-license.d.ts +2 -1
  298. package/lib/rules/common/info-license.d.ts.map +1 -0
  299. package/lib/rules/common/info-license.js +4 -7
  300. package/lib/rules/common/info-license.js.map +1 -0
  301. package/lib/rules/common/no-ambiguous-paths.d.ts +2 -1
  302. package/lib/rules/common/no-ambiguous-paths.d.ts.map +1 -0
  303. package/lib/rules/common/no-ambiguous-paths.js +2 -5
  304. package/lib/rules/common/no-ambiguous-paths.js.map +1 -0
  305. package/lib/rules/common/no-enum-type-mismatch.d.ts +2 -1
  306. package/lib/rules/common/no-enum-type-mismatch.d.ts.map +1 -0
  307. package/lib/rules/common/no-enum-type-mismatch.js +6 -9
  308. package/lib/rules/common/no-enum-type-mismatch.js.map +1 -0
  309. package/lib/rules/common/no-http-verbs-in-paths.d.ts +2 -1
  310. package/lib/rules/common/no-http-verbs-in-paths.d.ts.map +1 -0
  311. package/lib/rules/common/no-http-verbs-in-paths.js +5 -8
  312. package/lib/rules/common/no-http-verbs-in-paths.js.map +1 -0
  313. package/lib/rules/common/no-identical-paths.d.ts +2 -1
  314. package/lib/rules/common/no-identical-paths.d.ts.map +1 -0
  315. package/lib/rules/common/no-identical-paths.js +2 -5
  316. package/lib/rules/common/no-identical-paths.js.map +1 -0
  317. package/lib/rules/common/no-invalid-parameter-examples.d.ts +1 -0
  318. package/lib/rules/common/no-invalid-parameter-examples.d.ts.map +1 -0
  319. package/lib/rules/common/no-invalid-parameter-examples.js +6 -9
  320. package/lib/rules/common/no-invalid-parameter-examples.js.map +1 -0
  321. package/lib/rules/common/no-invalid-schema-examples.d.ts +2 -1
  322. package/lib/rules/common/no-invalid-schema-examples.d.ts.map +1 -0
  323. package/lib/rules/common/no-invalid-schema-examples.js +6 -9
  324. package/lib/rules/common/no-invalid-schema-examples.js.map +1 -0
  325. package/lib/rules/common/no-path-trailing-slash.d.ts +2 -1
  326. package/lib/rules/common/no-path-trailing-slash.d.ts.map +1 -0
  327. package/lib/rules/common/no-path-trailing-slash.js +2 -5
  328. package/lib/rules/common/no-path-trailing-slash.js.map +1 -0
  329. package/lib/rules/common/no-required-schema-properties-undefined.d.ts +2 -1
  330. package/lib/rules/common/no-required-schema-properties-undefined.d.ts.map +1 -0
  331. package/lib/rules/common/no-required-schema-properties-undefined.js +4 -7
  332. package/lib/rules/common/no-required-schema-properties-undefined.js.map +1 -0
  333. package/lib/rules/common/no-schema-type-mismatch.d.ts +2 -1
  334. package/lib/rules/common/no-schema-type-mismatch.d.ts.map +1 -0
  335. package/lib/rules/common/no-schema-type-mismatch.js +2 -5
  336. package/lib/rules/common/no-schema-type-mismatch.js.map +1 -0
  337. package/lib/rules/common/operation-2xx-response.d.ts +2 -1
  338. package/lib/rules/common/operation-2xx-response.d.ts.map +1 -0
  339. package/lib/rules/common/operation-2xx-response.js +5 -8
  340. package/lib/rules/common/operation-2xx-response.js.map +1 -0
  341. package/lib/rules/common/operation-4xx-response.d.ts +2 -1
  342. package/lib/rules/common/operation-4xx-response.d.ts.map +1 -0
  343. package/lib/rules/common/operation-4xx-response.js +5 -8
  344. package/lib/rules/common/operation-4xx-response.js.map +1 -0
  345. package/lib/rules/common/operation-description.d.ts +2 -1
  346. package/lib/rules/common/operation-description.d.ts.map +1 -0
  347. package/lib/rules/common/operation-description.js +4 -7
  348. package/lib/rules/common/operation-description.js.map +1 -0
  349. package/lib/rules/common/operation-operationId-unique.d.ts +2 -1
  350. package/lib/rules/common/operation-operationId-unique.d.ts.map +1 -0
  351. package/lib/rules/common/operation-operationId-unique.js +2 -5
  352. package/lib/rules/common/operation-operationId-unique.js.map +1 -0
  353. package/lib/rules/common/operation-operationId-url-safe.d.ts +2 -1
  354. package/lib/rules/common/operation-operationId-url-safe.d.ts.map +1 -0
  355. package/lib/rules/common/operation-operationId-url-safe.js +2 -5
  356. package/lib/rules/common/operation-operationId-url-safe.js.map +1 -0
  357. package/lib/rules/common/operation-operationId.d.ts +2 -1
  358. package/lib/rules/common/operation-operationId.d.ts.map +1 -0
  359. package/lib/rules/common/operation-operationId.js +4 -7
  360. package/lib/rules/common/operation-operationId.js.map +1 -0
  361. package/lib/rules/common/operation-parameters-unique.d.ts +2 -1
  362. package/lib/rules/common/operation-parameters-unique.d.ts.map +1 -0
  363. package/lib/rules/common/operation-parameters-unique.js +2 -5
  364. package/lib/rules/common/operation-parameters-unique.js.map +1 -0
  365. package/lib/rules/common/operation-singular-tag.d.ts +2 -1
  366. package/lib/rules/common/operation-singular-tag.d.ts.map +1 -0
  367. package/lib/rules/common/operation-singular-tag.js +2 -5
  368. package/lib/rules/common/operation-singular-tag.js.map +1 -0
  369. package/lib/rules/common/operation-summary.d.ts +2 -1
  370. package/lib/rules/common/operation-summary.d.ts.map +1 -0
  371. package/lib/rules/common/operation-summary.js +4 -7
  372. package/lib/rules/common/operation-summary.js.map +1 -0
  373. package/lib/rules/common/operation-tag-defined.d.ts +2 -1
  374. package/lib/rules/common/operation-tag-defined.d.ts.map +1 -0
  375. package/lib/rules/common/operation-tag-defined.js +2 -5
  376. package/lib/rules/common/operation-tag-defined.js.map +1 -0
  377. package/lib/rules/common/parameter-description.d.ts +2 -1
  378. package/lib/rules/common/parameter-description.d.ts.map +1 -0
  379. package/lib/rules/common/parameter-description.js +2 -5
  380. package/lib/rules/common/parameter-description.js.map +1 -0
  381. package/lib/rules/common/path-declaration-must-exist.d.ts +2 -1
  382. package/lib/rules/common/path-declaration-must-exist.d.ts.map +1 -0
  383. package/lib/rules/common/path-declaration-must-exist.js +2 -5
  384. package/lib/rules/common/path-declaration-must-exist.js.map +1 -0
  385. package/lib/rules/common/path-excludes-patterns.d.ts +2 -1
  386. package/lib/rules/common/path-excludes-patterns.d.ts.map +1 -0
  387. package/lib/rules/common/path-excludes-patterns.js +2 -5
  388. package/lib/rules/common/path-excludes-patterns.js.map +1 -0
  389. package/lib/rules/common/path-http-verbs-order.d.ts +2 -1
  390. package/lib/rules/common/path-http-verbs-order.d.ts.map +1 -0
  391. package/lib/rules/common/path-http-verbs-order.js +2 -5
  392. package/lib/rules/common/path-http-verbs-order.js.map +1 -0
  393. package/lib/rules/common/path-not-include-query.d.ts +2 -1
  394. package/lib/rules/common/path-not-include-query.d.ts.map +1 -0
  395. package/lib/rules/common/path-not-include-query.js +2 -5
  396. package/lib/rules/common/path-not-include-query.js.map +1 -0
  397. package/lib/rules/common/path-params-defined.d.ts +2 -1
  398. package/lib/rules/common/path-params-defined.d.ts.map +1 -0
  399. package/lib/rules/common/path-params-defined.js +2 -5
  400. package/lib/rules/common/path-params-defined.js.map +1 -0
  401. package/lib/rules/common/path-segment-plural.d.ts +2 -1
  402. package/lib/rules/common/path-segment-plural.d.ts.map +1 -0
  403. package/lib/rules/common/path-segment-plural.js +6 -9
  404. package/lib/rules/common/path-segment-plural.js.map +1 -0
  405. package/lib/rules/common/paths-kebab-case.d.ts +2 -1
  406. package/lib/rules/common/paths-kebab-case.d.ts.map +1 -0
  407. package/lib/rules/common/paths-kebab-case.js +2 -5
  408. package/lib/rules/common/paths-kebab-case.js.map +1 -0
  409. package/lib/rules/common/required-string-property-missing-min-length.d.ts +2 -1
  410. package/lib/rules/common/required-string-property-missing-min-length.d.ts.map +1 -0
  411. package/lib/rules/common/required-string-property-missing-min-length.js +2 -5
  412. package/lib/rules/common/required-string-property-missing-min-length.js.map +1 -0
  413. package/lib/rules/common/response-contains-header.d.ts +2 -1
  414. package/lib/rules/common/response-contains-header.d.ts.map +1 -0
  415. package/lib/rules/common/response-contains-header.js +5 -8
  416. package/lib/rules/common/response-contains-header.js.map +1 -0
  417. package/lib/rules/common/scalar-property-missing-example.d.ts +2 -1
  418. package/lib/rules/common/scalar-property-missing-example.d.ts.map +1 -0
  419. package/lib/rules/common/scalar-property-missing-example.js +4 -7
  420. package/lib/rules/common/scalar-property-missing-example.js.map +1 -0
  421. package/lib/rules/common/security-defined.d.ts +2 -1
  422. package/lib/rules/common/security-defined.d.ts.map +1 -0
  423. package/lib/rules/common/security-defined.js +2 -5
  424. package/lib/rules/common/security-defined.js.map +1 -0
  425. package/lib/rules/common/spec-strict-refs.d.ts +2 -1
  426. package/lib/rules/common/spec-strict-refs.d.ts.map +1 -0
  427. package/lib/rules/common/spec-strict-refs.js +4 -7
  428. package/lib/rules/common/spec-strict-refs.js.map +1 -0
  429. package/lib/rules/common/struct.d.ts +2 -1
  430. package/lib/rules/common/struct.d.ts.map +1 -0
  431. package/lib/rules/common/struct.js +18 -21
  432. package/lib/rules/common/struct.js.map +1 -0
  433. package/lib/rules/common/tag-description.d.ts +2 -1
  434. package/lib/rules/common/tag-description.d.ts.map +1 -0
  435. package/lib/rules/common/tag-description.js +4 -7
  436. package/lib/rules/common/tag-description.js.map +1 -0
  437. package/lib/rules/common/tags-alphabetical.d.ts +2 -1
  438. package/lib/rules/common/tags-alphabetical.d.ts.map +1 -0
  439. package/lib/rules/common/tags-alphabetical.js +2 -5
  440. package/lib/rules/common/tags-alphabetical.js.map +1 -0
  441. package/lib/rules/no-unresolved-refs.d.ts +4 -3
  442. package/lib/rules/no-unresolved-refs.d.ts.map +1 -0
  443. package/lib/rules/no-unresolved-refs.js +5 -9
  444. package/lib/rules/no-unresolved-refs.js.map +1 -0
  445. package/lib/rules/oas2/boolean-parameter-prefixes.d.ts +2 -1
  446. package/lib/rules/oas2/boolean-parameter-prefixes.d.ts.map +1 -0
  447. package/lib/rules/oas2/boolean-parameter-prefixes.js +2 -5
  448. package/lib/rules/oas2/boolean-parameter-prefixes.js.map +1 -0
  449. package/lib/rules/oas2/index.d.ts +2 -1
  450. package/lib/rules/oas2/index.d.ts.map +1 -0
  451. package/lib/rules/oas2/index.js +94 -99
  452. package/lib/rules/oas2/index.js.map +1 -0
  453. package/lib/rules/oas2/request-mime-type.d.ts +2 -1
  454. package/lib/rules/oas2/request-mime-type.d.ts.map +1 -0
  455. package/lib/rules/oas2/request-mime-type.js +5 -8
  456. package/lib/rules/oas2/request-mime-type.js.map +1 -0
  457. package/lib/rules/oas2/response-contains-property.d.ts +2 -1
  458. package/lib/rules/oas2/response-contains-property.d.ts.map +1 -0
  459. package/lib/rules/oas2/response-contains-property.js +5 -8
  460. package/lib/rules/oas2/response-contains-property.js.map +1 -0
  461. package/lib/rules/oas2/response-mime-type.d.ts +2 -1
  462. package/lib/rules/oas2/response-mime-type.d.ts.map +1 -0
  463. package/lib/rules/oas2/response-mime-type.js +5 -8
  464. package/lib/rules/oas2/response-mime-type.js.map +1 -0
  465. package/lib/rules/oas3/array-parameter-serialization.d.ts +2 -1
  466. package/lib/rules/oas3/array-parameter-serialization.d.ts.map +1 -0
  467. package/lib/rules/oas3/array-parameter-serialization.js +4 -7
  468. package/lib/rules/oas3/array-parameter-serialization.js.map +1 -0
  469. package/lib/rules/oas3/boolean-parameter-prefixes.d.ts +2 -1
  470. package/lib/rules/oas3/boolean-parameter-prefixes.d.ts.map +1 -0
  471. package/lib/rules/oas3/boolean-parameter-prefixes.js +2 -5
  472. package/lib/rules/oas3/boolean-parameter-prefixes.js.map +1 -0
  473. package/lib/rules/oas3/component-name-unique.d.ts +2 -1
  474. package/lib/rules/oas3/component-name-unique.d.ts.map +1 -0
  475. package/lib/rules/oas3/component-name-unique.js +2 -5
  476. package/lib/rules/oas3/component-name-unique.js.map +1 -0
  477. package/lib/rules/oas3/index.d.ts +2 -1
  478. package/lib/rules/oas3/index.d.ts.map +1 -0
  479. package/lib/rules/oas3/index.js +118 -123
  480. package/lib/rules/oas3/index.js.map +1 -0
  481. package/lib/rules/oas3/no-empty-servers.d.ts +2 -1
  482. package/lib/rules/oas3/no-empty-servers.d.ts.map +1 -0
  483. package/lib/rules/oas3/no-empty-servers.js +2 -5
  484. package/lib/rules/oas3/no-empty-servers.js.map +1 -0
  485. package/lib/rules/oas3/no-example-value-and-externalValue.d.ts +2 -1
  486. package/lib/rules/oas3/no-example-value-and-externalValue.d.ts.map +1 -0
  487. package/lib/rules/oas3/no-example-value-and-externalValue.js +2 -5
  488. package/lib/rules/oas3/no-example-value-and-externalValue.js.map +1 -0
  489. package/lib/rules/oas3/no-invalid-media-type-examples.d.ts +2 -1
  490. package/lib/rules/oas3/no-invalid-media-type-examples.d.ts.map +1 -0
  491. package/lib/rules/oas3/no-invalid-media-type-examples.js +7 -10
  492. package/lib/rules/oas3/no-invalid-media-type-examples.js.map +1 -0
  493. package/lib/rules/oas3/no-server-example.com.d.ts +2 -1
  494. package/lib/rules/oas3/no-server-example.com.d.ts.map +1 -0
  495. package/lib/rules/oas3/no-server-example.com.js +2 -5
  496. package/lib/rules/oas3/no-server-example.com.js.map +1 -0
  497. package/lib/rules/oas3/no-server-trailing-slash.d.ts +2 -1
  498. package/lib/rules/oas3/no-server-trailing-slash.d.ts.map +1 -0
  499. package/lib/rules/oas3/no-server-trailing-slash.js +2 -5
  500. package/lib/rules/oas3/no-server-trailing-slash.js.map +1 -0
  501. package/lib/rules/oas3/no-server-variables-empty-enum.d.ts +2 -1
  502. package/lib/rules/oas3/no-server-variables-empty-enum.d.ts.map +1 -0
  503. package/lib/rules/oas3/no-server-variables-empty-enum.js +2 -5
  504. package/lib/rules/oas3/no-server-variables-empty-enum.js.map +1 -0
  505. package/lib/rules/oas3/no-undefined-server-variable.d.ts +2 -1
  506. package/lib/rules/oas3/no-undefined-server-variable.d.ts.map +1 -0
  507. package/lib/rules/oas3/no-undefined-server-variable.js +2 -5
  508. package/lib/rules/oas3/no-undefined-server-variable.js.map +1 -0
  509. package/lib/rules/oas3/no-unused-components.d.ts +2 -1
  510. package/lib/rules/oas3/no-unused-components.d.ts.map +1 -0
  511. package/lib/rules/oas3/no-unused-components.js +2 -5
  512. package/lib/rules/oas3/no-unused-components.js.map +1 -0
  513. package/lib/rules/oas3/operation-4xx-problem-details-rfc7807.d.ts +2 -1
  514. package/lib/rules/oas3/operation-4xx-problem-details-rfc7807.d.ts.map +1 -0
  515. package/lib/rules/oas3/operation-4xx-problem-details-rfc7807.js +6 -9
  516. package/lib/rules/oas3/operation-4xx-problem-details-rfc7807.js.map +1 -0
  517. package/lib/rules/oas3/request-mime-type.d.ts +2 -1
  518. package/lib/rules/oas3/request-mime-type.d.ts.map +1 -0
  519. package/lib/rules/oas3/request-mime-type.js +6 -9
  520. package/lib/rules/oas3/request-mime-type.js.map +1 -0
  521. package/lib/rules/oas3/response-contains-property.d.ts +2 -1
  522. package/lib/rules/oas3/response-contains-property.d.ts.map +1 -0
  523. package/lib/rules/oas3/response-contains-property.js +5 -8
  524. package/lib/rules/oas3/response-contains-property.js.map +1 -0
  525. package/lib/rules/oas3/response-mime-type.d.ts +2 -1
  526. package/lib/rules/oas3/response-mime-type.d.ts.map +1 -0
  527. package/lib/rules/oas3/response-mime-type.js +6 -9
  528. package/lib/rules/oas3/response-mime-type.js.map +1 -0
  529. package/lib/rules/oas3/spec-components-invalid-map-name.d.ts +2 -1
  530. package/lib/rules/oas3/spec-components-invalid-map-name.d.ts.map +1 -0
  531. package/lib/rules/oas3/spec-components-invalid-map-name.js +2 -5
  532. package/lib/rules/oas3/spec-components-invalid-map-name.js.map +1 -0
  533. package/lib/rules/other/stats.d.ts +4 -3
  534. package/lib/rules/other/stats.d.ts.map +1 -0
  535. package/lib/rules/other/stats.js +2 -5
  536. package/lib/rules/other/stats.js.map +1 -0
  537. package/lib/rules/overlay1/index.d.ts +2 -1
  538. package/lib/rules/overlay1/index.d.ts.map +1 -0
  539. package/lib/rules/overlay1/index.js +9 -11
  540. package/lib/rules/overlay1/index.js.map +1 -0
  541. package/lib/rules/respect/no-criteria-xpath.d.ts +2 -1
  542. package/lib/rules/respect/no-criteria-xpath.d.ts.map +1 -0
  543. package/lib/rules/respect/no-criteria-xpath.js +2 -5
  544. package/lib/rules/respect/no-criteria-xpath.js.map +1 -0
  545. package/lib/rules/respect/respect-supported-versions.d.ts +2 -1
  546. package/lib/rules/respect/respect-supported-versions.d.ts.map +1 -0
  547. package/lib/rules/respect/respect-supported-versions.js +7 -10
  548. package/lib/rules/respect/respect-supported-versions.js.map +1 -0
  549. package/lib/rules/utils.d.ts +4 -3
  550. package/lib/rules/utils.d.ts.map +1 -0
  551. package/lib/rules/utils.js +23 -36
  552. package/lib/rules/utils.js.map +1 -0
  553. package/lib/types/arazzo.d.ts +2 -1
  554. package/lib/types/arazzo.d.ts.map +1 -0
  555. package/lib/types/arazzo.js +21 -23
  556. package/lib/types/arazzo.js.map +1 -0
  557. package/lib/types/asyncapi2.d.ts +2 -1
  558. package/lib/types/asyncapi2.d.ts.map +1 -0
  559. package/lib/types/asyncapi2.js +54 -56
  560. package/lib/types/asyncapi2.js.map +1 -0
  561. package/lib/types/asyncapi3.d.ts +2 -1
  562. package/lib/types/asyncapi3.d.ts.map +1 -0
  563. package/lib/types/asyncapi3.js +41 -43
  564. package/lib/types/asyncapi3.js.map +1 -0
  565. package/lib/types/index.d.ts +1 -0
  566. package/lib/types/index.d.ts.map +1 -0
  567. package/lib/types/index.js +7 -13
  568. package/lib/types/index.js.map +1 -0
  569. package/lib/types/json-schema-adapter.d.ts +2 -1
  570. package/lib/types/json-schema-adapter.d.ts.map +1 -0
  571. package/lib/types/json-schema-adapter.js +15 -17
  572. package/lib/types/json-schema-adapter.js.map +1 -0
  573. package/lib/types/oas2.d.ts +3 -2
  574. package/lib/types/oas2.d.ts.map +1 -0
  575. package/lib/types/oas2.js +17 -19
  576. package/lib/types/oas2.js.map +1 -0
  577. package/lib/types/oas3.d.ts +3 -2
  578. package/lib/types/oas3.d.ts.map +1 -0
  579. package/lib/types/oas3.js +39 -41
  580. package/lib/types/oas3.js.map +1 -0
  581. package/lib/types/oas3_1.d.ts +3 -2
  582. package/lib/types/oas3_1.d.ts.map +1 -0
  583. package/lib/types/oas3_1.js +18 -20
  584. package/lib/types/oas3_1.js.map +1 -0
  585. package/lib/types/overlay.d.ts +2 -1
  586. package/lib/types/overlay.d.ts.map +1 -0
  587. package/lib/types/overlay.js +4 -6
  588. package/lib/types/overlay.js.map +1 -0
  589. package/lib/types/redocly-yaml.d.ts +4 -3
  590. package/lib/types/redocly-yaml.d.ts.map +1 -0
  591. package/lib/types/redocly-yaml.js +31 -58
  592. package/lib/types/redocly-yaml.js.map +1 -0
  593. package/lib/typings/arazzo.d.ts +1 -0
  594. package/lib/typings/arazzo.d.ts.map +1 -0
  595. package/lib/typings/arazzo.js +3 -5
  596. package/lib/typings/arazzo.js.map +1 -0
  597. package/lib/typings/asyncapi.d.ts +1 -0
  598. package/lib/typings/asyncapi.d.ts.map +1 -0
  599. package/lib/typings/asyncapi.js +2 -2
  600. package/lib/typings/asyncapi.js.map +1 -0
  601. package/lib/typings/asyncapi3.d.ts +1 -0
  602. package/lib/typings/asyncapi3.d.ts.map +1 -0
  603. package/lib/typings/asyncapi3.js +2 -2
  604. package/lib/typings/asyncapi3.js.map +1 -0
  605. package/lib/typings/common.d.ts +1 -0
  606. package/lib/typings/common.d.ts.map +1 -0
  607. package/lib/typings/common.js +2 -2
  608. package/lib/typings/common.js.map +1 -0
  609. package/lib/typings/openapi.d.ts +1 -0
  610. package/lib/typings/openapi.d.ts.map +1 -0
  611. package/lib/typings/openapi.js +2 -2
  612. package/lib/typings/openapi.js.map +1 -0
  613. package/lib/typings/overlay.d.ts +1 -0
  614. package/lib/typings/overlay.d.ts.map +1 -0
  615. package/lib/typings/overlay.js +2 -4
  616. package/lib/typings/overlay.js.map +1 -0
  617. package/lib/typings/swagger.d.ts +2 -1
  618. package/lib/typings/swagger.d.ts.map +1 -0
  619. package/lib/typings/swagger.js +2 -2
  620. package/lib/typings/swagger.js.map +1 -0
  621. package/lib/utils/error.d.ts +3 -0
  622. package/lib/utils/error.d.ts.map +1 -0
  623. package/lib/utils/error.js +3 -0
  624. package/lib/utils/error.js.map +1 -0
  625. package/lib/utils.d.ts +4 -5
  626. package/lib/utils.d.ts.map +1 -0
  627. package/lib/utils.js +52 -99
  628. package/lib/utils.js.map +1 -0
  629. package/lib/visitors.d.ts +11 -10
  630. package/lib/visitors.d.ts.map +1 -0
  631. package/lib/visitors.js +4 -6
  632. package/lib/visitors.js.map +1 -0
  633. package/lib/walk.d.ts +9 -8
  634. package/lib/walk.d.ts.map +1 -0
  635. package/lib/walk.js +23 -25
  636. package/lib/walk.js.map +1 -0
  637. package/package.json +31 -10
  638. package/lib/decorators/common/registry-dependencies.d.ts +0 -2
  639. package/lib/decorators/common/registry-dependencies.js +0 -24
  640. package/lib/output.d.ts +0 -3
  641. package/lib/output.js +0 -9
  642. package/lib/redocly/domains.d.ts +0 -14
  643. package/lib/redocly/domains.js +0 -41
  644. package/lib/redocly/index.d.ts +0 -30
  645. package/lib/redocly/index.js +0 -131
  646. package/lib/redocly/redocly-client-types.d.ts +0 -8
  647. package/lib/redocly/redocly-client-types.js +0 -2
  648. package/lib/redocly/registry-api-types.d.ts +0 -29
  649. package/lib/redocly/registry-api-types.js +0 -2
  650. package/lib/redocly/registry-api.d.ts +0 -17
  651. package/lib/redocly/registry-api.js +0 -100
@@ -1,27 +1,22 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.preprocessors = exports.rules = void 0;
4
- const assertions_1 = require("../common/assertions");
5
- const struct_1 = require("../common/struct");
6
- const info_contact_1 = require("../common/info-contact");
7
- const info_license_strict_1 = require("../common/info-license-strict");
8
- const operation_operationId_1 = require("../common/operation-operationId");
9
- const tag_description_1 = require("../common/tag-description");
10
- const tags_alphabetical_1 = require("../common/tags-alphabetical");
11
- const channels_kebab_case_1 = require("./channels-kebab-case");
12
- const no_channel_trailing_slash_1 = require("./no-channel-trailing-slash");
13
- exports.rules = {
14
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
15
- //@ts-ignore TODO: This is depricated property `spec` and should be removed in the future
16
- spec: struct_1.Struct,
17
- struct: struct_1.Struct,
18
- assertions: assertions_1.Assertions,
19
- 'info-contact': info_contact_1.InfoContact,
20
- 'info-license-strict': info_license_strict_1.InfoLicenseStrict,
21
- 'operation-operationId': operation_operationId_1.OperationOperationId,
22
- 'channels-kebab-case': channels_kebab_case_1.ChannelsKebabCase,
23
- 'no-channel-trailing-slash': no_channel_trailing_slash_1.NoChannelTrailingSlash,
24
- 'tag-description': tag_description_1.TagDescription,
25
- 'tags-alphabetical': tags_alphabetical_1.TagsAlphabetical,
1
+ import { Assertions } from '../common/assertions/index.js';
2
+ import { Struct } from '../common/struct.js';
3
+ import { InfoContact } from '../common/info-contact.js';
4
+ import { InfoLicenseStrict } from '../common/info-license-strict.js';
5
+ import { OperationOperationId } from '../common/operation-operationId.js';
6
+ import { TagDescription } from '../common/tag-description.js';
7
+ import { TagsAlphabetical } from '../common/tags-alphabetical.js';
8
+ import { ChannelsKebabCase } from './channels-kebab-case.js';
9
+ import { NoChannelTrailingSlash } from './no-channel-trailing-slash.js';
10
+ export const rules = {
11
+ struct: Struct,
12
+ assertions: Assertions,
13
+ 'info-contact': InfoContact,
14
+ 'info-license-strict': InfoLicenseStrict,
15
+ 'operation-operationId': OperationOperationId,
16
+ 'channels-kebab-case': ChannelsKebabCase,
17
+ 'no-channel-trailing-slash': NoChannelTrailingSlash,
18
+ 'tag-description': TagDescription,
19
+ 'tags-alphabetical': TagsAlphabetical,
26
20
  };
27
- exports.preprocessors = {};
21
+ export const preprocessors = {};
22
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/rules/async3/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACrE,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAC1E,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AAKxE,MAAM,CAAC,MAAM,KAAK,GAA8B;IAC9C,MAAM,EAAE,MAAoB;IAC5B,UAAU,EAAE,UAAwB;IACpC,cAAc,EAAE,WAAyB;IACzC,qBAAqB,EAAE,iBAA+B;IACtD,uBAAuB,EAAE,oBAAkC;IAC3D,qBAAqB,EAAE,iBAAiB;IACxC,2BAA2B,EAAE,sBAAsB;IACnD,iBAAiB,EAAE,cAA4B;IAC/C,mBAAmB,EAAE,gBAA8B;CACpD,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG,EAAE,CAAC"}
@@ -1,2 +1,3 @@
1
- import type { Async3Rule } from '../../visitors';
1
+ import type { Async3Rule } from '../../visitors.js';
2
2
  export declare const NoChannelTrailingSlash: Async3Rule;
3
+ //# sourceMappingURL=no-channel-trailing-slash.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"no-channel-trailing-slash.d.ts","sourceRoot":"","sources":["../../../src/rules/async3/no-channel-trailing-slash.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAIpD,eAAO,MAAM,sBAAsB,EAAE,UAWpC,CAAC"}
@@ -1,10 +1,7 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.NoChannelTrailingSlash = void 0;
4
- const NoChannelTrailingSlash = () => {
1
+ export const NoChannelTrailingSlash = () => {
5
2
  return {
6
3
  Channel(channel, { report, location }) {
7
- if (channel.address.endsWith('/') && channel.address !== '/') {
4
+ if (channel?.address?.endsWith('/') && channel?.address !== '/') {
8
5
  report({
9
6
  message: `\`${channel.address}\` should not have a trailing slash.`,
10
7
  location: location.key(),
@@ -13,4 +10,4 @@ const NoChannelTrailingSlash = () => {
13
10
  },
14
11
  };
15
12
  };
16
- exports.NoChannelTrailingSlash = NoChannelTrailingSlash;
13
+ //# sourceMappingURL=no-channel-trailing-slash.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"no-channel-trailing-slash.js","sourceRoot":"","sources":["../../../src/rules/async3/no-channel-trailing-slash.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,MAAM,sBAAsB,GAAe,GAAG,EAAE;IACrD,OAAO;QACL,OAAO,CAAC,OAAgB,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAe;YACzD,IAAI,OAAO,EAAE,OAAO,EAAE,QAAQ,CAAC,GAAG,CAAC,IAAI,OAAO,EAAE,OAAO,KAAK,GAAG,EAAE,CAAC;gBAChE,MAAM,CAAC;oBACL,OAAO,EAAE,KAAK,OAAO,CAAC,OAAO,sCAAsC;oBACnE,QAAQ,EAAE,QAAQ,CAAC,GAAG,EAAE;iBACzB,CAAC,CAAC;YACL,CAAC;QACH,CAAC;KACF,CAAC;AACJ,CAAC,CAAC"}
@@ -1,5 +1,5 @@
1
- import type { AssertionContext, AssertResult, CustomFunction } from '../../../config/types';
2
- import type { Location } from '../../../ref-utils';
1
+ import type { AssertionContext, AssertResult, CustomFunction } from '../../../config/types.js';
2
+ import type { Location } from '../../../ref-utils.js';
3
3
  export type AssertionFnContext = AssertionContext & {
4
4
  baseLocation: Location;
5
5
  rawValue?: any;
@@ -28,3 +28,4 @@ export declare const runOnKeysSet: Set<keyof Asserts>;
28
28
  export declare const runOnValuesSet: Set<keyof Asserts>;
29
29
  export declare const asserts: Asserts;
30
30
  export declare function buildAssertCustomFunction(fn: CustomFunction): AssertionFn;
31
+ //# sourceMappingURL=asserts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"asserts.d.ts","sourceRoot":"","sources":["../../../../src/rules/common/assertions/asserts.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC/F,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAGtD,MAAM,MAAM,kBAAkB,GAAG,gBAAgB,GAAG;IAAE,YAAY,EAAE,QAAQ,CAAC;IAAC,QAAQ,CAAC,EAAE,GAAG,CAAA;CAAE,CAAC;AAE/F,MAAM,MAAM,WAAW,GAAG,CAAC,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,GAAG,EAAE,GAAG,EAAE,kBAAkB,KAAK,YAAY,EAAE,CAAC;AAElG,MAAM,MAAM,OAAO,GAAG;IACpB,OAAO,EAAE,WAAW,CAAC;IACrB,UAAU,EAAE,WAAW,CAAC;IACxB,IAAI,EAAE,WAAW,CAAC;IAClB,OAAO,EAAE,WAAW,CAAC;IACrB,QAAQ,EAAE,WAAW,CAAC;IACtB,UAAU,EAAE,WAAW,CAAC;IACxB,SAAS,EAAE,WAAW,CAAC;IACvB,QAAQ,EAAE,WAAW,CAAC;IACtB,SAAS,EAAE,WAAW,CAAC;IACvB,SAAS,EAAE,WAAW,CAAC;IACvB,MAAM,EAAE,WAAW,CAAC;IACpB,SAAS,EAAE,WAAW,CAAC;IACvB,iBAAiB,EAAE,WAAW,CAAC;IAC/B,gBAAgB,EAAE,WAAW,CAAC;IAC9B,UAAU,EAAE,WAAW,CAAC;IACxB,GAAG,EAAE,WAAW,CAAC;IACjB,KAAK,EAAE,WAAW,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,YAAY,oBAgBvB,CAAC;AACH,eAAO,MAAM,cAAc,oBAazB,CAAC;AAEH,eAAO,MAAM,OAAO,EAAE,OAwSrB,CAAC;AAEF,wBAAgB,yBAAyB,CAAC,EAAE,EAAE,cAAc,GAAG,WAAW,CAGzE"}
@@ -1,10 +1,6 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.asserts = exports.runOnValuesSet = exports.runOnKeysSet = void 0;
4
- exports.buildAssertCustomFunction = buildAssertCustomFunction;
5
- const utils_1 = require("../../../utils");
6
- const utils_2 = require("./utils");
7
- exports.runOnKeysSet = new Set([
1
+ import { isPlainObject, isString as runOnValue, isTruthy } from '../../../utils.js';
2
+ import { isOrdered, getIntersectionLength, regexFromString } from './utils.js';
3
+ export const runOnKeysSet = new Set([
8
4
  'mutuallyExclusive',
9
5
  'mutuallyRequired',
10
6
  'enum',
@@ -21,7 +17,7 @@ exports.runOnKeysSet = new Set([
21
17
  'const',
22
18
  'defined', // In case if `property` for assertions is not added
23
19
  ]);
24
- exports.runOnValuesSet = new Set([
20
+ export const runOnValuesSet = new Set([
25
21
  'pattern',
26
22
  'notPattern',
27
23
  'enum',
@@ -35,49 +31,49 @@ exports.runOnValuesSet = new Set([
35
31
  'ref',
36
32
  'const',
37
33
  ]);
38
- exports.asserts = {
34
+ export const asserts = {
39
35
  pattern: (value, condition, { baseLocation, rawValue }) => {
40
- if (typeof value === 'undefined' || (0, utils_1.isPlainObject)(value))
36
+ if (typeof value === 'undefined' || isPlainObject(value))
41
37
  return []; // property doesn't exist or is an object, no need to lint it with this assert
42
38
  const values = Array.isArray(value) ? value : [value];
43
- const regex = (0, utils_2.regexFromString)(condition);
39
+ const regex = regexFromString(condition);
44
40
  return values
45
41
  .map((_val) => !regex?.test(_val) && {
46
42
  message: `"${_val}" should match a regex ${condition}`,
47
- location: (0, utils_1.isString)(value)
43
+ location: runOnValue(value)
48
44
  ? baseLocation
49
- : (0, utils_1.isPlainObject)(rawValue)
45
+ : isPlainObject(rawValue)
50
46
  ? baseLocation.child(_val).key()
51
47
  : baseLocation.key(),
52
48
  })
53
- .filter(utils_1.isTruthy);
49
+ .filter(isTruthy);
54
50
  },
55
51
  notPattern: (value, condition, { baseLocation, rawValue }) => {
56
- if (typeof value === 'undefined' || (0, utils_1.isPlainObject)(value))
52
+ if (typeof value === 'undefined' || isPlainObject(value))
57
53
  return []; // property doesn't exist or is an object, no need to lint it with this assert
58
54
  const values = Array.isArray(value) ? value : [value];
59
- const regex = (0, utils_2.regexFromString)(condition);
55
+ const regex = regexFromString(condition);
60
56
  return values
61
57
  .map((_val) => regex?.test(_val) && {
62
58
  message: `"${_val}" should not match a regex ${condition}`,
63
- location: (0, utils_1.isString)(value)
59
+ location: runOnValue(value)
64
60
  ? baseLocation
65
- : (0, utils_1.isPlainObject)(rawValue)
61
+ : isPlainObject(rawValue)
66
62
  ? baseLocation.child(_val).key()
67
63
  : baseLocation.key(),
68
64
  })
69
- .filter(utils_1.isTruthy);
65
+ .filter(isTruthy);
70
66
  },
71
67
  enum: (value, condition, { baseLocation }) => {
72
- if (typeof value === 'undefined' || (0, utils_1.isPlainObject)(value))
68
+ if (typeof value === 'undefined' || isPlainObject(value))
73
69
  return []; // property doesn't exist or is an object, no need to lint it with this assert
74
70
  const values = Array.isArray(value) ? value : [value];
75
71
  return values
76
72
  .map((_val) => !condition.includes(_val) && {
77
73
  message: `"${_val}" should be one of the predefined values`,
78
- location: (0, utils_1.isString)(value) ? baseLocation : baseLocation.child(_val).key(),
74
+ location: runOnValue(value) ? baseLocation : baseLocation.child(_val).key(),
79
75
  })
80
- .filter(utils_1.isTruthy);
76
+ .filter(isTruthy);
81
77
  },
82
78
  defined: (value, condition = true, { baseLocation }) => {
83
79
  const isDefined = typeof value !== 'undefined';
@@ -97,18 +93,18 @@ exports.asserts = {
97
93
  message: `${requiredKey} is required`,
98
94
  location: baseLocation.key(),
99
95
  })
100
- .filter(utils_1.isTruthy);
96
+ .filter(isTruthy);
101
97
  },
102
98
  disallowed: (value, condition, { baseLocation }) => {
103
- if (typeof value === 'undefined' || (0, utils_1.isPlainObject)(value))
99
+ if (typeof value === 'undefined' || isPlainObject(value))
104
100
  return []; // property doesn't exist or is an object, no need to lint it with this assert
105
101
  const values = Array.isArray(value) ? value : [value];
106
102
  return values
107
103
  .map((_val) => condition.includes(_val) && {
108
104
  message: `"${_val}" is disallowed`,
109
- location: (0, utils_1.isString)(value) ? baseLocation : baseLocation.child(_val).key(),
105
+ location: runOnValue(value) ? baseLocation : baseLocation.child(_val).key(),
110
106
  })
111
- .filter(utils_1.isTruthy);
107
+ .filter(isTruthy);
112
108
  },
113
109
  const: (value, condition, { baseLocation }) => {
114
110
  if (typeof value === 'undefined')
@@ -117,9 +113,9 @@ exports.asserts = {
117
113
  return value
118
114
  .map((_val) => condition !== _val && {
119
115
  message: `"${_val}" should be equal ${condition} `,
120
- location: (0, utils_1.isString)(value) ? baseLocation : baseLocation.child(_val).key(),
116
+ location: runOnValue(value) ? baseLocation : baseLocation.child(_val).key(),
121
117
  })
122
- .filter(utils_1.isTruthy);
118
+ .filter(isTruthy);
123
119
  }
124
120
  else {
125
121
  return value !== condition
@@ -177,7 +173,7 @@ exports.asserts = {
177
173
  ];
178
174
  },
179
175
  casing: (value, condition, { baseLocation }) => {
180
- if (typeof value === 'undefined' || (0, utils_1.isPlainObject)(value))
176
+ if (typeof value === 'undefined' || isPlainObject(value))
181
177
  return []; // property doesn't exist or is an object, no need to lint it with this assert
182
178
  const values = Array.isArray(value) ? value : [value];
183
179
  const casingRegexes = {
@@ -192,9 +188,9 @@ exports.asserts = {
192
188
  return values
193
189
  .map((_val) => !_val.match(casingRegexes[condition]) && {
194
190
  message: `"${_val}" should use ${condition}`,
195
- location: (0, utils_1.isString)(value) ? baseLocation : baseLocation.child(_val).key(),
191
+ location: runOnValue(value) ? baseLocation : baseLocation.child(_val).key(),
196
192
  })
197
- .filter(utils_1.isTruthy);
193
+ .filter(isTruthy);
198
194
  },
199
195
  sortOrder: (value, condition, { baseLocation }) => {
200
196
  const direction = condition.direction || condition;
@@ -207,7 +203,7 @@ exports.asserts = {
207
203
  },
208
204
  ];
209
205
  }
210
- if (typeof value === 'undefined' || (0, utils_2.isOrdered)(value, condition))
206
+ if (typeof value === 'undefined' || isOrdered(value, condition))
211
207
  return [];
212
208
  return [
213
209
  {
@@ -217,7 +213,7 @@ exports.asserts = {
217
213
  ];
218
214
  },
219
215
  mutuallyExclusive: (value, condition, { baseLocation }) => {
220
- if ((0, utils_2.getIntersectionLength)(value, condition) < 2)
216
+ if (getIntersectionLength(value, condition) < 2)
221
217
  return [];
222
218
  return [
223
219
  {
@@ -227,8 +223,8 @@ exports.asserts = {
227
223
  ];
228
224
  },
229
225
  mutuallyRequired: (value, condition, { baseLocation }) => {
230
- const isValid = (0, utils_2.getIntersectionLength)(value, condition) > 0
231
- ? (0, utils_2.getIntersectionLength)(value, condition) === condition.length
226
+ const isValid = getIntersectionLength(value, condition) > 0
227
+ ? getIntersectionLength(value, condition) === condition.length
232
228
  : true;
233
229
  return isValid
234
230
  ? []
@@ -240,7 +236,7 @@ exports.asserts = {
240
236
  ];
241
237
  },
242
238
  requireAny: (value, condition, { baseLocation }) => {
243
- return (0, utils_2.getIntersectionLength)(value, condition) >= 1
239
+ return getIntersectionLength(value, condition) >= 1
244
240
  ? []
245
241
  : [
246
242
  {
@@ -264,7 +260,7 @@ exports.asserts = {
264
260
  },
265
261
  ];
266
262
  }
267
- const regex = (0, utils_2.regexFromString)(condition);
263
+ const regex = regexFromString(condition);
268
264
  const isValid = hasRef && regex?.test(rawValue['$ref']);
269
265
  return isValid
270
266
  ? []
@@ -276,6 +272,7 @@ exports.asserts = {
276
272
  ];
277
273
  },
278
274
  };
279
- function buildAssertCustomFunction(fn) {
275
+ export function buildAssertCustomFunction(fn) {
280
276
  return (value, options, ctx) => fn.call(null, value, options, ctx);
281
277
  }
278
+ //# sourceMappingURL=asserts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"asserts.js","sourceRoot":"","sources":["../../../../src/rules/common/assertions/asserts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,QAAQ,IAAI,UAAU,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AACpF,OAAO,EAAE,SAAS,EAAE,qBAAqB,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AA8B/E,MAAM,CAAC,MAAM,YAAY,GAAG,IAAI,GAAG,CAAgB;IACjD,mBAAmB;IACnB,kBAAkB;IAClB,MAAM;IACN,SAAS;IACT,YAAY;IACZ,WAAW;IACX,WAAW;IACX,QAAQ;IACR,WAAW;IACX,YAAY;IACZ,UAAU;IACV,YAAY;IACZ,KAAK;IACL,OAAO;IACP,SAAS,EAAE,oDAAoD;CAChE,CAAC,CAAC;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,IAAI,GAAG,CAAgB;IACnD,SAAS;IACT,YAAY;IACZ,MAAM;IACN,SAAS;IACT,WAAW;IACX,UAAU;IACV,WAAW;IACX,WAAW;IACX,QAAQ;IACR,WAAW;IACX,KAAK;IACL,OAAO;CACR,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,OAAO,GAAY;IAC9B,OAAO,EAAE,CACP,KAAwB,EACxB,SAAiB,EACjB,EAAE,YAAY,EAAE,QAAQ,EAAsB,EAC9C,EAAE;QACF,IAAI,OAAO,KAAK,KAAK,WAAW,IAAI,aAAa,CAAC,KAAK,CAAC;YAAE,OAAO,EAAE,CAAC,CAAC,8EAA8E;QACnJ,MAAM,MAAM,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;QACtD,M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3Visitor, Oas2Visitor, Oas3Visitor, Overlay1Visitor } from '../../../visitors';
3
- import type { RuleSeverity } from '../../../config';
1
+ import type { asserts, AssertionFn } from './asserts.js';
2
+ import type { Arazzo1Visitor, Async2Visitor, Async3Visitor, Oas2Visitor, Oas3Visitor, Overlay1Visitor } from '../../../visitors.js';
3
+ import type { RuleSeverity } from '../../../config/index.js';
4
4
  export type AssertionLocators = {
5
5
  filterInParentKeys?: (string | number)[];
6
6
  filterOutParentKeys?: (string | number)[];
@@ -25,3 +25,4 @@ export type Assertion = RawAssertion & {
25
25
  assertionId: string;
26
26
  };
27
27
  export declare const Assertions: (opts: Record<string, Assertion>) => (Oas3Visitor | Oas2Visitor | Async2Visitor | Async3Visitor | Arazzo1Visitor | Overlay1Visitor)[];
28
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/rules/common/assertions/index.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,KAAK,EACV,cAAc,EACd,aAAa,EACb,aAAa,EACb,WAAW,EACX,WAAW,EACX,eAAe,EAChB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAE7D,MAAM,MAAM,iBAAiB,GAAG;IAC9B,kBAAkB,CAAC,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;IACzC,mBAAmB,CAAC,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;IAC1C,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,OAAO,EAAE;QACP,IAAI,EAAE,MAAM,CAAC;QACb,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;KAC9B,GAAG,iBAAiB,CAAC;IACtB,UAAU,EAAE;SAAG,IAAI,IAAI,MAAM,OAAO,OAAO,CAAC,CAAC,EAAE,WAAW;KAAE,CAAC;CAC9D,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,mBAAmB,GAAG;IAC/C,KAAK,CAAC,EAAE,mBAAmB,EAAE,CAAC;IAC9B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,QAAQ,CAAC,EAAE,YAAY,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG,YAAY,GAAG;IAAE,WAAW,EAAE,MAAM,CAAA;CAAE,CAAC;AAE/D,eAAO,MAAM,UAAU,SAAU,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,qGA8BzD,CAAC"}
@@ -1,9 +1,6 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Assertions = void 0;
4
- const utils_1 = require("./utils");
5
- const utils_2 = require("../../../utils");
6
- const Assertions = (opts) => {
1
+ import { buildSubjectVisitor, buildVisitorObject } from './utils.js';
2
+ import { isString } from '../../../utils.js';
3
+ export const Assertions = (opts) => {
7
4
  const visitors = [];
8
5
  // As 'Assertions' has an array of asserts,
9
6
  // that array spreads into an 'opts' object on init rules phase here
@@ -12,13 +9,13 @@ const Assertions = (opts) => {
12
9
  // before - filter only object 'opts' values
13
10
  const assertions = Object.values(opts).filter((opt) => typeof opt === 'object' && opt !== null);
14
11
  for (const [_, assertion] of assertions.entries()) {
15
- if (!(0, utils_2.isString)(assertion.subject.type)) {
12
+ if (!isString(assertion.subject.type)) {
16
13
  throw new Error(`${assertion.assertionId}: 'type' (String) is required`);
17
14
  }
18
- const subjectVisitor = (0, utils_1.buildSubjectVisitor)(assertion.assertionId, assertion);
19
- const visitorObject = (0, utils_1.buildVisitorObject)(assertion, subjectVisitor);
15
+ const subjectVisitor = buildSubjectVisitor(assertion.assertionId, assertion);
16
+ const visitorObject = buildVisitorObject(assertion, subjectVisitor);
20
17
  visitors.push(visitorObject);
21
18
  }
22
19
  return visitors;
23
20
  };
24
- exports.Assertions = Assertions;
21
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/rules/common/assertions/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AACrE,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAoC7C,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,IAA+B,EAAE,EAAE;IAC5D,MAAM,QAAQ,GAOR,EAAE,CAAC;IAET,2CAA2C;IAC3C,oEAAoE;IACpE,2FAA2F;IAC3F,wDAAwD;IACxD,4CAA4C;IAC5C,MAAM,UAAU,GAAgB,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,MAAM,CACxD,CAAC,GAAY,EAAE,EAAE,CAAC,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,KAAK,IAAI,CAC1D,CAAC;IAEF,KAAK,MAAM,CAAC,CAAC,EAAE,SAAS,CAAC,IAAI,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC;QAClD,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;YACtC,MAAM,IAAI,KAAK,CAAC,GAAG,SAAS,CAAC,WAAW,+BAA+B,CAAC,CAAC;QAC3E,CAAC;QAED,MAAM,cAAc,GAAG,mBAAmB,CAAC,SAAS,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC;QAC7E,MAAM,aAAa,GAAG,kBAAkB,CAAC,SAAS,EAAE,cAAc,CAAC,CAAC;QACpE,QAAQ,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;IAC/B,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAC"}
@@ -1,7 +1,7 @@
1
- import type { Asserts } from './asserts';
2
- import type { AssertionContext, AssertResult } from '../../../config';
3
- import type { Assertion, AssertionDefinition } from '.';
4
- import type { Oas2Visitor, Oas3Visitor, VisitFunction } from '../../../visitors';
1
+ import type { Asserts } from './asserts.js';
2
+ import type { AssertionContext, AssertResult } from '../../../config/index.js';
3
+ import type { Assertion, AssertionDefinition } from './index.js';
4
+ import type { Oas2Visitor, Oas3Visitor, VisitFunction } from '../../../visitors.js';
5
5
  export type OrderDirection = 'asc' | 'desc';
6
6
  export type OrderOptions = {
7
7
  direction: OrderDirection;
@@ -26,3 +26,4 @@ export declare function isOrdered(value: any[], options: OrderOptions | OrderDir
26
26
  export declare function runAssertion({ assert, ctx, assertionProperty, }: RunAssertionParams): AssertResult[];
27
27
  export declare function regexFromString(input: string): RegExp | null;
28
28
  export {};
29
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/rules/common/assertions/utils.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,KAAK,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAC/E,OAAO,KAAK,EAAE,SAAS,EAAE,mBAAmB,EAAqB,MAAM,YAAY,CAAC;AACpF,OAAO,KAAK,EACV,WAAW,EACX,WAAW,EAEX,aAAa,EACd,MAAM,sBAAsB,CAAC;AAE9B,MAAM,MAAM,cAAc,GAAG,KAAK,GAAG,MAAM,CAAC;AAE5C,MAAM,MAAM,YAAY,GAAG;IACzB,SAAS,EAAE,cAAc,CAAC;IAC1B,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B,IAAI,EAAE,MAAM,OAAO,CAAC;IACpB,UAAU,EAAE,GAAG,CAAC;IAChB,UAAU,EAAE,OAAO,CAAC;IACpB,YAAY,EAAE,OAAO,CAAC;CACvB,CAAC;AAEF,KAAK,kBAAkB,GAAG;IACxB,GAAG,EAAE,gBAAgB,CAAC;IACtB,MAAM,EAAE,aAAa,CAAC;IACtB,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B,CAAC;AA0BF,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,mBAAmB,GAAG,aAAa,EAAE,CAgCjF;AAwCD,wBAAgB,kBAAkB,CAChC,SAAS,EAAE,SAAS,EACpB,cAAc,EAAE,aAAa,CAAC,GAAG,CAAC,GACjC,WAAW,GAAG,WAAW,CAkE3B;AAED,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,GAAG,aAAa,CAAC,GAAG,CAAC,CA6B9F;AAuBD,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE,GAAG,MAAM,CASlF;AAED,wBAAgB,SAAS,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE,OAAO,EAAE,YAAY,GAAG,cAAc,GAAG,OAAO,CA8BvF;AAED,wBAAgB,YAAY,CAAC,EAC3B,MAAM,EACN,GAAG,EACH,iBAAiB,GAClB,EAAE,kBAAkB,GAAG,YAAY,EAAE,CAyBrC;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAG5D"}
@@ -1,16 +1,7 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getAssertsToApply = getAssertsToApply;
4
- exports.buildVisitorObject = buildVisitorObject;
5
- exports.buildSubjectVisitor = buildSubjectVisitor;
6
- exports.getIntersectionLength = getIntersectionLength;
7
- exports.isOrdered = isOrdered;
8
- exports.runAssertion = runAssertion;
9
- exports.regexFromString = regexFromString;
10
- const asserts_1 = require("./asserts");
11
- const logger_1 = require("../../../logger");
12
- const ref_utils_1 = require("../../../ref-utils");
13
- const utils_1 = require("../../../utils");
1
+ import { asserts, runOnKeysSet, runOnValuesSet } from './asserts.js';
2
+ import { colorize } from '../../../logger.js';
3
+ import { isRef } from '../../../ref-utils.js';
4
+ import { isTruthy, keysOf, isString } from '../../../utils.js';
14
5
  const assertionMessageTemplates = {
15
6
  problems: '{{problems}}',
16
7
  };
@@ -22,17 +13,17 @@ function getPredicatesFromLocators(locators) {
22
13
  ((key) => filterInParentKeys.includes(key.toString()));
23
14
  const filterOutPredicate = Array.isArray(filterOutParentKeys) &&
24
15
  ((key) => !filterOutParentKeys.includes(key.toString()));
25
- return [matchKeysPredicate, filterInPredicate, filterOutPredicate].filter(utils_1.isTruthy);
16
+ return [matchKeysPredicate, filterInPredicate, filterOutPredicate].filter(isTruthy);
26
17
  }
27
- function getAssertsToApply(assertion) {
28
- const assertsToApply = (0, utils_1.keysOf)(asserts_1.asserts)
18
+ export function getAssertsToApply(assertion) {
19
+ const assertsToApply = keysOf(asserts)
29
20
  .filter((assertName) => assertion.assertions[assertName] !== undefined)
30
21
  .map((assertName) => {
31
22
  return {
32
23
  name: assertName,
33
24
  conditions: assertion.assertions[assertName],
34
- runsOnKeys: asserts_1.runOnKeysSet.has(assertName),
35
- runsOnValues: asserts_1.runOnValuesSet.has(assertName),
25
+ runsOnKeys: runOnKeysSet.has(assertName),
26
+ runsOnValues: runOnValuesSet.has(assertName),
36
27
  };
37
28
  });
38
29
  const shouldRunOnKeys = assertsToApply.find((assert) => assert.runsOnKeys && !assert.runsOnValues);
@@ -70,7 +61,7 @@ function applyAssertions(assertionDefinition, asserts, ctx) {
70
61
  }
71
62
  return assertResults.flat();
72
63
  }
73
- function buildVisitorObject(assertion, subjectVisitor) {
64
+ export function buildVisitorObject(assertion, subjectVisitor) {
74
65
  const targetVisitorLocatorPredicates = getPredicatesFromLocators(assertion.subject);
75
66
  const targetVisitorSkipFunction = targetVisitorLocatorPredicates.length
76
67
  ? (_, key) => !targetVisitorLocatorPredicates.every((predicate) => predicate(key))
@@ -89,7 +80,7 @@ function buildVisitorObject(assertion, subjectVisitor) {
89
80
  const context = assertion.where;
90
81
  for (let index = 0; index < context.length; index++) {
91
82
  const assertionDefinitionNode = context[index];
92
- if (!(0, utils_1.isString)(assertionDefinitionNode.subject?.type)) {
83
+ if (!isString(assertionDefinitionNode.subject?.type)) {
93
84
  throw new Error(`${assertion.assertionId} -> where -> [${index}]: 'type' (String) is required`);
94
85
  }
95
86
  const locatorPredicates = getPredicatesFromLocators(assertionDefinitionNode.subject);
@@ -119,10 +110,10 @@ function buildVisitorObject(assertion, subjectVisitor) {
119
110
  currentVisitorLevel[assertion.subject.type] = targetVisitor[assertion.subject.type];
120
111
  return visitor;
121
112
  }
122
- function buildSubjectVisitor(assertId, assertion) {
113
+ export function buildSubjectVisitor(assertId, assertion) {
123
114
  return (node, ctx) => {
124
115
  const properties = getAssertionProperties(assertion);
125
- const defaultMessage = `${logger_1.colorize.blue(assertId)} failed because the ${logger_1.colorize.blue(assertion.subject.type)} ${logger_1.colorize.blue(properties.join(', '))} didn't meet the assertions: ${assertionMessageTemplates.problems}`.replace(/ +/g, ' ');
116
+ 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
117
  const problems = applyAssertions(assertion, getAssertsToApply(assertion), {
127
118
  ...ctx,
128
119
  node,
@@ -161,7 +152,7 @@ function getProblemsMessage(problems) {
161
152
  ? problems[0].message ?? ''
162
153
  : problems.map((problem) => `\n- ${problem.message ?? ''}`).join('');
163
154
  }
164
- function getIntersectionLength(keys, properties) {
155
+ export function getIntersectionLength(keys, properties) {
165
156
  const props = new Set(properties);
166
157
  let count = 0;
167
158
  for (const key of keys) {
@@ -171,7 +162,7 @@ function getIntersectionLength(keys, properties) {
171
162
  }
172
163
  return count;
173
164
  }
174
- function isOrdered(value, options) {
165
+ export function isOrdered(value, options) {
175
166
  const direction = options.direction || options;
176
167
  const property = options.property;
177
168
  for (let i = 1; i < value.length; i++) {
@@ -197,15 +188,15 @@ function isOrdered(value, options) {
197
188
  }
198
189
  return true;
199
190
  }
200
- function runAssertion({ assert, ctx, assertionProperty, }) {
191
+ export function runAssertion({ assert, ctx, assertionProperty, }) {
201
192
  const currentLocation = assert.name === 'ref' ? ctx.rawLocation : ctx.location;
202
193
  if (assertionProperty) {
203
- const values = (0, ref_utils_1.isRef)(ctx.node[assertionProperty])
194
+ const values = isRef(ctx.node[assertionProperty])
204
195
  ? ctx.resolve(ctx.node[assertionProperty])?.node
205
196
  : ctx.node[assertionProperty];
206
197
  const rawValues = ctx.rawNode[assertionProperty];
207
198
  const location = currentLocation.child(assertionProperty);
208
- return asserts_1.asserts[assert.name](values, assert.conditions, {
199
+ return asserts[assert.name](values, assert.conditions, {
209
200
  ...ctx,
210
201
  baseLocation: location,
211
202
  rawValue: rawValues,
@@ -213,14 +204,15 @@ function runAssertion({ assert, ctx, assertionProperty, }) {
213
204
  }
214
205
  else {
215
206
  const value = Array.isArray(ctx.node) ? ctx.node : Object.keys(ctx.node);
216
- return asserts_1.asserts[assert.name](value, assert.conditions, {
207
+ return asserts[assert.name](value, assert.conditions, {
217
208
  ...ctx,
218
209
  rawValue: ctx.rawNode,
219
210
  baseLocation: currentLocation,
220
211
  });
221
212
  }
222
213
  }
223
- function regexFromString(input) {
214
+ export function regexFromString(input) {
224
215
  const matches = input.match(/^\/(.*)\/(.*)|(.*)/);
225
216
  return matches && new RegExp(matches[1] || matches[3], matches[2]);
226
217
  }
218
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../src/rules/common/assertions/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACrE,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EA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AG,GAAG;YACN,YAAY,EAAE,QAAQ;YACtB,QAAQ,EAAE,SAAS;SACpB,CAAC,CAAC;IACL,CAAC;SAAM,CAAC;QACN,MAAM,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAEzE,OAAO,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,MAAM,CAAC,UAAU,EAAE;YACpD,GAAG,GAAG;YACN,QAAQ,EAAE,GAAG,CAAC,OAAO;YACrB,YAAY,EAAE,eAAe;SAC9B,CAAC,CAAC;IACL,CAAC;AACH,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,KAAa;IAC3C,MAAM,OAAO,GAAG,KAAK,CAAC,KAAK,CAAC,oBAAoB,CAAC,CAAC;IAClD,OAAO,OAAO,IAAI,IAAI,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;AACrE,CAAC"}
@@ -1,2 +1,3 @@
1
- import type { Oas3Rule, Oas2Rule } from '../../visitors';
1
+ import type { Oas3Rule, Oas2Rule } from '../../visitors.js';
2
2
  export declare const InfoContact: Oas3Rule | Oas2Rule;
3
+ //# sourceMappingURL=info-contact.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"info-contact.d.ts","sourceRoot":"","sources":["../../../src/rules/common/info-contact.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE5D,eAAO,MAAM,WAAW,EAAE,QAAQ,GAAG,QAWpC,CAAC"}
@@ -1,17 +1,14 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.InfoContact = void 0;
4
- const utils_1 = require("../utils");
5
- const InfoContact = () => {
1
+ import { missingRequiredField } from '../utils.js';
2
+ export const InfoContact = () => {
6
3
  return {
7
4
  Info(info, { report, location }) {
8
5
  if (!info.contact) {
9
6
  report({
10
- message: (0, utils_1.missingRequiredField)('Info', 'contact'),
7
+ message: missingRequiredField('Info', 'contact'),
11
8
  location: location.child('contact').key(),
12
9
  });
13
10
  }
14
11
  },
15
12
  };
16
13
  };
17
- exports.InfoContact = InfoContact;
14
+ //# sourceMappingURL=info-contact.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"info-contact.js","sourceRoot":"","sources":["../../../src/rules/common/info-contact.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAInD,MAAM,CAAC,MAAM,WAAW,GAAwB,GAAG,EAAE;IACnD,OAAO;QACL,IAAI,CAAC,IAAI,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE;YAC7B,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;gBAClB,MAAM,CAAC;oBACL,OAAO,EAAE,oBAAoB,CAAC,MAAM,EAAE,SAAS,CAAC;oBAChD,QAAQ,EAAE,QAAQ,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,GAAG,EAAE;iBAC1C,CAAC,CAAC;YACL,CAAC;QACH,CAAC;KACF,CAAC;AACJ,CAAC,CAAC"}
@@ -1,2 +1,3 @@
1
- import type { Oas3Rule, Oas2Rule, Async2Rule, Async3Rule } from '../../visitors';
1
+ import type { Oas3Rule, Oas2Rule, Async2Rule, Async3Rule } from '../../visitors.js';
2
2
  export declare const InfoLicenseStrict: Oas2Rule | Oas3Rule | Async2Rule | Async3Rule;
3
+ //# sourceMappingURL=info-license-strict.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"info-license-strict.d.ts","sourceRoot":"","sources":["../../../src/rules/common/info-license-strict.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEpF,eAAO,MAAM,iBAAiB,EAAE,QAAQ,GAAG,QAAQ,GAAG,UAAU,GAAG,UAkBlE,CAAC"}