@goast/core 0.4.1 → 0.4.2

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 (378) hide show
  1. package/esm/src/transform/helpers.d.ts.map +1 -1
  2. package/esm/src/transform/helpers.js +5 -1
  3. package/esm/src/utils/source-builder.d.ts +2 -0
  4. package/esm/src/utils/source-builder.d.ts.map +1 -1
  5. package/esm/src/utils/source-builder.js +7 -1
  6. package/package.json +1 -4
  7. package/script/src/transform/helpers.d.ts.map +1 -1
  8. package/script/src/transform/helpers.js +5 -1
  9. package/script/src/utils/source-builder.d.ts +2 -0
  10. package/script/src/utils/source-builder.d.ts.map +1 -1
  11. package/script/src/utils/source-builder.js +8 -1
  12. package/src/src/transform/helpers.ts +6 -1
  13. package/src/src/utils/source-builder.ts +9 -1
  14. package/esm/_dnt.test_polyfills.d.ts +0 -29
  15. package/esm/_dnt.test_polyfills.d.ts.map +0 -1
  16. package/esm/_dnt.test_polyfills.js +0 -31
  17. package/esm/_dnt.test_shims.d.ts +0 -14
  18. package/esm/_dnt.test_shims.d.ts.map +0 -1
  19. package/esm/_dnt.test_shims.js +0 -69
  20. package/esm/deps/jsr.io/@std/assert/1.0.11/assertion_error.d.ts +0 -26
  21. package/esm/deps/jsr.io/@std/assert/1.0.11/assertion_error.d.ts.map +0 -1
  22. package/esm/deps/jsr.io/@std/assert/1.0.11/assertion_error.js +0 -30
  23. package/esm/deps/jsr.io/@std/assert/1.0.11/false.d.ts +0 -18
  24. package/esm/deps/jsr.io/@std/assert/1.0.11/false.d.ts.map +0 -1
  25. package/esm/deps/jsr.io/@std/assert/1.0.11/false.js +0 -22
  26. package/esm/deps/jsr.io/@std/assert/1.0.11/instance_of.d.ts +0 -23
  27. package/esm/deps/jsr.io/@std/assert/1.0.11/instance_of.d.ts.map +0 -1
  28. package/esm/deps/jsr.io/@std/assert/1.0.11/instance_of.js +0 -53
  29. package/esm/deps/jsr.io/@std/assert/1.0.11/match.d.ts +0 -18
  30. package/esm/deps/jsr.io/@std/assert/1.0.11/match.d.ts.map +0 -1
  31. package/esm/deps/jsr.io/@std/assert/1.0.11/match.js +0 -26
  32. package/esm/deps/jsr.io/@std/assert/1.0.11/not_instance_of.d.ts +0 -20
  33. package/esm/deps/jsr.io/@std/assert/1.0.11/not_instance_of.d.ts.map +0 -1
  34. package/esm/deps/jsr.io/@std/assert/1.0.11/not_instance_of.js +0 -29
  35. package/esm/deps/jsr.io/@std/assert/1.0.11/not_match.d.ts +0 -18
  36. package/esm/deps/jsr.io/@std/assert/1.0.11/not_match.d.ts.map +0 -1
  37. package/esm/deps/jsr.io/@std/assert/1.0.11/not_match.js +0 -26
  38. package/esm/deps/jsr.io/@std/assert/1.0.11/not_strict_equals.d.ts +0 -23
  39. package/esm/deps/jsr.io/@std/assert/1.0.11/not_strict_equals.d.ts.map +0 -1
  40. package/esm/deps/jsr.io/@std/assert/1.0.11/not_strict_equals.js +0 -32
  41. package/esm/deps/jsr.io/@std/assert/1.0.11/strict_equals.d.ts +0 -24
  42. package/esm/deps/jsr.io/@std/assert/1.0.11/strict_equals.d.ts.map +0 -1
  43. package/esm/deps/jsr.io/@std/assert/1.0.11/strict_equals.js +0 -57
  44. package/esm/deps/jsr.io/@std/expect/1.0.12/_assert_equals.d.ts +0 -20
  45. package/esm/deps/jsr.io/@std/expect/1.0.12/_assert_equals.d.ts.map +0 -1
  46. package/esm/deps/jsr.io/@std/expect/1.0.12/_assert_equals.js +0 -29
  47. package/esm/deps/jsr.io/@std/expect/1.0.12/_assert_is_error.d.ts +0 -14
  48. package/esm/deps/jsr.io/@std/expect/1.0.12/_assert_is_error.d.ts.map +0 -1
  49. package/esm/deps/jsr.io/@std/expect/1.0.12/_assert_is_error.js +0 -43
  50. package/esm/deps/jsr.io/@std/expect/1.0.12/_assert_not_equals.d.ts +0 -17
  51. package/esm/deps/jsr.io/@std/expect/1.0.12/_assert_not_equals.d.ts.map +0 -1
  52. package/esm/deps/jsr.io/@std/expect/1.0.12/_assert_not_equals.js +0 -26
  53. package/esm/deps/jsr.io/@std/expect/1.0.12/_assertions.d.ts +0 -4
  54. package/esm/deps/jsr.io/@std/expect/1.0.12/_assertions.d.ts.map +0 -1
  55. package/esm/deps/jsr.io/@std/expect/1.0.12/_assertions.js +0 -13
  56. package/esm/deps/jsr.io/@std/expect/1.0.12/_asymmetric_matchers.d.ts +0 -46
  57. package/esm/deps/jsr.io/@std/expect/1.0.12/_asymmetric_matchers.d.ts.map +0 -1
  58. package/esm/deps/jsr.io/@std/expect/1.0.12/_asymmetric_matchers.js +0 -161
  59. package/esm/deps/jsr.io/@std/expect/1.0.12/_build_message.d.ts +0 -6
  60. package/esm/deps/jsr.io/@std/expect/1.0.12/_build_message.d.ts.map +0 -1
  61. package/esm/deps/jsr.io/@std/expect/1.0.12/_build_message.js +0 -29
  62. package/esm/deps/jsr.io/@std/expect/1.0.12/_custom_equality_tester.d.ts +0 -4
  63. package/esm/deps/jsr.io/@std/expect/1.0.12/_custom_equality_tester.d.ts.map +0 -1
  64. package/esm/deps/jsr.io/@std/expect/1.0.12/_custom_equality_tester.js +0 -11
  65. package/esm/deps/jsr.io/@std/expect/1.0.12/_equal.d.ts +0 -9
  66. package/esm/deps/jsr.io/@std/expect/1.0.12/_equal.d.ts.map +0 -1
  67. package/esm/deps/jsr.io/@std/expect/1.0.12/_equal.js +0 -191
  68. package/esm/deps/jsr.io/@std/expect/1.0.12/_extend.d.ts +0 -4
  69. package/esm/deps/jsr.io/@std/expect/1.0.12/_extend.d.ts.map +0 -1
  70. package/esm/deps/jsr.io/@std/expect/1.0.12/_extend.js +0 -11
  71. package/esm/deps/jsr.io/@std/expect/1.0.12/_inspect_args.d.ts +0 -3
  72. package/esm/deps/jsr.io/@std/expect/1.0.12/_inspect_args.d.ts.map +0 -1
  73. package/esm/deps/jsr.io/@std/expect/1.0.12/_inspect_args.js +0 -12
  74. package/esm/deps/jsr.io/@std/expect/1.0.12/_matchers.d.ts +0 -34
  75. package/esm/deps/jsr.io/@std/expect/1.0.12/_matchers.d.ts.map +0 -1
  76. package/esm/deps/jsr.io/@std/expect/1.0.12/_matchers.js +0 -714
  77. package/esm/deps/jsr.io/@std/expect/1.0.12/_mock_util.d.ts +0 -11
  78. package/esm/deps/jsr.io/@std/expect/1.0.12/_mock_util.d.ts.map +0 -1
  79. package/esm/deps/jsr.io/@std/expect/1.0.12/_mock_util.js +0 -10
  80. package/esm/deps/jsr.io/@std/expect/1.0.12/_serializer.d.ts +0 -4
  81. package/esm/deps/jsr.io/@std/expect/1.0.12/_serializer.d.ts.map +0 -1
  82. package/esm/deps/jsr.io/@std/expect/1.0.12/_serializer.js +0 -10
  83. package/esm/deps/jsr.io/@std/expect/1.0.12/_types.d.ts +0 -843
  84. package/esm/deps/jsr.io/@std/expect/1.0.12/_types.d.ts.map +0 -1
  85. package/esm/deps/jsr.io/@std/expect/1.0.12/_types.js +0 -3
  86. package/esm/deps/jsr.io/@std/expect/1.0.12/_utils.d.ts +0 -9
  87. package/esm/deps/jsr.io/@std/expect/1.0.12/_utils.d.ts.map +0 -1
  88. package/esm/deps/jsr.io/@std/expect/1.0.12/_utils.js +0 -218
  89. package/esm/deps/jsr.io/@std/expect/1.0.12/expect.d.ts +0 -60
  90. package/esm/deps/jsr.io/@std/expect/1.0.12/expect.d.ts.map +0 -1
  91. package/esm/deps/jsr.io/@std/expect/1.0.12/expect.js +0 -523
  92. package/esm/deps/jsr.io/@std/expect/1.0.12/fn.d.ts +0 -29
  93. package/esm/deps/jsr.io/@std/expect/1.0.12/fn.d.ts.map +0 -1
  94. package/esm/deps/jsr.io/@std/expect/1.0.12/fn.js +0 -85
  95. package/esm/deps/jsr.io/@std/expect/1.0.12/mod.d.ts +0 -86
  96. package/esm/deps/jsr.io/@std/expect/1.0.12/mod.d.ts.map +0 -1
  97. package/esm/deps/jsr.io/@std/expect/1.0.12/mod.js +0 -88
  98. package/esm/deps/jsr.io/@std/internal/1.0.5/assertion_state.d.ts +0 -160
  99. package/esm/deps/jsr.io/@std/internal/1.0.5/assertion_state.d.ts.map +0 -1
  100. package/esm/deps/jsr.io/@std/internal/1.0.5/assertion_state.js +0 -199
  101. package/esm/deps/jsr.io/@std/internal/1.0.5/build_message.d.ts +0 -82
  102. package/esm/deps/jsr.io/@std/internal/1.0.5/build_message.d.ts.map +0 -1
  103. package/esm/deps/jsr.io/@std/internal/1.0.5/build_message.js +0 -111
  104. package/esm/deps/jsr.io/@std/internal/1.0.5/diff.d.ts +0 -140
  105. package/esm/deps/jsr.io/@std/internal/1.0.5/diff.d.ts.map +0 -1
  106. package/esm/deps/jsr.io/@std/internal/1.0.5/diff.js +0 -277
  107. package/esm/deps/jsr.io/@std/internal/1.0.5/diff_str.d.ts +0 -99
  108. package/esm/deps/jsr.io/@std/internal/1.0.5/diff_str.d.ts.map +0 -1
  109. package/esm/deps/jsr.io/@std/internal/1.0.5/diff_str.js +0 -180
  110. package/esm/deps/jsr.io/@std/internal/1.0.5/format.d.ts +0 -2
  111. package/esm/deps/jsr.io/@std/internal/1.0.5/format.d.ts.map +0 -1
  112. package/esm/deps/jsr.io/@std/internal/1.0.5/format.js +0 -37
  113. package/esm/deps/jsr.io/@std/internal/1.0.5/styles.d.ts +0 -159
  114. package/esm/deps/jsr.io/@std/internal/1.0.5/styles.d.ts.map +0 -1
  115. package/esm/deps/jsr.io/@std/internal/1.0.5/styles.js +0 -207
  116. package/esm/deps/jsr.io/@std/internal/1.0.5/types.d.ts +0 -16
  117. package/esm/deps/jsr.io/@std/internal/1.0.5/types.d.ts.map +0 -1
  118. package/esm/deps/jsr.io/@std/internal/1.0.5/types.js +0 -2
  119. package/esm/deps/jsr.io/@std/testing/1.0.9/_test_suite.d.ts +0 -79
  120. package/esm/deps/jsr.io/@std/testing/1.0.9/_test_suite.d.ts.map +0 -1
  121. package/esm/deps/jsr.io/@std/testing/1.0.9/_test_suite.js +0 -380
  122. package/esm/deps/jsr.io/@std/testing/1.0.9/bdd.d.ts +0 -738
  123. package/esm/deps/jsr.io/@std/testing/1.0.9/bdd.d.ts.map +0 -1
  124. package/esm/deps/jsr.io/@std/testing/1.0.9/bdd.js +0 -654
  125. package/esm/src/collect/helpers.test.d.ts +0 -2
  126. package/esm/src/collect/helpers.test.d.ts.map +0 -1
  127. package/esm/src/collect/helpers.test.js +0 -77
  128. package/esm/src/transform/helpers.test.d.ts +0 -2
  129. package/esm/src/transform/helpers.test.d.ts.map +0 -1
  130. package/esm/src/transform/helpers.test.js +0 -265
  131. package/esm/src/utils/action-provider.test.d.ts +0 -2
  132. package/esm/src/utils/action-provider.test.d.ts.map +0 -1
  133. package/esm/src/utils/action-provider.test.js +0 -28
  134. package/esm/src/utils/common.utils.test.d.ts +0 -2
  135. package/esm/src/utils/common.utils.test.d.ts.map +0 -1
  136. package/esm/src/utils/common.utils.test.js +0 -18
  137. package/esm/src/utils/condition.test.d.ts +0 -2
  138. package/esm/src/utils/condition.test.d.ts.map +0 -1
  139. package/esm/src/utils/condition.test.js +0 -31
  140. package/esm/src/utils/endpoint.utils.test.d.ts +0 -2
  141. package/esm/src/utils/endpoint.utils.test.d.ts.map +0 -1
  142. package/esm/src/utils/endpoint.utils.test.js +0 -31
  143. package/esm/src/utils/factory.test.d.ts +0 -2
  144. package/esm/src/utils/factory.test.d.ts.map +0 -1
  145. package/esm/src/utils/factory.test.js +0 -34
  146. package/esm/src/utils/generator.utils.test.d.ts +0 -2
  147. package/esm/src/utils/generator.utils.test.d.ts.map +0 -1
  148. package/esm/src/utils/generator.utils.test.js +0 -13
  149. package/esm/src/utils/object.utils.test.d.ts +0 -2
  150. package/esm/src/utils/object.utils.test.d.ts.map +0 -1
  151. package/esm/src/utils/object.utils.test.js +0 -29
  152. package/esm/src/utils/schema.utils.test.d.ts +0 -2
  153. package/esm/src/utils/schema.utils.test.d.ts.map +0 -1
  154. package/esm/src/utils/schema.utils.test.js +0 -70
  155. package/esm/src/utils/source-builder.test.d.ts +0 -2
  156. package/esm/src/utils/source-builder.test.d.ts.map +0 -1
  157. package/esm/src/utils/source-builder.test.js +0 -505
  158. package/esm/src/utils/string-builder/string-builder.test.d.ts +0 -2
  159. package/esm/src/utils/string-builder/string-builder.test.d.ts.map +0 -1
  160. package/esm/src/utils/string-builder/string-builder.test.js +0 -163
  161. package/esm/src/utils/string.utils.test.d.ts +0 -2
  162. package/esm/src/utils/string.utils.test.d.ts.map +0 -1
  163. package/esm/src/utils/string.utils.test.js +0 -528
  164. package/esm/tests/openapi.test.d.ts +0 -2
  165. package/esm/tests/openapi.test.d.ts.map +0 -1
  166. package/esm/tests/openapi.test.js +0 -33
  167. package/esm/tests/schema-factory.d.ts +0 -42
  168. package/esm/tests/schema-factory.d.ts.map +0 -1
  169. package/esm/tests/schema-factory.js +0 -138
  170. package/script/_dnt.test_polyfills.d.ts +0 -29
  171. package/script/_dnt.test_polyfills.d.ts.map +0 -1
  172. package/script/_dnt.test_polyfills.js +0 -32
  173. package/script/_dnt.test_shims.d.ts +0 -14
  174. package/script/_dnt.test_shims.d.ts.map +0 -1
  175. package/script/_dnt.test_shims.js +0 -79
  176. package/script/deps/jsr.io/@std/assert/1.0.11/assertion_error.d.ts +0 -26
  177. package/script/deps/jsr.io/@std/assert/1.0.11/assertion_error.d.ts.map +0 -1
  178. package/script/deps/jsr.io/@std/assert/1.0.11/assertion_error.js +0 -34
  179. package/script/deps/jsr.io/@std/assert/1.0.11/false.d.ts +0 -18
  180. package/script/deps/jsr.io/@std/assert/1.0.11/false.d.ts.map +0 -1
  181. package/script/deps/jsr.io/@std/assert/1.0.11/false.js +0 -25
  182. package/script/deps/jsr.io/@std/assert/1.0.11/instance_of.d.ts +0 -23
  183. package/script/deps/jsr.io/@std/assert/1.0.11/instance_of.d.ts.map +0 -1
  184. package/script/deps/jsr.io/@std/assert/1.0.11/instance_of.js +0 -56
  185. package/script/deps/jsr.io/@std/assert/1.0.11/match.d.ts +0 -18
  186. package/script/deps/jsr.io/@std/assert/1.0.11/match.d.ts.map +0 -1
  187. package/script/deps/jsr.io/@std/assert/1.0.11/match.js +0 -29
  188. package/script/deps/jsr.io/@std/assert/1.0.11/not_instance_of.d.ts +0 -20
  189. package/script/deps/jsr.io/@std/assert/1.0.11/not_instance_of.d.ts.map +0 -1
  190. package/script/deps/jsr.io/@std/assert/1.0.11/not_instance_of.js +0 -32
  191. package/script/deps/jsr.io/@std/assert/1.0.11/not_match.d.ts +0 -18
  192. package/script/deps/jsr.io/@std/assert/1.0.11/not_match.d.ts.map +0 -1
  193. package/script/deps/jsr.io/@std/assert/1.0.11/not_match.js +0 -29
  194. package/script/deps/jsr.io/@std/assert/1.0.11/not_strict_equals.d.ts +0 -23
  195. package/script/deps/jsr.io/@std/assert/1.0.11/not_strict_equals.d.ts.map +0 -1
  196. package/script/deps/jsr.io/@std/assert/1.0.11/not_strict_equals.js +0 -35
  197. package/script/deps/jsr.io/@std/assert/1.0.11/strict_equals.d.ts +0 -24
  198. package/script/deps/jsr.io/@std/assert/1.0.11/strict_equals.d.ts.map +0 -1
  199. package/script/deps/jsr.io/@std/assert/1.0.11/strict_equals.js +0 -60
  200. package/script/deps/jsr.io/@std/expect/1.0.12/_assert_equals.d.ts +0 -20
  201. package/script/deps/jsr.io/@std/expect/1.0.12/_assert_equals.d.ts.map +0 -1
  202. package/script/deps/jsr.io/@std/expect/1.0.12/_assert_equals.js +0 -32
  203. package/script/deps/jsr.io/@std/expect/1.0.12/_assert_is_error.d.ts +0 -14
  204. package/script/deps/jsr.io/@std/expect/1.0.12/_assert_is_error.d.ts.map +0 -1
  205. package/script/deps/jsr.io/@std/expect/1.0.12/_assert_is_error.js +0 -46
  206. package/script/deps/jsr.io/@std/expect/1.0.12/_assert_not_equals.d.ts +0 -17
  207. package/script/deps/jsr.io/@std/expect/1.0.12/_assert_not_equals.d.ts.map +0 -1
  208. package/script/deps/jsr.io/@std/expect/1.0.12/_assert_not_equals.js +0 -29
  209. package/script/deps/jsr.io/@std/expect/1.0.12/_assertions.d.ts +0 -4
  210. package/script/deps/jsr.io/@std/expect/1.0.12/_assertions.d.ts.map +0 -1
  211. package/script/deps/jsr.io/@std/expect/1.0.12/_assertions.js +0 -18
  212. package/script/deps/jsr.io/@std/expect/1.0.12/_asymmetric_matchers.d.ts +0 -46
  213. package/script/deps/jsr.io/@std/expect/1.0.12/_asymmetric_matchers.d.ts.map +0 -1
  214. package/script/deps/jsr.io/@std/expect/1.0.12/_asymmetric_matchers.js +0 -183
  215. package/script/deps/jsr.io/@std/expect/1.0.12/_build_message.d.ts +0 -6
  216. package/script/deps/jsr.io/@std/expect/1.0.12/_build_message.d.ts.map +0 -1
  217. package/script/deps/jsr.io/@std/expect/1.0.12/_build_message.js +0 -33
  218. package/script/deps/jsr.io/@std/expect/1.0.12/_custom_equality_tester.d.ts +0 -4
  219. package/script/deps/jsr.io/@std/expect/1.0.12/_custom_equality_tester.d.ts.map +0 -1
  220. package/script/deps/jsr.io/@std/expect/1.0.12/_custom_equality_tester.js +0 -15
  221. package/script/deps/jsr.io/@std/expect/1.0.12/_equal.d.ts +0 -9
  222. package/script/deps/jsr.io/@std/expect/1.0.12/_equal.d.ts.map +0 -1
  223. package/script/deps/jsr.io/@std/expect/1.0.12/_equal.js +0 -194
  224. package/script/deps/jsr.io/@std/expect/1.0.12/_extend.d.ts +0 -4
  225. package/script/deps/jsr.io/@std/expect/1.0.12/_extend.d.ts.map +0 -1
  226. package/script/deps/jsr.io/@std/expect/1.0.12/_extend.js +0 -15
  227. package/script/deps/jsr.io/@std/expect/1.0.12/_inspect_args.d.ts +0 -3
  228. package/script/deps/jsr.io/@std/expect/1.0.12/_inspect_args.d.ts.map +0 -1
  229. package/script/deps/jsr.io/@std/expect/1.0.12/_inspect_args.js +0 -17
  230. package/script/deps/jsr.io/@std/expect/1.0.12/_matchers.d.ts +0 -34
  231. package/script/deps/jsr.io/@std/expect/1.0.12/_matchers.d.ts.map +0 -1
  232. package/script/deps/jsr.io/@std/expect/1.0.12/_matchers.js +0 -748
  233. package/script/deps/jsr.io/@std/expect/1.0.12/_mock_util.d.ts +0 -11
  234. package/script/deps/jsr.io/@std/expect/1.0.12/_mock_util.d.ts.map +0 -1
  235. package/script/deps/jsr.io/@std/expect/1.0.12/_mock_util.js +0 -14
  236. package/script/deps/jsr.io/@std/expect/1.0.12/_serializer.d.ts +0 -4
  237. package/script/deps/jsr.io/@std/expect/1.0.12/_serializer.d.ts.map +0 -1
  238. package/script/deps/jsr.io/@std/expect/1.0.12/_serializer.js +0 -14
  239. package/script/deps/jsr.io/@std/expect/1.0.12/_types.d.ts +0 -843
  240. package/script/deps/jsr.io/@std/expect/1.0.12/_types.d.ts.map +0 -1
  241. package/script/deps/jsr.io/@std/expect/1.0.12/_types.js +0 -4
  242. package/script/deps/jsr.io/@std/expect/1.0.12/_utils.d.ts +0 -9
  243. package/script/deps/jsr.io/@std/expect/1.0.12/_utils.d.ts.map +0 -1
  244. package/script/deps/jsr.io/@std/expect/1.0.12/_utils.js +0 -226
  245. package/script/deps/jsr.io/@std/expect/1.0.12/expect.d.ts +0 -60
  246. package/script/deps/jsr.io/@std/expect/1.0.12/expect.d.ts.map +0 -1
  247. package/script/deps/jsr.io/@std/expect/1.0.12/expect.js +0 -527
  248. package/script/deps/jsr.io/@std/expect/1.0.12/fn.d.ts +0 -29
  249. package/script/deps/jsr.io/@std/expect/1.0.12/fn.d.ts.map +0 -1
  250. package/script/deps/jsr.io/@std/expect/1.0.12/fn.js +0 -88
  251. package/script/deps/jsr.io/@std/expect/1.0.12/mod.d.ts +0 -86
  252. package/script/deps/jsr.io/@std/expect/1.0.12/mod.d.ts.map +0 -1
  253. package/script/deps/jsr.io/@std/expect/1.0.12/mod.js +0 -91
  254. package/script/deps/jsr.io/@std/internal/1.0.5/assertion_state.d.ts +0 -160
  255. package/script/deps/jsr.io/@std/internal/1.0.5/assertion_state.d.ts.map +0 -1
  256. package/script/deps/jsr.io/@std/internal/1.0.5/assertion_state.js +0 -204
  257. package/script/deps/jsr.io/@std/internal/1.0.5/build_message.d.ts +0 -82
  258. package/script/deps/jsr.io/@std/internal/1.0.5/build_message.d.ts.map +0 -1
  259. package/script/deps/jsr.io/@std/internal/1.0.5/build_message.js +0 -116
  260. package/script/deps/jsr.io/@std/internal/1.0.5/diff.d.ts +0 -140
  261. package/script/deps/jsr.io/@std/internal/1.0.5/diff.d.ts.map +0 -1
  262. package/script/deps/jsr.io/@std/internal/1.0.5/diff.js +0 -284
  263. package/script/deps/jsr.io/@std/internal/1.0.5/diff_str.d.ts +0 -99
  264. package/script/deps/jsr.io/@std/internal/1.0.5/diff_str.d.ts.map +0 -1
  265. package/script/deps/jsr.io/@std/internal/1.0.5/diff_str.js +0 -186
  266. package/script/deps/jsr.io/@std/internal/1.0.5/format.d.ts +0 -2
  267. package/script/deps/jsr.io/@std/internal/1.0.5/format.d.ts.map +0 -1
  268. package/script/deps/jsr.io/@std/internal/1.0.5/format.js +0 -41
  269. package/script/deps/jsr.io/@std/internal/1.0.5/styles.d.ts +0 -159
  270. package/script/deps/jsr.io/@std/internal/1.0.5/styles.d.ts.map +0 -1
  271. package/script/deps/jsr.io/@std/internal/1.0.5/styles.js +0 -220
  272. package/script/deps/jsr.io/@std/internal/1.0.5/types.d.ts +0 -16
  273. package/script/deps/jsr.io/@std/internal/1.0.5/types.d.ts.map +0 -1
  274. package/script/deps/jsr.io/@std/internal/1.0.5/types.js +0 -3
  275. package/script/deps/jsr.io/@std/testing/1.0.9/_test_suite.d.ts +0 -79
  276. package/script/deps/jsr.io/@std/testing/1.0.9/_test_suite.d.ts.map +0 -1
  277. package/script/deps/jsr.io/@std/testing/1.0.9/_test_suite.js +0 -385
  278. package/script/deps/jsr.io/@std/testing/1.0.9/bdd.d.ts +0 -738
  279. package/script/deps/jsr.io/@std/testing/1.0.9/bdd.d.ts.map +0 -1
  280. package/script/deps/jsr.io/@std/testing/1.0.9/bdd.js +0 -665
  281. package/script/src/collect/helpers.test.d.ts +0 -2
  282. package/script/src/collect/helpers.test.d.ts.map +0 -1
  283. package/script/src/collect/helpers.test.js +0 -79
  284. package/script/src/transform/helpers.test.d.ts +0 -2
  285. package/script/src/transform/helpers.test.d.ts.map +0 -1
  286. package/script/src/transform/helpers.test.js +0 -267
  287. package/script/src/utils/action-provider.test.d.ts +0 -2
  288. package/script/src/utils/action-provider.test.d.ts.map +0 -1
  289. package/script/src/utils/action-provider.test.js +0 -30
  290. package/script/src/utils/common.utils.test.d.ts +0 -2
  291. package/script/src/utils/common.utils.test.d.ts.map +0 -1
  292. package/script/src/utils/common.utils.test.js +0 -20
  293. package/script/src/utils/condition.test.d.ts +0 -2
  294. package/script/src/utils/condition.test.d.ts.map +0 -1
  295. package/script/src/utils/condition.test.js +0 -33
  296. package/script/src/utils/endpoint.utils.test.d.ts +0 -2
  297. package/script/src/utils/endpoint.utils.test.d.ts.map +0 -1
  298. package/script/src/utils/endpoint.utils.test.js +0 -33
  299. package/script/src/utils/factory.test.d.ts +0 -2
  300. package/script/src/utils/factory.test.d.ts.map +0 -1
  301. package/script/src/utils/factory.test.js +0 -36
  302. package/script/src/utils/generator.utils.test.d.ts +0 -2
  303. package/script/src/utils/generator.utils.test.d.ts.map +0 -1
  304. package/script/src/utils/generator.utils.test.js +0 -15
  305. package/script/src/utils/object.utils.test.d.ts +0 -2
  306. package/script/src/utils/object.utils.test.d.ts.map +0 -1
  307. package/script/src/utils/object.utils.test.js +0 -31
  308. package/script/src/utils/schema.utils.test.d.ts +0 -2
  309. package/script/src/utils/schema.utils.test.d.ts.map +0 -1
  310. package/script/src/utils/schema.utils.test.js +0 -72
  311. package/script/src/utils/source-builder.test.d.ts +0 -2
  312. package/script/src/utils/source-builder.test.d.ts.map +0 -1
  313. package/script/src/utils/source-builder.test.js +0 -507
  314. package/script/src/utils/string-builder/string-builder.test.d.ts +0 -2
  315. package/script/src/utils/string-builder/string-builder.test.d.ts.map +0 -1
  316. package/script/src/utils/string-builder/string-builder.test.js +0 -165
  317. package/script/src/utils/string.utils.test.d.ts +0 -2
  318. package/script/src/utils/string.utils.test.d.ts.map +0 -1
  319. package/script/src/utils/string.utils.test.js +0 -530
  320. package/script/tests/openapi.test.d.ts +0 -2
  321. package/script/tests/openapi.test.d.ts.map +0 -1
  322. package/script/tests/openapi.test.js +0 -35
  323. package/script/tests/schema-factory.d.ts +0 -42
  324. package/script/tests/schema-factory.d.ts.map +0 -1
  325. package/script/tests/schema-factory.js +0 -162
  326. package/src/_dnt.test_polyfills.ts +0 -70
  327. package/src/_dnt.test_shims.ts +0 -72
  328. package/src/deps/jsr.io/@std/assert/1.0.11/assertion_error.ts +0 -31
  329. package/src/deps/jsr.io/@std/assert/1.0.11/false.ts +0 -26
  330. package/src/deps/jsr.io/@std/assert/1.0.11/instance_of.ts +0 -64
  331. package/src/deps/jsr.io/@std/assert/1.0.11/match.ts +0 -30
  332. package/src/deps/jsr.io/@std/assert/1.0.11/not_instance_of.ts +0 -33
  333. package/src/deps/jsr.io/@std/assert/1.0.11/not_match.ts +0 -30
  334. package/src/deps/jsr.io/@std/assert/1.0.11/not_strict_equals.ts +0 -42
  335. package/src/deps/jsr.io/@std/assert/1.0.11/strict_equals.ts +0 -67
  336. package/src/deps/jsr.io/@std/expect/1.0.12/_assert_equals.ts +0 -38
  337. package/src/deps/jsr.io/@std/expect/1.0.12/_assert_is_error.ts +0 -54
  338. package/src/deps/jsr.io/@std/expect/1.0.12/_assert_not_equals.ts +0 -35
  339. package/src/deps/jsr.io/@std/expect/1.0.12/_assertions.ts +0 -18
  340. package/src/deps/jsr.io/@std/expect/1.0.12/_asymmetric_matchers.ts +0 -198
  341. package/src/deps/jsr.io/@std/expect/1.0.12/_build_message.ts +0 -51
  342. package/src/deps/jsr.io/@std/expect/1.0.12/_custom_equality_tester.ts +0 -19
  343. package/src/deps/jsr.io/@std/expect/1.0.12/_equal.ts +0 -230
  344. package/src/deps/jsr.io/@std/expect/1.0.12/_extend.ts +0 -16
  345. package/src/deps/jsr.io/@std/expect/1.0.12/_inspect_args.ts +0 -15
  346. package/src/deps/jsr.io/@std/expect/1.0.12/_matchers.ts +0 -1028
  347. package/src/deps/jsr.io/@std/expect/1.0.12/_mock_util.ts +0 -22
  348. package/src/deps/jsr.io/@std/expect/1.0.12/_serializer.ts +0 -15
  349. package/src/deps/jsr.io/@std/expect/1.0.12/_types.ts +0 -923
  350. package/src/deps/jsr.io/@std/expect/1.0.12/_utils.ts +0 -283
  351. package/src/deps/jsr.io/@std/expect/1.0.12/expect.ts +0 -620
  352. package/src/deps/jsr.io/@std/expect/1.0.12/fn.ts +0 -91
  353. package/src/deps/jsr.io/@std/expect/1.0.12/mod.ts +0 -89
  354. package/src/deps/jsr.io/@std/internal/1.0.5/assertion_state.ts +0 -214
  355. package/src/deps/jsr.io/@std/internal/1.0.5/build_message.ts +0 -134
  356. package/src/deps/jsr.io/@std/internal/1.0.5/diff.ts +0 -317
  357. package/src/deps/jsr.io/@std/internal/1.0.5/diff_str.ts +0 -204
  358. package/src/deps/jsr.io/@std/internal/1.0.5/format.ts +0 -39
  359. package/src/deps/jsr.io/@std/internal/1.0.5/styles.ts +0 -233
  360. package/src/deps/jsr.io/@std/internal/1.0.5/types.ts +0 -18
  361. package/src/deps/jsr.io/@std/testing/1.0.9/_test_suite.ts +0 -448
  362. package/src/deps/jsr.io/@std/testing/1.0.9/bdd.ts +0 -1288
  363. package/src/src/collect/helpers.test.ts +0 -91
  364. package/src/src/transform/helpers.test.ts +0 -316
  365. package/src/src/utils/action-provider.test.ts +0 -32
  366. package/src/src/utils/common.utils.test.ts +0 -22
  367. package/src/src/utils/condition.test.ts +0 -36
  368. package/src/src/utils/endpoint.utils.test.ts +0 -36
  369. package/src/src/utils/factory.test.ts +0 -31
  370. package/src/src/utils/generator.utils.test.ts +0 -16
  371. package/src/src/utils/object.utils.test.ts +0 -33
  372. package/src/src/utils/schema.utils.test.ts +0 -88
  373. package/src/src/utils/source-builder.test.ts +0 -657
  374. package/src/src/utils/string-builder/string-builder.test.ts +0 -188
  375. package/src/src/utils/string.utils.test.ts +0 -691
  376. package/src/tests/openapi.test.ts +0 -50
  377. package/src/tests/schema-factory.ts +0 -185
  378. package/test_runner.js +0 -221
@@ -1,79 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- // deno-lint-ignore-file no-explicit-any
4
- require("../../_dnt.test_polyfills.js");
5
- const mod_js_1 = require("../../deps/jsr.io/@std/expect/1.0.12/mod.js");
6
- const bdd_js_1 = require("../../deps/jsr.io/@std/testing/1.0.9/bdd.js");
7
- const helpers_js_1 = require("./helpers.js");
8
- (0, bdd_js_1.describe)('collect', () => {
9
- const data = {};
10
- let testFunc;
11
- (0, bdd_js_1.beforeEach)(() => {
12
- testFunc = (0, mod_js_1.fn)(() => { });
13
- });
14
- (0, bdd_js_1.test)('collect should handle null and undefined input', () => {
15
- (0, helpers_js_1.collect)(data, null, testFunc);
16
- (0, helpers_js_1.collect)(data, undefined, testFunc);
17
- (0, mod_js_1.expect)(testFunc).toHaveBeenCalledTimes(0);
18
- });
19
- (0, bdd_js_1.test)('collect should handle single non-array input', () => {
20
- const obj = { 'x-id': 'test' };
21
- (0, helpers_js_1.collect)(data, obj, testFunc);
22
- (0, mod_js_1.expect)(testFunc).toHaveBeenCalledTimes(1);
23
- (0, mod_js_1.expect)(testFunc).toHaveBeenCalledWith(data, obj);
24
- });
25
- (0, bdd_js_1.test)('collect should handle array input', () => {
26
- const obj = [{ 'x-id': 'foo' }, { 'x-id': 'bar' }, { 'x-id': 'baz' }];
27
- (0, helpers_js_1.collect)(data, obj, testFunc);
28
- (0, mod_js_1.expect)(testFunc).toHaveBeenCalledTimes(3);
29
- (0, mod_js_1.expect)(testFunc).toHaveBeenCalledWith(data, obj[0]);
30
- (0, mod_js_1.expect)(testFunc).toHaveBeenCalledWith(data, obj[1]);
31
- (0, mod_js_1.expect)(testFunc).toHaveBeenCalledWith(data, obj[2]);
32
- });
33
- (0, bdd_js_1.test)('collect should handle array input with null or undefined values', () => {
34
- const obj = [{ 'x-id': 'foo' }, null, { 'x-id': 'bar' }, undefined, { 'x-id': 'baz' }];
35
- (0, helpers_js_1.collect)(data, obj, testFunc);
36
- (0, mod_js_1.expect)(testFunc).toHaveBeenCalledTimes(3);
37
- (0, mod_js_1.expect)(testFunc).toHaveBeenCalledWith(data, obj[0]);
38
- (0, mod_js_1.expect)(testFunc).toHaveBeenCalledWith(data, obj[2]);
39
- (0, mod_js_1.expect)(testFunc).toHaveBeenCalledWith(data, obj[4]);
40
- });
41
- (0, bdd_js_1.test)('collect should not call func for null or undefined array elements', () => {
42
- const obj = [null, undefined];
43
- (0, helpers_js_1.collect)(data, obj, testFunc);
44
- (0, mod_js_1.expect)(testFunc).toHaveBeenCalledTimes(0);
45
- });
46
- });
47
- (0, bdd_js_1.describe)('collectRecord', () => {
48
- const data = {};
49
- let testFunc;
50
- (0, bdd_js_1.beforeEach)(() => {
51
- testFunc = (0, mod_js_1.fn)(() => { });
52
- });
53
- (0, bdd_js_1.it)('should not call the provided function if the input object is undefined', () => {
54
- (0, helpers_js_1.collectRecord)(data, undefined, testFunc);
55
- (0, mod_js_1.expect)(testFunc).not.toHaveBeenCalled();
56
- });
57
- (0, bdd_js_1.it)('should call the provided function for each non-null and non-undefined value in the input object', () => {
58
- const obj = {
59
- a: { 'x-id': 1 },
60
- b: null,
61
- c: undefined,
62
- d: { 'x-id': 2 },
63
- };
64
- (0, helpers_js_1.collectRecord)(data, obj, testFunc);
65
- (0, mod_js_1.expect)(testFunc).toHaveBeenCalledTimes(2);
66
- (0, mod_js_1.expect)(testFunc).toHaveBeenCalledWith(data, obj.a, 'a');
67
- (0, mod_js_1.expect)(testFunc).toHaveBeenCalledWith(data, obj.d, 'd');
68
- });
69
- (0, bdd_js_1.it)('should not call the provided function for keys starting with "$" or "x-"', () => {
70
- const obj = {
71
- a: { 'x-id': 1 },
72
- $b: { 'x-id': 2 },
73
- 'x-c': { 'x-id': 3 },
74
- };
75
- (0, helpers_js_1.collectRecord)(data, obj, testFunc);
76
- (0, mod_js_1.expect)(testFunc).toHaveBeenCalledTimes(1);
77
- (0, mod_js_1.expect)(testFunc).toHaveBeenCalledWith(data, obj.a, 'a');
78
- });
79
- });
@@ -1,2 +0,0 @@
1
- import "../../_dnt.test_polyfills.js";
2
- //# sourceMappingURL=helpers.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"helpers.test.d.ts","sourceRoot":"","sources":["../../../src/src/transform/helpers.test.ts"],"names":[],"mappings":"AAAA,OAAO,8BAA8B,CAAC"}
@@ -1,267 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- require("../../_dnt.test_polyfills.js");
4
- const mod_js_1 = require("../../deps/jsr.io/@std/expect/1.0.12/mod.js");
5
- const bdd_js_1 = require("../../deps/jsr.io/@std/testing/1.0.9/bdd.js");
6
- const helpers_js_1 = require("./helpers.js");
7
- (0, bdd_js_1.describe)('determineSchemaKind', () => {
8
- const ctx = { config: { unknownTypeBehavior: 'keep-unknown' } };
9
- (0, bdd_js_1.test)('returns "oneOf" if schema has "oneOf" property', () => {
10
- const schema = { oneOf: [{}] };
11
- (0, mod_js_1.expect)((0, helpers_js_1.determineSchemaKind)(ctx, schema)).toBe('oneOf');
12
- });
13
- (0, bdd_js_1.test)('returns "combined" if schema has "allOf" or "anyOf" property', () => {
14
- const schema = { allOf: [{}], anyOf: [{}] };
15
- (0, mod_js_1.expect)((0, helpers_js_1.determineSchemaKind)(ctx, schema)).toBe('combined');
16
- });
17
- (0, bdd_js_1.test)('returns "multi-type" if schema has "type" property as an array', () => {
18
- const schema = { type: ['string', 'number'] };
19
- (0, mod_js_1.expect)((0, helpers_js_1.determineSchemaKind)(ctx, schema)).toBe('multi-type');
20
- });
21
- (0, bdd_js_1.test)('returns the value of "type" property if it is a string', () => {
22
- const schema = { type: 'string' };
23
- (0, mod_js_1.expect)((0, helpers_js_1.determineSchemaKind)(ctx, schema)).toBe('string');
24
- });
25
- (0, bdd_js_1.test)('returns "unknown" if schema has no recognizable properties', () => {
26
- const schema = {};
27
- (0, mod_js_1.expect)((0, helpers_js_1.determineSchemaKind)(ctx, schema)).toBe('unknown');
28
- });
29
- });
30
- (0, bdd_js_1.describe)('determineSchemaName', () => {
31
- (0, bdd_js_1.test)('returns the schema title if it exists', () => {
32
- const schema = {
33
- title: 'TestSchema',
34
- $src: { file: 'my-api.yml', path: '/test/schema', document: {}, originalComponent: {} },
35
- };
36
- (0, mod_js_1.expect)((0, helpers_js_1.determineSchemaName)(schema, 'TestId')).toEqual({
37
- name: 'TestSchema',
38
- isGenerated: false,
39
- });
40
- });
41
- (0, bdd_js_1.test)("returns the json schema file name if the schema title doesn't exist", () => {
42
- const schema = {
43
- $src: { path: '/', file: 'test.json', document: {}, originalComponent: {} },
44
- };
45
- (0, mod_js_1.expect)((0, helpers_js_1.determineSchemaName)(schema, 'TestId')).toEqual({
46
- name: 'test',
47
- isGenerated: true,
48
- });
49
- });
50
- (0, bdd_js_1.test)('returns the schema name extracted from $src.path if it starts with "/components/schemas/"', () => {
51
- const schema = {
52
- $src: {
53
- file: 'my-api.yml',
54
- path: '/components/schemas/TestSchema',
55
- document: {},
56
- originalComponent: {},
57
- },
58
- };
59
- (0, mod_js_1.expect)((0, helpers_js_1.determineSchemaName)(schema, 'TestId')).toEqual({
60
- name: 'TestSchema',
61
- isGenerated: false,
62
- });
63
- });
64
- (0, bdd_js_1.test)('returns the schema name extracted from $src.path if it starts with "/definitions/"', () => {
65
- const schema = {
66
- $src: {
67
- file: 'my-api.yml',
68
- path: '/definitions/TestSchema',
69
- document: {},
70
- originalComponent: {},
71
- },
72
- };
73
- (0, mod_js_1.expect)((0, helpers_js_1.determineSchemaName)(schema, 'TestId')).toEqual({
74
- name: 'TestSchema',
75
- isGenerated: false,
76
- });
77
- });
78
- (0, bdd_js_1.test)('returns a generated name based on the $src.path for response schemas', () => {
79
- const schema = {
80
- $src: {
81
- file: 'my-api.yml',
82
- path: '/paths/users/{userId}/email-verification/{token}/get/responses/200/',
83
- document: {},
84
- originalComponent: {},
85
- },
86
- };
87
- (0, mod_js_1.expect)((0, helpers_js_1.determineSchemaName)(schema, 'TestId')).toEqual({
88
- name: 'get_users_:userId_email-verification_:token_200_Response',
89
- isGenerated: true,
90
- });
91
- });
92
- (0, bdd_js_1.test)('returns the provided id if no other name can be determined', () => {
93
- const schema = {
94
- $src: { file: 'my-api.yml', path: '/test/schema', document: {}, originalComponent: {} },
95
- };
96
- (0, mod_js_1.expect)((0, helpers_js_1.determineSchemaName)(schema, 'TestId')).toEqual({ name: 'TestId', isGenerated: true });
97
- });
98
- });
99
- (0, bdd_js_1.describe)('determineSchemaAccessibility', () => {
100
- (0, bdd_js_1.test)('returns "readOnly" if "readOnly" property is true and "writeOnly" property is false or undefined', () => {
101
- const schema = { readOnly: true };
102
- (0, mod_js_1.expect)((0, helpers_js_1.determineSchemaAccessibility)(schema)).toBe('readOnly');
103
- });
104
- (0, bdd_js_1.test)('returns "writeOnly" if "writeOnly" property is true and "readOnly" property is false or undefined', () => {
105
- const schema = { writeOnly: true };
106
- (0, mod_js_1.expect)((0, helpers_js_1.determineSchemaAccessibility)(schema)).toBe('writeOnly');
107
- });
108
- (0, bdd_js_1.test)('returns "none" if both "readOnly" and "writeOnly" properties are true', () => {
109
- const schema = { readOnly: true, writeOnly: true };
110
- (0, mod_js_1.expect)((0, helpers_js_1.determineSchemaAccessibility)(schema)).toBe('none');
111
- });
112
- (0, bdd_js_1.test)('returns "all" if neither "readOnly" nor "writeOnly" properties are true', () => {
113
- const schema = {};
114
- (0, mod_js_1.expect)((0, helpers_js_1.determineSchemaAccessibility)(schema)).toBe('all');
115
- });
116
- });
117
- (0, bdd_js_1.describe)('getCustomFields', () => {
118
- (0, bdd_js_1.test)('returns an empty object if no custom fields are present', () => {
119
- const schema = { type: 'string' };
120
- (0, mod_js_1.expect)((0, helpers_js_1.getCustomFields)(schema)).toEqual({});
121
- });
122
- (0, bdd_js_1.test)('returns an object containing all custom fields starting with "x-"', () => {
123
- const schema = {
124
- type: 'string',
125
- 'x-custom-field-1': 'value1',
126
- 'x-custom-field-2': 'value2',
127
- };
128
- (0, mod_js_1.expect)((0, helpers_js_1.getCustomFields)(schema)).toEqual({
129
- 'custom-field-1': 'value1',
130
- 'custom-field-2': 'value2',
131
- });
132
- });
133
- (0, bdd_js_1.test)('returns an object containing only custom fields starting with "x-"', () => {
134
- const schema = {
135
- type: 'string',
136
- 'x-custom-field-1': 'value1',
137
- 'not-a-custom-field': 'value2',
138
- };
139
- (0, mod_js_1.expect)((0, helpers_js_1.getCustomFields)(schema)).toEqual({ 'custom-field-1': 'value1' });
140
- });
141
- (0, bdd_js_1.test)('returns an object with the same values as the original custom fields', () => {
142
- const schema = {
143
- type: 'string',
144
- 'x-custom-field-1': { key1: 'value1' },
145
- 'x-custom-field-2': ['value2'],
146
- };
147
- (0, mod_js_1.expect)((0, helpers_js_1.getCustomFields)(schema)).toEqual({
148
- 'custom-field-1': { key1: 'value1' },
149
- 'custom-field-2': ['value2'],
150
- });
151
- });
152
- });
153
- (0, bdd_js_1.describe)('determineEndpointName', () => {
154
- (0, bdd_js_1.test)('returns the operationId if it exists', () => {
155
- const endpointInfo = {
156
- method: 'get',
157
- path: '/users',
158
- operation: { operationId: 'getUserList' },
159
- };
160
- (0, mod_js_1.expect)((0, helpers_js_1.determineEndpointName)(endpointInfo)).toBe('getUserList');
161
- });
162
- (0, bdd_js_1.test)('returns a generated name based on the method and path if operationId is not present', () => {
163
- const endpointInfo = { method: 'post', path: '/users/{userId}/comments', operation: {} };
164
- (0, mod_js_1.expect)((0, helpers_js_1.determineEndpointName)(endpointInfo)).toBe('post_users_:userId_comments');
165
- });
166
- (0, bdd_js_1.test)('replaces path parameters with their names in the generated name', () => {
167
- const endpointInfo = {
168
- method: 'get',
169
- path: '/users/{userId}/comments/{commentId}',
170
- operation: {},
171
- };
172
- (0, mod_js_1.expect)((0, helpers_js_1.determineEndpointName)(endpointInfo)).toBe('get_users_:userId_comments_:commentId');
173
- });
174
- (0, bdd_js_1.test)('replaces slashes in the path with underscores in the generated name', () => {
175
- const endpointInfo = { method: 'put', path: '/users/{userId}/profile-picture', operation: {} };
176
- (0, mod_js_1.expect)((0, helpers_js_1.determineEndpointName)(endpointInfo)).toBe('put_users_:userId_profile-picture');
177
- });
178
- });
179
- (0, bdd_js_1.describe)('transformAdditionalProperties', () => {
180
- const context = {};
181
- (0, bdd_js_1.test)('returns undefined if additionalProperties is undefined or null', () => {
182
- const schema1 = { additionalProperties: undefined };
183
- const schema2 = { additionalProperties: null };
184
- (0, mod_js_1.expect)((0, helpers_js_1.transformAdditionalProperties)(context, schema1, () => ({}))).toBeUndefined();
185
- (0, mod_js_1.expect)((0, helpers_js_1.transformAdditionalProperties)(context, schema2, () => ({}))).toBeUndefined();
186
- });
187
- (0, bdd_js_1.test)('returns a boolean value if additionalProperties is a boolean value', () => {
188
- const schema1 = { additionalProperties: true };
189
- const schema2 = { additionalProperties: false };
190
- (0, mod_js_1.expect)((0, helpers_js_1.transformAdditionalProperties)(context, schema1, () => ({}))).toBe(true);
191
- (0, mod_js_1.expect)((0, helpers_js_1.transformAdditionalProperties)(context, schema2, () => ({}))).toBe(false);
192
- });
193
- (0, bdd_js_1.test)('calls transformSchema with the additionalProperties schema if it exists', () => {
194
- const schema = { additionalProperties: { type: 'string' } };
195
- const transformSchema = (0, mod_js_1.fn)(() => ({}));
196
- (0, helpers_js_1.transformAdditionalProperties)(context, schema, transformSchema);
197
- (0, mod_js_1.expect)(transformSchema).toHaveBeenCalledWith(context, schema.additionalProperties);
198
- });
199
- (0, bdd_js_1.test)('returns the result of calling transformSchema with the additionalProperties schema if it exists', () => {
200
- const schema = { additionalProperties: { type: 'string' } };
201
- const transformedSchema = { type: 'string' };
202
- const transformSchema = (0, mod_js_1.fn)(() => transformedSchema);
203
- (0, mod_js_1.expect)((0, helpers_js_1.transformAdditionalProperties)(context, schema, transformSchema)).toBe(transformedSchema);
204
- });
205
- });
206
- (0, bdd_js_1.describe)('transformSchemaProperties', () => {
207
- const context = {};
208
- (0, bdd_js_1.test)('returns an empty array if properties is undefined', () => {
209
- const schema = {};
210
- const transformSchema = (0, mod_js_1.fn)(() => ({}));
211
- (0, mod_js_1.expect)((0, helpers_js_1.transformSchemaProperties)(context, schema, transformSchema).size).toEqual(0);
212
- });
213
- (0, bdd_js_1.test)('calls transformSchema with each property schema and builds an array of ApiSchemaProperties', () => {
214
- const schema = {
215
- properties: {
216
- prop1: { type: 'string' },
217
- prop2: { type: 'integer' },
218
- },
219
- required: ['prop1'],
220
- };
221
- const transformedSchema1 = { type: 'string' };
222
- const transformedSchema2 = { type: 'integer' };
223
- // deno-lint-ignore no-explicit-any
224
- const transformSchema = (0, mod_js_1.fn)((_, subSchema) => subSchema.type === 'string' ? transformedSchema1 : transformedSchema2);
225
- const result = (0, helpers_js_1.transformSchemaProperties)(context, schema, transformSchema);
226
- (0, mod_js_1.expect)(Array.from(result.entries())).toEqual([
227
- ['prop1', { name: 'prop1', schema: transformedSchema1 }],
228
- ['prop2', { name: 'prop2', schema: transformedSchema2 }],
229
- ]);
230
- (0, mod_js_1.expect)(transformSchema).toHaveBeenCalledTimes(2);
231
- (0, mod_js_1.expect)(transformSchema).toHaveBeenCalledWith(context, schema.properties.prop1);
232
- (0, mod_js_1.expect)(transformSchema).toHaveBeenCalledWith(context, schema.properties.prop2);
233
- });
234
- (0, bdd_js_1.test)('ignores properties with the name "$src"', () => {
235
- const schema = { properties: { prop1: { type: 'string' }, $src: { path: '/test/schema' } } };
236
- const transformedSchema1 = { type: 'string' };
237
- const transformSchema = (0, mod_js_1.fn)(() => transformedSchema1);
238
- const result = (0, helpers_js_1.transformSchemaProperties)(context, schema, transformSchema);
239
- (0, mod_js_1.expect)(Array.from(result.entries())).toEqual([['prop1', { name: 'prop1', schema: transformedSchema1 }]]);
240
- (0, mod_js_1.expect)(transformSchema).toHaveBeenCalledTimes(1);
241
- (0, mod_js_1.expect)(transformSchema).toHaveBeenCalledWith(context, schema.properties.prop1);
242
- });
243
- });
244
- (0, bdd_js_1.describe)('IdGenerator', () => {
245
- (0, bdd_js_1.test)('generates unique ids based on the provided name', () => {
246
- const idGenerator = new helpers_js_1.IdGenerator();
247
- const id1 = idGenerator.generateId('test');
248
- const id2 = idGenerator.generateId('test');
249
- (0, mod_js_1.expect)(id1).not.toBe(id2);
250
- });
251
- (0, bdd_js_1.test)('generates ids with the format "{name}-{n}"', () => {
252
- const idGenerator = new helpers_js_1.IdGenerator();
253
- const id1 = idGenerator.generateId('test');
254
- (0, mod_js_1.expect)(id1).toMatch(/^test-\d+$/);
255
- });
256
- (0, bdd_js_1.test)('increments the id number for each new id generated with the same name', () => {
257
- const idGenerator = new helpers_js_1.IdGenerator();
258
- const id1 = idGenerator.generateId('test');
259
- const id2 = idGenerator.generateId('test');
260
- const id3 = idGenerator.generateId('test2');
261
- const id4 = idGenerator.generateId('test');
262
- (0, mod_js_1.expect)(id1).toBe('test-1');
263
- (0, mod_js_1.expect)(id2).toBe('test-2');
264
- (0, mod_js_1.expect)(id3).toBe('test2-1');
265
- (0, mod_js_1.expect)(id4).toBe('test-3');
266
- });
267
- });
@@ -1,2 +0,0 @@
1
- import "../../_dnt.test_polyfills.js";
2
- //# sourceMappingURL=action-provider.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"action-provider.test.d.ts","sourceRoot":"","sources":["../../../src/src/utils/action-provider.test.ts"],"names":[],"mappings":"AAAA,OAAO,8BAA8B,CAAC"}
@@ -1,30 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- require("../../_dnt.test_polyfills.js");
4
- const mod_js_1 = require("../../deps/jsr.io/@std/expect/1.0.12/mod.js");
5
- const bdd_js_1 = require("../../deps/jsr.io/@std/testing/1.0.9/bdd.js");
6
- const action_provider_js_1 = require("./action-provider.js");
7
- (0, bdd_js_1.describe)('ActionProvider', () => {
8
- (0, bdd_js_1.describe)('run', () => {
9
- (0, bdd_js_1.it)('should create an instance using a constructor and call the specified function', () => {
10
- class Foo {
11
- bar(value) {
12
- return `Hello, ${value}!`;
13
- }
14
- }
15
- const provider = action_provider_js_1.ActionProvider.fromType(Foo, 'bar');
16
- const result = provider.run('world');
17
- (0, mod_js_1.expect)(result).toBe('Hello, world!');
18
- });
19
- (0, bdd_js_1.it)('should call a function and return the result', () => {
20
- const provider = action_provider_js_1.ActionProvider.fromFn((value) => `Hello, ${value}!`);
21
- const result = provider.run('world');
22
- (0, mod_js_1.expect)(result).toBe('Hello, world!');
23
- });
24
- (0, bdd_js_1.it)('should call a function on a value and return the result', () => {
25
- const provider = action_provider_js_1.ActionProvider.fromValue({ bar: (value) => `Hello, ${value}!` }, 'bar');
26
- const result = provider.run('world');
27
- (0, mod_js_1.expect)(result).toBe('Hello, world!');
28
- });
29
- });
30
- });
@@ -1,2 +0,0 @@
1
- import "../../_dnt.test_polyfills.js";
2
- //# sourceMappingURL=common.utils.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"common.utils.test.d.ts","sourceRoot":"","sources":["../../../src/src/utils/common.utils.test.ts"],"names":[],"mappings":"AAAA,OAAO,8BAA8B,CAAC"}
@@ -1,20 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- require("../../_dnt.test_polyfills.js");
4
- const mod_js_1 = require("../../deps/jsr.io/@std/expect/1.0.12/mod.js");
5
- const bdd_js_1 = require("../../deps/jsr.io/@std/testing/1.0.9/bdd.js");
6
- const common_utils_js_1 = require("./common.utils.js");
7
- (0, bdd_js_1.describe)('isNullish', () => {
8
- (0, bdd_js_1.test)('returns true for null', () => {
9
- (0, mod_js_1.expect)((0, common_utils_js_1.isNullish)(null)).toBe(true);
10
- });
11
- (0, bdd_js_1.test)('returns true for undefined', () => {
12
- (0, mod_js_1.expect)((0, common_utils_js_1.isNullish)(undefined)).toBe(true);
13
- });
14
- (0, bdd_js_1.test)('returns false for any other value', () => {
15
- (0, mod_js_1.expect)((0, common_utils_js_1.isNullish)('')).toBe(false);
16
- (0, mod_js_1.expect)((0, common_utils_js_1.isNullish)(false)).toBe(false);
17
- (0, mod_js_1.expect)((0, common_utils_js_1.isNullish)(0)).toBe(false);
18
- (0, mod_js_1.expect)((0, common_utils_js_1.isNullish)({})).toBe(false);
19
- });
20
- });
@@ -1,2 +0,0 @@
1
- import "../../_dnt.test_polyfills.js";
2
- //# sourceMappingURL=condition.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"condition.test.d.ts","sourceRoot":"","sources":["../../../src/src/utils/condition.test.ts"],"names":[],"mappings":"AAAA,OAAO,8BAA8B,CAAC"}
@@ -1,33 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- require("../../_dnt.test_polyfills.js");
4
- const mod_js_1 = require("../../deps/jsr.io/@std/expect/1.0.12/mod.js");
5
- const bdd_js_1 = require("../../deps/jsr.io/@std/testing/1.0.9/bdd.js");
6
- const condition_js_1 = require("./condition.js");
7
- (0, bdd_js_1.describe)('evalCondition', () => {
8
- (0, bdd_js_1.it)('should return the correct boolean value when condition is true', () => {
9
- const condition = true;
10
- const result = (0, condition_js_1.evalCondition)(condition);
11
- (0, mod_js_1.expect)(result).toBe(true);
12
- });
13
- (0, bdd_js_1.it)('should return the correct boolean value when condition is false', () => {
14
- const condition = false;
15
- const result = (0, condition_js_1.evalCondition)(condition);
16
- (0, mod_js_1.expect)(result).toBe(false);
17
- });
18
- (0, bdd_js_1.it)('should call the condition function and return the correct boolean value without context', () => {
19
- const condition = (0, mod_js_1.fn)(() => true);
20
- const result = (0, condition_js_1.evalCondition)(condition);
21
- (0, mod_js_1.expect)(result).toBe(true);
22
- (0, mod_js_1.expect)(condition).toHaveBeenCalledTimes(1);
23
- });
24
- (0, bdd_js_1.it)('should call the condition function with the provided context and return the correct boolean value', () => {
25
- const context = {
26
- prop: 5,
27
- };
28
- const condition = (0, mod_js_1.fn)((ctx) => ctx.prop === 5);
29
- const result = (0, condition_js_1.evalCondition)(condition, context);
30
- (0, mod_js_1.expect)(result).toBe(true);
31
- (0, mod_js_1.expect)(condition).toHaveBeenCalledWith(context);
32
- });
33
- });
@@ -1,2 +0,0 @@
1
- import "../../_dnt.test_polyfills.js";
2
- //# sourceMappingURL=endpoint.utils.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"endpoint.utils.test.d.ts","sourceRoot":"","sources":["../../../src/src/utils/endpoint.utils.test.ts"],"names":[],"mappings":"AAAA,OAAO,8BAA8B,CAAC"}
@@ -1,33 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- require("../../_dnt.test_polyfills.js");
4
- const mod_js_1 = require("../../deps/jsr.io/@std/expect/1.0.12/mod.js");
5
- const bdd_js_1 = require("../../deps/jsr.io/@std/testing/1.0.9/bdd.js");
6
- const endpoint_utils_js_1 = require("./endpoint.utils.js");
7
- (0, bdd_js_1.describe)('getEndpointUrlPreview', () => {
8
- (0, bdd_js_1.it)('should return the endpoint path if there are no query parameters', () => {
9
- const endpoint = { path: '/foo', parameters: [] };
10
- (0, mod_js_1.expect)((0, endpoint_utils_js_1.getEndpointUrlPreview)(endpoint)).toBe('/foo');
11
- });
12
- (0, bdd_js_1.it)('should append query parameters to the endpoint path', () => {
13
- const endpoint = {
14
- path: '/foo',
15
- parameters: [
16
- { name: 'bar', target: 'query', required: true },
17
- { name: 'baz', target: 'query', required: false },
18
- ],
19
- };
20
- (0, mod_js_1.expect)((0, endpoint_utils_js_1.getEndpointUrlPreview)(endpoint)).toBe('/foo?bar={bar}&[baz={baz}]');
21
- });
22
- (0, bdd_js_1.it)('should handle multiple query parameters', () => {
23
- const endpoint = {
24
- path: '/foo',
25
- parameters: [
26
- { name: 'bar', target: 'query', required: true },
27
- { name: 'baz', target: 'query', required: false },
28
- { name: 'qux', target: 'query', required: true },
29
- ],
30
- };
31
- (0, mod_js_1.expect)((0, endpoint_utils_js_1.getEndpointUrlPreview)(endpoint)).toBe('/foo?bar={bar}&[baz={baz}]&qux={qux}');
32
- });
33
- });
@@ -1,2 +0,0 @@
1
- import "../../_dnt.test_polyfills.js";
2
- //# sourceMappingURL=factory.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"factory.test.d.ts","sourceRoot":"","sources":["../../../src/src/utils/factory.test.ts"],"names":[],"mappings":"AAAA,OAAO,8BAA8B,CAAC"}
@@ -1,36 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- require("../../_dnt.test_polyfills.js");
4
- const mod_js_1 = require("../../deps/jsr.io/@std/expect/1.0.12/mod.js");
5
- const bdd_js_1 = require("../../deps/jsr.io/@std/testing/1.0.9/bdd.js");
6
- const factory_js_1 = require("./factory.js");
7
- (0, bdd_js_1.describe)('Factory', () => {
8
- (0, bdd_js_1.describe)('create', () => {
9
- (0, bdd_js_1.it)('should create an instance using a constructor', () => {
10
- class Foo {
11
- constructor(value) {
12
- Object.defineProperty(this, "value", {
13
- enumerable: true,
14
- configurable: true,
15
- writable: true,
16
- value: value
17
- });
18
- }
19
- }
20
- const factory = factory_js_1.Factory.fromType(Foo);
21
- const instance = factory.create('bar');
22
- (0, mod_js_1.expect)(instance).toBeInstanceOf(Foo);
23
- (0, mod_js_1.expect)(instance.value).toBe('bar');
24
- });
25
- (0, bdd_js_1.it)('should create an instance using a factory function', () => {
26
- const factory = factory_js_1.Factory.fromFn((value) => ({ value }));
27
- const instance = factory.create('bar');
28
- (0, mod_js_1.expect)(instance).toEqual({ value: 'bar' });
29
- });
30
- (0, bdd_js_1.it)('should return a value', () => {
31
- const factory = factory_js_1.Factory.fromValue('foo');
32
- const instance = factory.create();
33
- (0, mod_js_1.expect)(instance).toBe('foo');
34
- });
35
- });
36
- });
@@ -1,2 +0,0 @@
1
- import "../../_dnt.test_polyfills.js";
2
- //# sourceMappingURL=generator.utils.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"generator.utils.test.d.ts","sourceRoot":"","sources":["../../../src/src/utils/generator.utils.test.ts"],"names":[],"mappings":"AAAA,OAAO,8BAA8B,CAAC"}
@@ -1,15 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- require("../../_dnt.test_polyfills.js");
4
- const mod_js_1 = require("../../deps/jsr.io/@std/expect/1.0.12/mod.js");
5
- const bdd_js_1 = require("../../deps/jsr.io/@std/testing/1.0.9/bdd.js");
6
- const generator_utils_js_1 = require("./generator.utils.js");
7
- (0, bdd_js_1.describe)('getInitializedValue', () => {
8
- (0, bdd_js_1.it)('should return the value if it is not undefined', () => {
9
- const value = 'test';
10
- (0, mod_js_1.expect)((0, generator_utils_js_1.getInitializedValue)(value)).toEqual(value);
11
- });
12
- (0, bdd_js_1.it)('should throw an error if the value is undefined', () => {
13
- (0, mod_js_1.expect)(() => (0, generator_utils_js_1.getInitializedValue)(undefined)).toThrow('Generator not initialized.');
14
- });
15
- });
@@ -1,2 +0,0 @@
1
- import "../../_dnt.test_polyfills.js";
2
- //# sourceMappingURL=object.utils.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"object.utils.test.d.ts","sourceRoot":"","sources":["../../../src/src/utils/object.utils.test.ts"],"names":[],"mappings":"AAAA,OAAO,8BAA8B,CAAC"}
@@ -1,31 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- require("../../_dnt.test_polyfills.js");
4
- const mod_js_1 = require("../../deps/jsr.io/@std/expect/1.0.12/mod.js");
5
- const bdd_js_1 = require("../../deps/jsr.io/@std/testing/1.0.9/bdd.js");
6
- const object_utils_js_1 = require("./object.utils.js");
7
- (0, bdd_js_1.describe)('createOverwriteProxy', () => {
8
- (0, bdd_js_1.it)('should return an object that overwrites specified properties', () => {
9
- const obj = { a: 1, b: 2 };
10
- const proxy = (0, object_utils_js_1.createOverwriteProxy)(obj);
11
- proxy.a = 3;
12
- (0, mod_js_1.expect)(proxy.a).toEqual(3);
13
- (0, mod_js_1.expect)(obj.a).toEqual(1);
14
- });
15
- (0, bdd_js_1.it)('should return an object that does not overwrite unspecified properties', () => {
16
- const obj = { a: 1, b: 2 };
17
- const proxy = (0, object_utils_js_1.createOverwriteProxy)(obj);
18
- proxy.a = 3;
19
- (0, mod_js_1.expect)(proxy.b).toEqual(2);
20
- (0, mod_js_1.expect)(obj.b).toEqual(2);
21
- });
22
- (0, bdd_js_1.it)('should return an object that gets updates to non overwritten properties', () => {
23
- const obj = { a: 1, b: 2 };
24
- const proxy = (0, object_utils_js_1.createOverwriteProxy)(obj);
25
- proxy.a = 3;
26
- obj.a = 2;
27
- obj.b = 4;
28
- (0, mod_js_1.expect)(proxy.a).toEqual(3);
29
- (0, mod_js_1.expect)(proxy.b).toEqual(4);
30
- });
31
- });
@@ -1,2 +0,0 @@
1
- import "../../_dnt.test_polyfills.js";
2
- //# sourceMappingURL=schema.utils.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"schema.utils.test.d.ts","sourceRoot":"","sources":["../../../src/src/utils/schema.utils.test.ts"],"names":[],"mappings":"AAAA,OAAO,8BAA8B,CAAC"}