@goast/kotlin 0.4.1 → 0.4.2-beta1

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 (492) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +45 -45
  3. package/assets/client/okhttp3/ApiClient.kt +250 -250
  4. package/esm/src/assets.js +1 -1
  5. package/esm/src/generators/services/okhttp3-clients/okhttp3-client-generator.js +26 -26
  6. package/package.json +2 -2
  7. package/script/src/assets.js +1 -1
  8. package/script/src/generators/services/okhttp3-clients/okhttp3-client-generator.js +26 -26
  9. package/esm/_dnt.test_polyfills.d.ts +0 -29
  10. package/esm/_dnt.test_polyfills.d.ts.map +0 -1
  11. package/esm/_dnt.test_polyfills.js +0 -31
  12. package/esm/_dnt.test_shims.d.ts +0 -6
  13. package/esm/_dnt.test_shims.d.ts.map +0 -1
  14. package/esm/_dnt.test_shims.js +0 -61
  15. package/esm/deps/jsr.io/@std/assert/1.0.6/assertion_error.d.ts +0 -26
  16. package/esm/deps/jsr.io/@std/assert/1.0.6/assertion_error.d.ts.map +0 -1
  17. package/esm/deps/jsr.io/@std/assert/1.0.6/assertion_error.js +0 -30
  18. package/esm/deps/jsr.io/@std/assert/1.0.6/equal.d.ts +0 -17
  19. package/esm/deps/jsr.io/@std/assert/1.0.6/equal.d.ts.map +0 -1
  20. package/esm/deps/jsr.io/@std/assert/1.0.6/equal.js +0 -136
  21. package/esm/deps/jsr.io/@std/assert/1.0.6/equals.d.ts +0 -22
  22. package/esm/deps/jsr.io/@std/assert/1.0.6/equals.d.ts.map +0 -1
  23. package/esm/deps/jsr.io/@std/assert/1.0.6/equals.js +0 -45
  24. package/esm/deps/jsr.io/@std/assert/1.0.6/false.d.ts +0 -18
  25. package/esm/deps/jsr.io/@std/assert/1.0.6/false.d.ts.map +0 -1
  26. package/esm/deps/jsr.io/@std/assert/1.0.6/false.js +0 -22
  27. package/esm/deps/jsr.io/@std/assert/1.0.6/instance_of.d.ts +0 -23
  28. package/esm/deps/jsr.io/@std/assert/1.0.6/instance_of.d.ts.map +0 -1
  29. package/esm/deps/jsr.io/@std/assert/1.0.6/instance_of.js +0 -53
  30. package/esm/deps/jsr.io/@std/assert/1.0.6/is_error.d.ts +0 -25
  31. package/esm/deps/jsr.io/@std/assert/1.0.6/is_error.d.ts.map +0 -1
  32. package/esm/deps/jsr.io/@std/assert/1.0.6/is_error.js +0 -54
  33. package/esm/deps/jsr.io/@std/assert/1.0.6/match.d.ts +0 -18
  34. package/esm/deps/jsr.io/@std/assert/1.0.6/match.d.ts.map +0 -1
  35. package/esm/deps/jsr.io/@std/assert/1.0.6/match.js +0 -26
  36. package/esm/deps/jsr.io/@std/assert/1.0.6/not_instance_of.d.ts +0 -20
  37. package/esm/deps/jsr.io/@std/assert/1.0.6/not_instance_of.d.ts.map +0 -1
  38. package/esm/deps/jsr.io/@std/assert/1.0.6/not_instance_of.js +0 -29
  39. package/esm/deps/jsr.io/@std/assert/1.0.6/not_match.d.ts +0 -18
  40. package/esm/deps/jsr.io/@std/assert/1.0.6/not_match.d.ts.map +0 -1
  41. package/esm/deps/jsr.io/@std/assert/1.0.6/not_match.js +0 -26
  42. package/esm/deps/jsr.io/@std/assert/1.0.6/not_strict_equals.d.ts +0 -23
  43. package/esm/deps/jsr.io/@std/assert/1.0.6/not_strict_equals.d.ts.map +0 -1
  44. package/esm/deps/jsr.io/@std/assert/1.0.6/not_strict_equals.js +0 -32
  45. package/esm/deps/jsr.io/@std/assert/1.0.6/object_match.d.ts +0 -28
  46. package/esm/deps/jsr.io/@std/assert/1.0.6/object_match.d.ts.map +0 -1
  47. package/esm/deps/jsr.io/@std/assert/1.0.6/object_match.js +0 -159
  48. package/esm/deps/jsr.io/@std/assert/1.0.6/rejects.d.ts +0 -42
  49. package/esm/deps/jsr.io/@std/assert/1.0.6/rejects.d.ts.map +0 -1
  50. package/esm/deps/jsr.io/@std/assert/1.0.6/rejects.js +0 -53
  51. package/esm/deps/jsr.io/@std/assert/1.0.6/strict_equals.d.ts +0 -24
  52. package/esm/deps/jsr.io/@std/assert/1.0.6/strict_equals.d.ts.map +0 -1
  53. package/esm/deps/jsr.io/@std/assert/1.0.6/strict_equals.js +0 -57
  54. package/esm/deps/jsr.io/@std/expect/1.0.6/_assert_equals.d.ts +0 -20
  55. package/esm/deps/jsr.io/@std/expect/1.0.6/_assert_equals.d.ts.map +0 -1
  56. package/esm/deps/jsr.io/@std/expect/1.0.6/_assert_equals.js +0 -29
  57. package/esm/deps/jsr.io/@std/expect/1.0.6/_assert_not_equals.d.ts +0 -17
  58. package/esm/deps/jsr.io/@std/expect/1.0.6/_assert_not_equals.d.ts.map +0 -1
  59. package/esm/deps/jsr.io/@std/expect/1.0.6/_assert_not_equals.js +0 -26
  60. package/esm/deps/jsr.io/@std/expect/1.0.6/_assertion.d.ts +0 -3
  61. package/esm/deps/jsr.io/@std/expect/1.0.6/_assertion.d.ts.map +0 -1
  62. package/esm/deps/jsr.io/@std/expect/1.0.6/_assertion.js +0 -9
  63. package/esm/deps/jsr.io/@std/expect/1.0.6/_asymmetric_matchers.d.ts +0 -41
  64. package/esm/deps/jsr.io/@std/expect/1.0.6/_asymmetric_matchers.d.ts.map +0 -1
  65. package/esm/deps/jsr.io/@std/expect/1.0.6/_asymmetric_matchers.js +0 -143
  66. package/esm/deps/jsr.io/@std/expect/1.0.6/_build_message.d.ts +0 -6
  67. package/esm/deps/jsr.io/@std/expect/1.0.6/_build_message.d.ts.map +0 -1
  68. package/esm/deps/jsr.io/@std/expect/1.0.6/_build_message.js +0 -29
  69. package/esm/deps/jsr.io/@std/expect/1.0.6/_custom_equality_tester.d.ts +0 -4
  70. package/esm/deps/jsr.io/@std/expect/1.0.6/_custom_equality_tester.d.ts.map +0 -1
  71. package/esm/deps/jsr.io/@std/expect/1.0.6/_custom_equality_tester.js +0 -11
  72. package/esm/deps/jsr.io/@std/expect/1.0.6/_equal.d.ts +0 -9
  73. package/esm/deps/jsr.io/@std/expect/1.0.6/_equal.d.ts.map +0 -1
  74. package/esm/deps/jsr.io/@std/expect/1.0.6/_equal.js +0 -191
  75. package/esm/deps/jsr.io/@std/expect/1.0.6/_extend.d.ts +0 -4
  76. package/esm/deps/jsr.io/@std/expect/1.0.6/_extend.d.ts.map +0 -1
  77. package/esm/deps/jsr.io/@std/expect/1.0.6/_extend.js +0 -11
  78. package/esm/deps/jsr.io/@std/expect/1.0.6/_inspect_args.d.ts +0 -3
  79. package/esm/deps/jsr.io/@std/expect/1.0.6/_inspect_args.d.ts.map +0 -1
  80. package/esm/deps/jsr.io/@std/expect/1.0.6/_inspect_args.js +0 -12
  81. package/esm/deps/jsr.io/@std/expect/1.0.6/_matchers.d.ts +0 -34
  82. package/esm/deps/jsr.io/@std/expect/1.0.6/_matchers.d.ts.map +0 -1
  83. package/esm/deps/jsr.io/@std/expect/1.0.6/_matchers.js +0 -564
  84. package/esm/deps/jsr.io/@std/expect/1.0.6/_mock_util.d.ts +0 -11
  85. package/esm/deps/jsr.io/@std/expect/1.0.6/_mock_util.d.ts.map +0 -1
  86. package/esm/deps/jsr.io/@std/expect/1.0.6/_mock_util.js +0 -10
  87. package/esm/deps/jsr.io/@std/expect/1.0.6/_types.d.ts +0 -838
  88. package/esm/deps/jsr.io/@std/expect/1.0.6/_types.d.ts.map +0 -1
  89. package/esm/deps/jsr.io/@std/expect/1.0.6/_types.js +0 -3
  90. package/esm/deps/jsr.io/@std/expect/1.0.6/_utils.d.ts +0 -8
  91. package/esm/deps/jsr.io/@std/expect/1.0.6/_utils.d.ts.map +0 -1
  92. package/esm/deps/jsr.io/@std/expect/1.0.6/_utils.js +0 -159
  93. package/esm/deps/jsr.io/@std/expect/1.0.6/expect.d.ts +0 -52
  94. package/esm/deps/jsr.io/@std/expect/1.0.6/expect.d.ts.map +0 -1
  95. package/esm/deps/jsr.io/@std/expect/1.0.6/expect.js +0 -441
  96. package/esm/deps/jsr.io/@std/internal/1.0.4/assertion_state.d.ts +0 -75
  97. package/esm/deps/jsr.io/@std/internal/1.0.4/assertion_state.d.ts.map +0 -1
  98. package/esm/deps/jsr.io/@std/internal/1.0.4/assertion_state.js +0 -101
  99. package/esm/deps/jsr.io/@std/internal/1.0.4/build_message.d.ts +0 -82
  100. package/esm/deps/jsr.io/@std/internal/1.0.4/build_message.d.ts.map +0 -1
  101. package/esm/deps/jsr.io/@std/internal/1.0.4/build_message.js +0 -111
  102. package/esm/deps/jsr.io/@std/internal/1.0.4/diff.d.ts +0 -140
  103. package/esm/deps/jsr.io/@std/internal/1.0.4/diff.d.ts.map +0 -1
  104. package/esm/deps/jsr.io/@std/internal/1.0.4/diff.js +0 -277
  105. package/esm/deps/jsr.io/@std/internal/1.0.4/diff_str.d.ts +0 -99
  106. package/esm/deps/jsr.io/@std/internal/1.0.4/diff_str.d.ts.map +0 -1
  107. package/esm/deps/jsr.io/@std/internal/1.0.4/diff_str.js +0 -180
  108. package/esm/deps/jsr.io/@std/internal/1.0.4/format.d.ts +0 -2
  109. package/esm/deps/jsr.io/@std/internal/1.0.4/format.d.ts.map +0 -1
  110. package/esm/deps/jsr.io/@std/internal/1.0.4/format.js +0 -37
  111. package/esm/deps/jsr.io/@std/internal/1.0.4/styles.d.ts +0 -159
  112. package/esm/deps/jsr.io/@std/internal/1.0.4/styles.d.ts.map +0 -1
  113. package/esm/deps/jsr.io/@std/internal/1.0.4/styles.js +0 -207
  114. package/esm/deps/jsr.io/@std/internal/1.0.4/types.d.ts +0 -16
  115. package/esm/deps/jsr.io/@std/internal/1.0.4/types.d.ts.map +0 -1
  116. package/esm/deps/jsr.io/@std/internal/1.0.4/types.js +0 -2
  117. package/esm/deps/jsr.io/@std/testing/1.0.3/_test_suite.d.ts +0 -74
  118. package/esm/deps/jsr.io/@std/testing/1.0.3/_test_suite.d.ts.map +0 -1
  119. package/esm/deps/jsr.io/@std/testing/1.0.3/_test_suite.js +0 -340
  120. package/esm/deps/jsr.io/@std/testing/1.0.3/bdd.d.ts +0 -731
  121. package/esm/deps/jsr.io/@std/testing/1.0.3/bdd.d.ts.map +0 -1
  122. package/esm/deps/jsr.io/@std/testing/1.0.3/bdd.js +0 -576
  123. package/esm/deps/jsr.io/@std/testing/1.0.3/mock.d.ts +0 -674
  124. package/esm/deps/jsr.io/@std/testing/1.0.3/mock.d.ts.map +0 -1
  125. package/esm/deps/jsr.io/@std/testing/1.0.3/mock.js +0 -1117
  126. package/esm/src/ast/nodes/annotation.test.d.ts +0 -2
  127. package/esm/src/ast/nodes/annotation.test.d.ts.map +0 -1
  128. package/esm/src/ast/nodes/annotation.test.js +0 -56
  129. package/esm/src/ast/nodes/argument.test.d.ts +0 -2
  130. package/esm/src/ast/nodes/argument.test.d.ts.map +0 -1
  131. package/esm/src/ast/nodes/argument.test.js +0 -33
  132. package/esm/src/ast/nodes/call.test.d.ts +0 -2
  133. package/esm/src/ast/nodes/call.test.d.ts.map +0 -1
  134. package/esm/src/ast/nodes/call.test.js +0 -35
  135. package/esm/src/ast/nodes/class.test.d.ts +0 -2
  136. package/esm/src/ast/nodes/class.test.d.ts.map +0 -1
  137. package/esm/src/ast/nodes/class.test.js +0 -219
  138. package/esm/src/ast/nodes/constructor.test.d.ts +0 -2
  139. package/esm/src/ast/nodes/constructor.test.d.ts.map +0 -1
  140. package/esm/src/ast/nodes/constructor.test.js +0 -139
  141. package/esm/src/ast/nodes/doc-tag.test.d.ts +0 -2
  142. package/esm/src/ast/nodes/doc-tag.test.d.ts.map +0 -1
  143. package/esm/src/ast/nodes/doc-tag.test.js +0 -67
  144. package/esm/src/ast/nodes/doc.test.d.ts +0 -2
  145. package/esm/src/ast/nodes/doc.test.d.ts.map +0 -1
  146. package/esm/src/ast/nodes/doc.test.js +0 -33
  147. package/esm/src/ast/nodes/enum-value.test.d.ts +0 -2
  148. package/esm/src/ast/nodes/enum-value.test.d.ts.map +0 -1
  149. package/esm/src/ast/nodes/enum-value.test.js +0 -115
  150. package/esm/src/ast/nodes/enum.test.d.ts +0 -2
  151. package/esm/src/ast/nodes/enum.test.d.ts.map +0 -1
  152. package/esm/src/ast/nodes/enum.test.js +0 -129
  153. package/esm/src/ast/nodes/function.test.d.ts +0 -2
  154. package/esm/src/ast/nodes/function.test.d.ts.map +0 -1
  155. package/esm/src/ast/nodes/function.test.js +0 -160
  156. package/esm/src/ast/nodes/generic-parameter.test.d.ts +0 -2
  157. package/esm/src/ast/nodes/generic-parameter.test.d.ts.map +0 -1
  158. package/esm/src/ast/nodes/generic-parameter.test.js +0 -49
  159. package/esm/src/ast/nodes/init-block.test.d.ts +0 -2
  160. package/esm/src/ast/nodes/init-block.test.d.ts.map +0 -1
  161. package/esm/src/ast/nodes/init-block.test.js +0 -28
  162. package/esm/src/ast/nodes/interface.test.d.ts +0 -2
  163. package/esm/src/ast/nodes/interface.test.d.ts.map +0 -1
  164. package/esm/src/ast/nodes/interface.test.js +0 -121
  165. package/esm/src/ast/nodes/object.test.d.ts +0 -2
  166. package/esm/src/ast/nodes/object.test.d.ts.map +0 -1
  167. package/esm/src/ast/nodes/object.test.js +0 -78
  168. package/esm/src/ast/nodes/parameter.test.d.ts +0 -2
  169. package/esm/src/ast/nodes/parameter.test.d.ts.map +0 -1
  170. package/esm/src/ast/nodes/parameter.test.js +0 -152
  171. package/esm/src/ast/nodes/property.test.d.ts +0 -2
  172. package/esm/src/ast/nodes/property.test.d.ts.map +0 -1
  173. package/esm/src/ast/nodes/property.test.js +0 -206
  174. package/esm/src/ast/nodes/reference.test.d.ts +0 -2
  175. package/esm/src/ast/nodes/reference.test.d.ts.map +0 -1
  176. package/esm/src/ast/nodes/reference.test.js +0 -36
  177. package/esm/src/ast/nodes/string.test.d.ts +0 -2
  178. package/esm/src/ast/nodes/string.test.d.ts.map +0 -1
  179. package/esm/src/ast/nodes/string.test.js +0 -48
  180. package/esm/src/import-collection.test.d.ts +0 -2
  181. package/esm/src/import-collection.test.d.ts.map +0 -1
  182. package/esm/src/import-collection.test.js +0 -99
  183. package/esm/tests/openapi-models.test.d.ts +0 -2
  184. package/esm/tests/openapi-models.test.d.ts.map +0 -1
  185. package/esm/tests/openapi-models.test.js +0 -45
  186. package/script/_dnt.test_polyfills.d.ts +0 -29
  187. package/script/_dnt.test_polyfills.d.ts.map +0 -1
  188. package/script/_dnt.test_polyfills.js +0 -32
  189. package/script/_dnt.test_shims.d.ts +0 -6
  190. package/script/_dnt.test_shims.d.ts.map +0 -1
  191. package/script/_dnt.test_shims.js +0 -65
  192. package/script/deps/jsr.io/@std/assert/1.0.6/assertion_error.d.ts +0 -26
  193. package/script/deps/jsr.io/@std/assert/1.0.6/assertion_error.d.ts.map +0 -1
  194. package/script/deps/jsr.io/@std/assert/1.0.6/assertion_error.js +0 -34
  195. package/script/deps/jsr.io/@std/assert/1.0.6/equal.d.ts +0 -17
  196. package/script/deps/jsr.io/@std/assert/1.0.6/equal.d.ts.map +0 -1
  197. package/script/deps/jsr.io/@std/assert/1.0.6/equal.js +0 -139
  198. package/script/deps/jsr.io/@std/assert/1.0.6/equals.d.ts +0 -22
  199. package/script/deps/jsr.io/@std/assert/1.0.6/equals.d.ts.map +0 -1
  200. package/script/deps/jsr.io/@std/assert/1.0.6/equals.js +0 -48
  201. package/script/deps/jsr.io/@std/assert/1.0.6/false.d.ts +0 -18
  202. package/script/deps/jsr.io/@std/assert/1.0.6/false.d.ts.map +0 -1
  203. package/script/deps/jsr.io/@std/assert/1.0.6/false.js +0 -25
  204. package/script/deps/jsr.io/@std/assert/1.0.6/instance_of.d.ts +0 -23
  205. package/script/deps/jsr.io/@std/assert/1.0.6/instance_of.d.ts.map +0 -1
  206. package/script/deps/jsr.io/@std/assert/1.0.6/instance_of.js +0 -56
  207. package/script/deps/jsr.io/@std/assert/1.0.6/is_error.d.ts +0 -25
  208. package/script/deps/jsr.io/@std/assert/1.0.6/is_error.d.ts.map +0 -1
  209. package/script/deps/jsr.io/@std/assert/1.0.6/is_error.js +0 -57
  210. package/script/deps/jsr.io/@std/assert/1.0.6/match.d.ts +0 -18
  211. package/script/deps/jsr.io/@std/assert/1.0.6/match.d.ts.map +0 -1
  212. package/script/deps/jsr.io/@std/assert/1.0.6/match.js +0 -29
  213. package/script/deps/jsr.io/@std/assert/1.0.6/not_instance_of.d.ts +0 -20
  214. package/script/deps/jsr.io/@std/assert/1.0.6/not_instance_of.d.ts.map +0 -1
  215. package/script/deps/jsr.io/@std/assert/1.0.6/not_instance_of.js +0 -32
  216. package/script/deps/jsr.io/@std/assert/1.0.6/not_match.d.ts +0 -18
  217. package/script/deps/jsr.io/@std/assert/1.0.6/not_match.d.ts.map +0 -1
  218. package/script/deps/jsr.io/@std/assert/1.0.6/not_match.js +0 -29
  219. package/script/deps/jsr.io/@std/assert/1.0.6/not_strict_equals.d.ts +0 -23
  220. package/script/deps/jsr.io/@std/assert/1.0.6/not_strict_equals.d.ts.map +0 -1
  221. package/script/deps/jsr.io/@std/assert/1.0.6/not_strict_equals.js +0 -35
  222. package/script/deps/jsr.io/@std/assert/1.0.6/object_match.d.ts +0 -28
  223. package/script/deps/jsr.io/@std/assert/1.0.6/object_match.d.ts.map +0 -1
  224. package/script/deps/jsr.io/@std/assert/1.0.6/object_match.js +0 -162
  225. package/script/deps/jsr.io/@std/assert/1.0.6/rejects.d.ts +0 -42
  226. package/script/deps/jsr.io/@std/assert/1.0.6/rejects.d.ts.map +0 -1
  227. package/script/deps/jsr.io/@std/assert/1.0.6/rejects.js +0 -56
  228. package/script/deps/jsr.io/@std/assert/1.0.6/strict_equals.d.ts +0 -24
  229. package/script/deps/jsr.io/@std/assert/1.0.6/strict_equals.d.ts.map +0 -1
  230. package/script/deps/jsr.io/@std/assert/1.0.6/strict_equals.js +0 -60
  231. package/script/deps/jsr.io/@std/expect/1.0.6/_assert_equals.d.ts +0 -20
  232. package/script/deps/jsr.io/@std/expect/1.0.6/_assert_equals.d.ts.map +0 -1
  233. package/script/deps/jsr.io/@std/expect/1.0.6/_assert_equals.js +0 -32
  234. package/script/deps/jsr.io/@std/expect/1.0.6/_assert_not_equals.d.ts +0 -17
  235. package/script/deps/jsr.io/@std/expect/1.0.6/_assert_not_equals.d.ts.map +0 -1
  236. package/script/deps/jsr.io/@std/expect/1.0.6/_assert_not_equals.js +0 -29
  237. package/script/deps/jsr.io/@std/expect/1.0.6/_assertion.d.ts +0 -3
  238. package/script/deps/jsr.io/@std/expect/1.0.6/_assertion.d.ts.map +0 -1
  239. package/script/deps/jsr.io/@std/expect/1.0.6/_assertion.js +0 -13
  240. package/script/deps/jsr.io/@std/expect/1.0.6/_asymmetric_matchers.d.ts +0 -41
  241. package/script/deps/jsr.io/@std/expect/1.0.6/_asymmetric_matchers.d.ts.map +0 -1
  242. package/script/deps/jsr.io/@std/expect/1.0.6/_asymmetric_matchers.js +0 -161
  243. package/script/deps/jsr.io/@std/expect/1.0.6/_build_message.d.ts +0 -6
  244. package/script/deps/jsr.io/@std/expect/1.0.6/_build_message.d.ts.map +0 -1
  245. package/script/deps/jsr.io/@std/expect/1.0.6/_build_message.js +0 -33
  246. package/script/deps/jsr.io/@std/expect/1.0.6/_custom_equality_tester.d.ts +0 -4
  247. package/script/deps/jsr.io/@std/expect/1.0.6/_custom_equality_tester.d.ts.map +0 -1
  248. package/script/deps/jsr.io/@std/expect/1.0.6/_custom_equality_tester.js +0 -15
  249. package/script/deps/jsr.io/@std/expect/1.0.6/_equal.d.ts +0 -9
  250. package/script/deps/jsr.io/@std/expect/1.0.6/_equal.d.ts.map +0 -1
  251. package/script/deps/jsr.io/@std/expect/1.0.6/_equal.js +0 -194
  252. package/script/deps/jsr.io/@std/expect/1.0.6/_extend.d.ts +0 -4
  253. package/script/deps/jsr.io/@std/expect/1.0.6/_extend.d.ts.map +0 -1
  254. package/script/deps/jsr.io/@std/expect/1.0.6/_extend.js +0 -15
  255. package/script/deps/jsr.io/@std/expect/1.0.6/_inspect_args.d.ts +0 -3
  256. package/script/deps/jsr.io/@std/expect/1.0.6/_inspect_args.d.ts.map +0 -1
  257. package/script/deps/jsr.io/@std/expect/1.0.6/_inspect_args.js +0 -17
  258. package/script/deps/jsr.io/@std/expect/1.0.6/_matchers.d.ts +0 -34
  259. package/script/deps/jsr.io/@std/expect/1.0.6/_matchers.d.ts.map +0 -1
  260. package/script/deps/jsr.io/@std/expect/1.0.6/_matchers.js +0 -598
  261. package/script/deps/jsr.io/@std/expect/1.0.6/_mock_util.d.ts +0 -11
  262. package/script/deps/jsr.io/@std/expect/1.0.6/_mock_util.d.ts.map +0 -1
  263. package/script/deps/jsr.io/@std/expect/1.0.6/_mock_util.js +0 -14
  264. package/script/deps/jsr.io/@std/expect/1.0.6/_types.d.ts +0 -838
  265. package/script/deps/jsr.io/@std/expect/1.0.6/_types.d.ts.map +0 -1
  266. package/script/deps/jsr.io/@std/expect/1.0.6/_types.js +0 -4
  267. package/script/deps/jsr.io/@std/expect/1.0.6/_utils.d.ts +0 -8
  268. package/script/deps/jsr.io/@std/expect/1.0.6/_utils.d.ts.map +0 -1
  269. package/script/deps/jsr.io/@std/expect/1.0.6/_utils.js +0 -166
  270. package/script/deps/jsr.io/@std/expect/1.0.6/expect.d.ts +0 -52
  271. package/script/deps/jsr.io/@std/expect/1.0.6/expect.d.ts.map +0 -1
  272. package/script/deps/jsr.io/@std/expect/1.0.6/expect.js +0 -445
  273. package/script/deps/jsr.io/@std/internal/1.0.4/assertion_state.d.ts +0 -75
  274. package/script/deps/jsr.io/@std/internal/1.0.4/assertion_state.d.ts.map +0 -1
  275. package/script/deps/jsr.io/@std/internal/1.0.4/assertion_state.js +0 -106
  276. package/script/deps/jsr.io/@std/internal/1.0.4/build_message.d.ts +0 -82
  277. package/script/deps/jsr.io/@std/internal/1.0.4/build_message.d.ts.map +0 -1
  278. package/script/deps/jsr.io/@std/internal/1.0.4/build_message.js +0 -116
  279. package/script/deps/jsr.io/@std/internal/1.0.4/diff.d.ts +0 -140
  280. package/script/deps/jsr.io/@std/internal/1.0.4/diff.d.ts.map +0 -1
  281. package/script/deps/jsr.io/@std/internal/1.0.4/diff.js +0 -284
  282. package/script/deps/jsr.io/@std/internal/1.0.4/diff_str.d.ts +0 -99
  283. package/script/deps/jsr.io/@std/internal/1.0.4/diff_str.d.ts.map +0 -1
  284. package/script/deps/jsr.io/@std/internal/1.0.4/diff_str.js +0 -186
  285. package/script/deps/jsr.io/@std/internal/1.0.4/format.d.ts +0 -2
  286. package/script/deps/jsr.io/@std/internal/1.0.4/format.d.ts.map +0 -1
  287. package/script/deps/jsr.io/@std/internal/1.0.4/format.js +0 -41
  288. package/script/deps/jsr.io/@std/internal/1.0.4/styles.d.ts +0 -159
  289. package/script/deps/jsr.io/@std/internal/1.0.4/styles.d.ts.map +0 -1
  290. package/script/deps/jsr.io/@std/internal/1.0.4/styles.js +0 -220
  291. package/script/deps/jsr.io/@std/internal/1.0.4/types.d.ts +0 -16
  292. package/script/deps/jsr.io/@std/internal/1.0.4/types.d.ts.map +0 -1
  293. package/script/deps/jsr.io/@std/internal/1.0.4/types.js +0 -3
  294. package/script/deps/jsr.io/@std/testing/1.0.3/_test_suite.d.ts +0 -74
  295. package/script/deps/jsr.io/@std/testing/1.0.3/_test_suite.d.ts.map +0 -1
  296. package/script/deps/jsr.io/@std/testing/1.0.3/_test_suite.js +0 -345
  297. package/script/deps/jsr.io/@std/testing/1.0.3/bdd.d.ts +0 -731
  298. package/script/deps/jsr.io/@std/testing/1.0.3/bdd.d.ts.map +0 -1
  299. package/script/deps/jsr.io/@std/testing/1.0.3/bdd.js +0 -587
  300. package/script/deps/jsr.io/@std/testing/1.0.3/mock.d.ts +0 -674
  301. package/script/deps/jsr.io/@std/testing/1.0.3/mock.d.ts.map +0 -1
  302. package/script/deps/jsr.io/@std/testing/1.0.3/mock.js +0 -1136
  303. package/script/src/ast/nodes/annotation.test.d.ts +0 -2
  304. package/script/src/ast/nodes/annotation.test.d.ts.map +0 -1
  305. package/script/src/ast/nodes/annotation.test.js +0 -58
  306. package/script/src/ast/nodes/argument.test.d.ts +0 -2
  307. package/script/src/ast/nodes/argument.test.d.ts.map +0 -1
  308. package/script/src/ast/nodes/argument.test.js +0 -35
  309. package/script/src/ast/nodes/call.test.d.ts +0 -2
  310. package/script/src/ast/nodes/call.test.d.ts.map +0 -1
  311. package/script/src/ast/nodes/call.test.js +0 -37
  312. package/script/src/ast/nodes/class.test.d.ts +0 -2
  313. package/script/src/ast/nodes/class.test.d.ts.map +0 -1
  314. package/script/src/ast/nodes/class.test.js +0 -221
  315. package/script/src/ast/nodes/constructor.test.d.ts +0 -2
  316. package/script/src/ast/nodes/constructor.test.d.ts.map +0 -1
  317. package/script/src/ast/nodes/constructor.test.js +0 -141
  318. package/script/src/ast/nodes/doc-tag.test.d.ts +0 -2
  319. package/script/src/ast/nodes/doc-tag.test.d.ts.map +0 -1
  320. package/script/src/ast/nodes/doc-tag.test.js +0 -69
  321. package/script/src/ast/nodes/doc.test.d.ts +0 -2
  322. package/script/src/ast/nodes/doc.test.d.ts.map +0 -1
  323. package/script/src/ast/nodes/doc.test.js +0 -35
  324. package/script/src/ast/nodes/enum-value.test.d.ts +0 -2
  325. package/script/src/ast/nodes/enum-value.test.d.ts.map +0 -1
  326. package/script/src/ast/nodes/enum-value.test.js +0 -117
  327. package/script/src/ast/nodes/enum.test.d.ts +0 -2
  328. package/script/src/ast/nodes/enum.test.d.ts.map +0 -1
  329. package/script/src/ast/nodes/enum.test.js +0 -131
  330. package/script/src/ast/nodes/function.test.d.ts +0 -2
  331. package/script/src/ast/nodes/function.test.d.ts.map +0 -1
  332. package/script/src/ast/nodes/function.test.js +0 -162
  333. package/script/src/ast/nodes/generic-parameter.test.d.ts +0 -2
  334. package/script/src/ast/nodes/generic-parameter.test.d.ts.map +0 -1
  335. package/script/src/ast/nodes/generic-parameter.test.js +0 -51
  336. package/script/src/ast/nodes/init-block.test.d.ts +0 -2
  337. package/script/src/ast/nodes/init-block.test.d.ts.map +0 -1
  338. package/script/src/ast/nodes/init-block.test.js +0 -30
  339. package/script/src/ast/nodes/interface.test.d.ts +0 -2
  340. package/script/src/ast/nodes/interface.test.d.ts.map +0 -1
  341. package/script/src/ast/nodes/interface.test.js +0 -123
  342. package/script/src/ast/nodes/object.test.d.ts +0 -2
  343. package/script/src/ast/nodes/object.test.d.ts.map +0 -1
  344. package/script/src/ast/nodes/object.test.js +0 -80
  345. package/script/src/ast/nodes/parameter.test.d.ts +0 -2
  346. package/script/src/ast/nodes/parameter.test.d.ts.map +0 -1
  347. package/script/src/ast/nodes/parameter.test.js +0 -154
  348. package/script/src/ast/nodes/property.test.d.ts +0 -2
  349. package/script/src/ast/nodes/property.test.d.ts.map +0 -1
  350. package/script/src/ast/nodes/property.test.js +0 -208
  351. package/script/src/ast/nodes/reference.test.d.ts +0 -2
  352. package/script/src/ast/nodes/reference.test.d.ts.map +0 -1
  353. package/script/src/ast/nodes/reference.test.js +0 -38
  354. package/script/src/ast/nodes/string.test.d.ts +0 -2
  355. package/script/src/ast/nodes/string.test.d.ts.map +0 -1
  356. package/script/src/ast/nodes/string.test.js +0 -50
  357. package/script/src/import-collection.test.d.ts +0 -2
  358. package/script/src/import-collection.test.d.ts.map +0 -1
  359. package/script/src/import-collection.test.js +0 -101
  360. package/script/tests/openapi-models.test.d.ts +0 -2
  361. package/script/tests/openapi-models.test.d.ts.map +0 -1
  362. package/script/tests/openapi-models.test.js +0 -48
  363. package/src/_dnt.test_polyfills.ts +0 -70
  364. package/src/_dnt.test_shims.ts +0 -64
  365. package/src/deps/jsr.io/@std/assert/1.0.6/assertion_error.ts +0 -31
  366. package/src/deps/jsr.io/@std/assert/1.0.6/equal.ts +0 -152
  367. package/src/deps/jsr.io/@std/assert/1.0.6/equals.ts +0 -52
  368. package/src/deps/jsr.io/@std/assert/1.0.6/false.ts +0 -26
  369. package/src/deps/jsr.io/@std/assert/1.0.6/instance_of.ts +0 -64
  370. package/src/deps/jsr.io/@std/assert/1.0.6/is_error.ts +0 -65
  371. package/src/deps/jsr.io/@std/assert/1.0.6/match.ts +0 -30
  372. package/src/deps/jsr.io/@std/assert/1.0.6/not_instance_of.ts +0 -33
  373. package/src/deps/jsr.io/@std/assert/1.0.6/not_match.ts +0 -30
  374. package/src/deps/jsr.io/@std/assert/1.0.6/not_strict_equals.ts +0 -42
  375. package/src/deps/jsr.io/@std/assert/1.0.6/object_match.ts +0 -202
  376. package/src/deps/jsr.io/@std/assert/1.0.6/rejects.ts +0 -123
  377. package/src/deps/jsr.io/@std/assert/1.0.6/strict_equals.ts +0 -67
  378. package/src/deps/jsr.io/@std/expect/1.0.6/_assert_equals.ts +0 -38
  379. package/src/deps/jsr.io/@std/expect/1.0.6/_assert_not_equals.ts +0 -35
  380. package/src/deps/jsr.io/@std/expect/1.0.6/_assertion.ts +0 -13
  381. package/src/deps/jsr.io/@std/expect/1.0.6/_asymmetric_matchers.ts +0 -177
  382. package/src/deps/jsr.io/@std/expect/1.0.6/_build_message.ts +0 -51
  383. package/src/deps/jsr.io/@std/expect/1.0.6/_custom_equality_tester.ts +0 -19
  384. package/src/deps/jsr.io/@std/expect/1.0.6/_equal.ts +0 -229
  385. package/src/deps/jsr.io/@std/expect/1.0.6/_extend.ts +0 -16
  386. package/src/deps/jsr.io/@std/expect/1.0.6/_inspect_args.ts +0 -15
  387. package/src/deps/jsr.io/@std/expect/1.0.6/_matchers.ts +0 -828
  388. package/src/deps/jsr.io/@std/expect/1.0.6/_mock_util.ts +0 -22
  389. package/src/deps/jsr.io/@std/expect/1.0.6/_types.ts +0 -917
  390. package/src/deps/jsr.io/@std/expect/1.0.6/_utils.ts +0 -201
  391. package/src/deps/jsr.io/@std/expect/1.0.6/expect.ts +0 -529
  392. package/src/deps/jsr.io/@std/internal/1.0.4/assertion_state.ts +0 -111
  393. package/src/deps/jsr.io/@std/internal/1.0.4/build_message.ts +0 -134
  394. package/src/deps/jsr.io/@std/internal/1.0.4/diff.ts +0 -317
  395. package/src/deps/jsr.io/@std/internal/1.0.4/diff_str.ts +0 -204
  396. package/src/deps/jsr.io/@std/internal/1.0.4/format.ts +0 -39
  397. package/src/deps/jsr.io/@std/internal/1.0.4/styles.ts +0 -233
  398. package/src/deps/jsr.io/@std/internal/1.0.4/types.ts +0 -18
  399. package/src/deps/jsr.io/@std/testing/1.0.3/_test_suite.ts +0 -389
  400. package/src/deps/jsr.io/@std/testing/1.0.3/bdd.ts +0 -1202
  401. package/src/deps/jsr.io/@std/testing/1.0.3/mock.ts +0 -1839
  402. package/src/mod.ts +0 -8
  403. package/src/src/assets.ts +0 -9
  404. package/src/src/ast/_index.ts +0 -66
  405. package/src/src/ast/common.ts +0 -1
  406. package/src/src/ast/index.ts +0 -1
  407. package/src/src/ast/node.ts +0 -10
  408. package/src/src/ast/nodes/annotation.test.ts +0 -69
  409. package/src/src/ast/nodes/annotation.ts +0 -79
  410. package/src/src/ast/nodes/argument.test.ts +0 -41
  411. package/src/src/ast/nodes/argument.ts +0 -62
  412. package/src/src/ast/nodes/call.test.ts +0 -44
  413. package/src/src/ast/nodes/call.ts +0 -66
  414. package/src/src/ast/nodes/class.test.ts +0 -274
  415. package/src/src/ast/nodes/class.ts +0 -178
  416. package/src/src/ast/nodes/collection-literal.ts +0 -49
  417. package/src/src/ast/nodes/constructor.test.ts +0 -178
  418. package/src/src/ast/nodes/constructor.ts +0 -126
  419. package/src/src/ast/nodes/doc-tag.test.ts +0 -84
  420. package/src/src/ast/nodes/doc-tag.ts +0 -138
  421. package/src/src/ast/nodes/doc.test.ts +0 -42
  422. package/src/src/ast/nodes/doc.ts +0 -111
  423. package/src/src/ast/nodes/enum-value.test.ts +0 -146
  424. package/src/src/ast/nodes/enum-value.ts +0 -100
  425. package/src/src/ast/nodes/enum.test.ts +0 -167
  426. package/src/src/ast/nodes/enum.ts +0 -163
  427. package/src/src/ast/nodes/function.test.ts +0 -194
  428. package/src/src/ast/nodes/function.ts +0 -176
  429. package/src/src/ast/nodes/generic-parameter.test.ts +0 -60
  430. package/src/src/ast/nodes/generic-parameter.ts +0 -54
  431. package/src/src/ast/nodes/init-block.test.ts +0 -36
  432. package/src/src/ast/nodes/init-block.ts +0 -38
  433. package/src/src/ast/nodes/interface.test.ts +0 -151
  434. package/src/src/ast/nodes/interface.ts +0 -133
  435. package/src/src/ast/nodes/lambda-type.ts +0 -68
  436. package/src/src/ast/nodes/lambda.ts +0 -68
  437. package/src/src/ast/nodes/object.test.ts +0 -101
  438. package/src/src/ast/nodes/object.ts +0 -102
  439. package/src/src/ast/nodes/parameter.test.ts +0 -191
  440. package/src/src/ast/nodes/parameter.ts +0 -118
  441. package/src/src/ast/nodes/property.test.ts +0 -253
  442. package/src/src/ast/nodes/property.ts +0 -225
  443. package/src/src/ast/nodes/reference.test.ts +0 -47
  444. package/src/src/ast/nodes/reference.ts +0 -178
  445. package/src/src/ast/nodes/string.test.ts +0 -61
  446. package/src/src/ast/nodes/string.ts +0 -114
  447. package/src/src/ast/nodes/types.ts +0 -23
  448. package/src/src/ast/references/index.ts +0 -8
  449. package/src/src/ast/references/jackson.ts +0 -16
  450. package/src/src/ast/references/jakarta.ts +0 -10
  451. package/src/src/ast/references/java.ts +0 -19
  452. package/src/src/ast/references/kotlin.ts +0 -40
  453. package/src/src/ast/references/okhttp3.ts +0 -5
  454. package/src/src/ast/references/reactor.ts +0 -5
  455. package/src/src/ast/references/spring.ts +0 -58
  456. package/src/src/ast/references/swagger.ts +0 -19
  457. package/src/src/ast/utils/get-kotlin-builder-options.ts +0 -19
  458. package/src/src/ast/utils/to-kt-node.ts +0 -31
  459. package/src/src/ast/utils/write-kt-annotations.ts +0 -15
  460. package/src/src/ast/utils/write-kt-arguments.ts +0 -45
  461. package/src/src/ast/utils/write-kt-enum-values.ts +0 -27
  462. package/src/src/ast/utils/write-kt-generic-parameters.ts +0 -12
  463. package/src/src/ast/utils/write-kt-members.ts +0 -25
  464. package/src/src/ast/utils/write-kt-node.ts +0 -37
  465. package/src/src/ast/utils/write-kt-parameters.ts +0 -25
  466. package/src/src/common-results.ts +0 -4
  467. package/src/src/config.ts +0 -39
  468. package/src/src/file-builder.ts +0 -108
  469. package/src/src/generators/file-generator.ts +0 -29
  470. package/src/src/generators/index.ts +0 -4
  471. package/src/src/generators/models/args.ts +0 -128
  472. package/src/src/generators/models/index.ts +0 -4
  473. package/src/src/generators/models/model-generator.ts +0 -602
  474. package/src/src/generators/models/models-generator.ts +0 -65
  475. package/src/src/generators/models/models.ts +0 -95
  476. package/src/src/generators/services/okhttp3-clients/args.ts +0 -78
  477. package/src/src/generators/services/okhttp3-clients/index.ts +0 -4
  478. package/src/src/generators/services/okhttp3-clients/models.ts +0 -60
  479. package/src/src/generators/services/okhttp3-clients/okhttp3-client-generator.ts +0 -557
  480. package/src/src/generators/services/okhttp3-clients/okhttp3-clients-generator.ts +0 -128
  481. package/src/src/generators/services/okhttp3-clients/refs.ts +0 -55
  482. package/src/src/generators/services/spring-controllers/args.ts +0 -71
  483. package/src/src/generators/services/spring-controllers/index.ts +0 -4
  484. package/src/src/generators/services/spring-controllers/models.ts +0 -58
  485. package/src/src/generators/services/spring-controllers/spring-controller-generator.ts +0 -605
  486. package/src/src/generators/services/spring-controllers/spring-controllers-generator.ts +0 -70
  487. package/src/src/import-collection.test.ts +0 -116
  488. package/src/src/import-collection.ts +0 -98
  489. package/src/src/types.ts +0 -3
  490. package/src/src/utils.ts +0 -39
  491. package/src/tests/openapi-models.test.ts +0 -63
  492. package/test_runner.js +0 -227
@@ -1,233 +0,0 @@
1
- // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
2
- // This module is browser compatible.
3
- // A module to print ANSI terminal colors. Inspired by chalk, kleur, and colors
4
- // on npm.
5
-
6
- // This code is vendored from `fmt/colors.ts`.
7
-
8
- // deno-lint-ignore no-explicit-any
9
- import * as dntShim from "../../../../../_dnt.test_shims.js";
10
-
11
- const { Deno } = dntShim.dntGlobalThis as any;
12
- const noColor = typeof Deno?.noColor === "boolean"
13
- ? Deno.noColor as boolean
14
- : false;
15
-
16
- interface Code {
17
- open: string;
18
- close: string;
19
- regexp: RegExp;
20
- }
21
-
22
- const enabled = !noColor;
23
-
24
- function code(open: number[], close: number): Code {
25
- return {
26
- open: `\x1b[${open.join(";")}m`,
27
- close: `\x1b[${close}m`,
28
- regexp: new RegExp(`\\x1b\\[${close}m`, "g"),
29
- };
30
- }
31
-
32
- function run(str: string, code: Code): string {
33
- return enabled
34
- ? `${code.open}${str.replace(code.regexp, code.open)}${code.close}`
35
- : str;
36
- }
37
-
38
- /**
39
- * Sets the style of text to be printed to bold.
40
- *
41
- * Disable by setting the `NO_COLOR` environmental variable.
42
- *
43
- * @param str Text to make bold
44
- *
45
- * @returns Bold text for printing
46
- *
47
- * @example Usage
48
- * ```ts no-assert
49
- * import { bold } from "@std/internal/styles";
50
- *
51
- * console.log(bold("Hello, world!")); // Prints "Hello, world!" in bold
52
- * ```
53
- */
54
- export function bold(str: string): string {
55
- return run(str, code([1], 22));
56
- }
57
-
58
- /**
59
- * Sets the color of text to be printed to red.
60
- *
61
- * Disable by setting the `NO_COLOR` environmental variable.
62
- *
63
- * @param str Text to make red
64
- *
65
- * @returns Red text for printing
66
- *
67
- * @example Usage
68
- * ```ts no-assert
69
- * import { red } from "@std/internal/styles";
70
- *
71
- * console.log(red("Hello, world!")); // Prints "Hello, world!" in red
72
- * ```
73
- */
74
- export function red(str: string): string {
75
- return run(str, code([31], 39));
76
- }
77
-
78
- /**
79
- * Sets the color of text to be printed to green.
80
- *
81
- * Disable by setting the `NO_COLOR` environmental variable.
82
- *
83
- * @param str Text to make green
84
- *
85
- * @returns Green text for print
86
- *
87
- * @example Usage
88
- * ```ts no-assert
89
- * import { green } from "@std/internal/styles";
90
- *
91
- * console.log(green("Hello, world!")); // Prints "Hello, world!" in green
92
- * ```
93
- */
94
- export function green(str: string): string {
95
- return run(str, code([32], 39));
96
- }
97
-
98
- /**
99
- * Sets the color of text to be printed to yellow.
100
- *
101
- * Disable by setting the `NO_COLOR` environmental variable.
102
- *
103
- * @param str Text to make yellow
104
- *
105
- * @returns Yellow text for print
106
- *
107
- * @example Usage
108
- * ```ts no-assert
109
- * import { yellow } from "@std/internal/styles";
110
- *
111
- * console.log(yellow("Hello, world!")); // Prints "Hello, world!" in yellow
112
- * ```
113
- */
114
- export function yellow(str: string): string {
115
- return run(str, code([33], 39));
116
- }
117
-
118
- /**
119
- * Sets the color of text to be printed to white.
120
- *
121
- * @param str Text to make white
122
- *
123
- * @returns White text for print
124
- *
125
- * @example Usage
126
- * ```ts no-assert
127
- * import { white } from "@std/internal/styles";
128
- *
129
- * console.log(white("Hello, world!")); // Prints "Hello, world!" in white
130
- * ```
131
- */
132
- export function white(str: string): string {
133
- return run(str, code([37], 39));
134
- }
135
-
136
- /**
137
- * Sets the color of text to be printed to gray.
138
- *
139
- * @param str Text to make gray
140
- *
141
- * @returns Gray text for print
142
- *
143
- * @example Usage
144
- * ```ts no-assert
145
- * import { gray } from "@std/internal/styles";
146
- *
147
- * console.log(gray("Hello, world!")); // Prints "Hello, world!" in gray
148
- * ```
149
- */
150
- export function gray(str: string): string {
151
- return brightBlack(str);
152
- }
153
-
154
- /**
155
- * Sets the color of text to be printed to bright-black.
156
- *
157
- * @param str Text to make bright-black
158
- *
159
- * @returns Bright-black text for print
160
- *
161
- * @example Usage
162
- * ```ts no-assert
163
- * import { brightBlack } from "@std/internal/styles";
164
- *
165
- * console.log(brightBlack("Hello, world!")); // Prints "Hello, world!" in bright-black
166
- * ```
167
- */
168
- export function brightBlack(str: string): string {
169
- return run(str, code([90], 39));
170
- }
171
-
172
- /**
173
- * Sets the background color of text to be printed to red.
174
- *
175
- * @param str Text to make its background red
176
- *
177
- * @returns Red background text for print
178
- *
179
- * @example Usage
180
- * ```ts no-assert
181
- * import { bgRed } from "@std/internal/styles";
182
- *
183
- * console.log(bgRed("Hello, world!")); // Prints "Hello, world!" with red background
184
- * ```
185
- */
186
- export function bgRed(str: string): string {
187
- return run(str, code([41], 49));
188
- }
189
-
190
- /**
191
- * Sets the background color of text to be printed to green.
192
- *
193
- * @param str Text to make its background green
194
- *
195
- * @returns Green background text for print
196
- *
197
- * @example Usage
198
- * ```ts no-assert
199
- * import { bgGreen } from "@std/internal/styles";
200
- *
201
- * console.log(bgGreen("Hello, world!")); // Prints "Hello, world!" with green background
202
- * ```
203
- */
204
- export function bgGreen(str: string): string {
205
- return run(str, code([42], 49));
206
- }
207
-
208
- // https://github.com/chalk/ansi-regex/blob/02fa893d619d3da85411acc8fd4e2eea0e95a9d9/index.js
209
- const ANSI_PATTERN = new RegExp(
210
- [
211
- "[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)",
212
- "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TXZcf-nq-uy=><~]))",
213
- ].join("|"),
214
- "g",
215
- );
216
-
217
- /**
218
- * Remove ANSI escape codes from the string.
219
- *
220
- * @param string Text to remove ANSI escape codes from
221
- *
222
- * @returns Text without ANSI escape codes
223
- *
224
- * @example Usage
225
- * ```ts no-assert
226
- * import { red, stripAnsiCode } from "@std/internal/styles";
227
- *
228
- * console.log(stripAnsiCode(red("Hello, world!"))); // Prints "Hello, world!"
229
- * ```
230
- */
231
- export function stripAnsiCode(string: string): string {
232
- return string.replace(ANSI_PATTERN, "");
233
- }
@@ -1,18 +0,0 @@
1
- // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
2
-
3
- /** Ways that lines in a diff can be different. */
4
- export type DiffType = "removed" | "common" | "added";
5
-
6
- /**
7
- * Represents the result of a diff operation.
8
- *
9
- * @typeParam T The type of the value in the diff result.
10
- */
11
- export interface DiffResult<T> {
12
- /** The type of the diff. */
13
- type: DiffType;
14
- /** The value of the diff. */
15
- value: T;
16
- /** The details of the diff. */
17
- details?: DiffResult<T>[];
18
- }
@@ -1,389 +0,0 @@
1
- // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
2
- /** The options for creating a test suite with the describe function. */
3
- import * as dntShim from "../../../../../_dnt.test_shims.js";
4
-
5
- export interface DescribeDefinition<T> extends Omit<dntShim.Deno.TestDefinition, "fn"> {
6
- /** The body of the test suite */
7
- fn?: () => void | undefined;
8
- /**
9
- * The `describe` function returns a `TestSuite` representing the group of tests.
10
- * If `describe` is called within another `describe` calls `fn`, the suite will default to that parent `describe` calls returned `TestSuite`.
11
- * If `describe` is not called within another `describe` calls `fn`, the suite will default to the `TestSuite` representing the global group of tests.
12
- */
13
- suite?: TestSuite<T>;
14
- /** Run some shared setup before all of the tests in the suite. */
15
- beforeAll?:
16
- | ((this: T) => void | Promise<void>)
17
- | ((this: T) => void | Promise<void>)[];
18
- /** Run some shared teardown after all of the tests in the suite. */
19
- afterAll?:
20
- | ((this: T) => void | Promise<void>)
21
- | ((this: T) => void | Promise<void>)[];
22
- /** Run some shared setup before each test in the suite. */
23
- beforeEach?:
24
- | ((this: T) => void | Promise<void>)
25
- | ((this: T) => void | Promise<void>)[];
26
- /** Run some shared teardown after each test in the suite. */
27
- afterEach?:
28
- | ((this: T) => void | Promise<void>)
29
- | ((this: T) => void | Promise<void>)[];
30
- }
31
-
32
- /** The options for creating an individual test case with the it function. */
33
- export interface ItDefinition<T> extends Omit<dntShim.Deno.TestDefinition, "fn"> {
34
- /** The body of the test case */
35
- fn: (this: T, t: dntShim.Deno.TestContext) => void | Promise<void>;
36
- /**
37
- * The `describe` function returns a `TestSuite` representing the group of tests.
38
- * If `it` is called within a `describe` calls `fn`, the suite will default to that parent `describe` calls returned `TestSuite`.
39
- * If `it` is not called within a `describe` calls `fn`, the suite will default to the `TestSuite` representing the global group of tests.
40
- */
41
- suite?: TestSuite<T>;
42
- }
43
-
44
- /** The names of all the different types of hooks. */
45
- export type HookNames = "beforeAll" | "afterAll" | "beforeEach" | "afterEach";
46
-
47
- /**
48
- * A group of tests.
49
- */
50
- export interface TestSuite<T> {
51
- /** The symbol to use for grouping the test suite */
52
- symbol: symbol;
53
- }
54
-
55
- /**
56
- * An internal representation of a group of tests.
57
- */
58
- export class TestSuiteInternal<T> implements TestSuite<T> {
59
- symbol: symbol;
60
- protected describe: DescribeDefinition<T>;
61
- protected steps: (TestSuiteInternal<T> | ItDefinition<T>)[];
62
- protected hasOnlyStep: boolean;
63
-
64
- constructor(describe: DescribeDefinition<T>) {
65
- this.describe = describe;
66
- this.steps = [];
67
- this.hasOnlyStep = false;
68
-
69
- const { suite } = describe;
70
- if (suite && !TestSuiteInternal.suites.has(suite.symbol)) {
71
- throw new Error(
72
- "Cannot construct Test Suite: suite does not represent a registered test suite",
73
- );
74
- }
75
- const testSuite = suite
76
- ? TestSuiteInternal.suites.get(suite.symbol)
77
- : TestSuiteInternal.current;
78
- this.symbol = Symbol();
79
- TestSuiteInternal.suites.set(this.symbol, this);
80
-
81
- const { fn } = describe;
82
- if (fn) {
83
- const temp = TestSuiteInternal.current;
84
- TestSuiteInternal.current = this;
85
- try {
86
- // deno-lint-ignore no-explicit-any
87
- const value = fn() as any;
88
- if (value instanceof Promise) {
89
- throw new Error(
90
- 'Returning a Promise from "describe" is not supported: tests must be defined synchronously',
91
- );
92
- }
93
- } finally {
94
- TestSuiteInternal.current = temp;
95
- }
96
- }
97
-
98
- if (testSuite) {
99
- TestSuiteInternal.addStep(testSuite, this);
100
- } else {
101
- const {
102
- name,
103
- ignore,
104
- permissions,
105
- sanitizeExit,
106
- sanitizeOps,
107
- sanitizeResources,
108
- } = describe;
109
- let { only } = describe;
110
- if (!ignore && this.hasOnlyStep) {
111
- only = true;
112
- }
113
- const options: dntShim.Deno.TestDefinition = {
114
- name,
115
- fn: async (t) => {
116
- TestSuiteInternal.runningCount++;
117
- try {
118
- const context = {} as T;
119
- const { beforeAll } = this.describe;
120
- if (typeof beforeAll === "function") {
121
- await beforeAll.call(context);
122
- } else if (beforeAll) {
123
- for (const hook of beforeAll) {
124
- await hook.call(context);
125
- }
126
- }
127
- try {
128
- TestSuiteInternal.active.push(this.symbol);
129
- await TestSuiteInternal.run(this, context, t);
130
- } finally {
131
- TestSuiteInternal.active.pop();
132
- const { afterAll } = this.describe;
133
- if (typeof afterAll === "function") {
134
- await afterAll.call(context);
135
- } else if (afterAll) {
136
- for (const hook of afterAll) {
137
- await hook.call(context);
138
- }
139
- }
140
- }
141
- } finally {
142
- TestSuiteInternal.runningCount--;
143
- }
144
- },
145
- };
146
- if (ignore !== undefined) {
147
- options.ignore = ignore;
148
- }
149
- if (only !== undefined) {
150
- options.only = only;
151
- }
152
- if (permissions !== undefined) {
153
- options.permissions = permissions;
154
- }
155
- if (sanitizeExit !== undefined) {
156
- options.sanitizeExit = sanitizeExit;
157
- }
158
- if (sanitizeOps !== undefined) {
159
- options.sanitizeOps = sanitizeOps;
160
- }
161
- if (sanitizeResources !== undefined) {
162
- options.sanitizeResources = sanitizeResources;
163
- }
164
- TestSuiteInternal.registerTest(options);
165
- }
166
- }
167
-
168
- /** Stores how many test suites are executing. */
169
- static runningCount = 0;
170
-
171
- /** If a test has been registered yet. Block adding global hooks if a test has been registered. */
172
- static started = false;
173
-
174
- /** A map of all test suites by symbol. */
175
- // deno-lint-ignore no-explicit-any
176
- static suites = new Map<symbol, TestSuiteInternal<any>>();
177
-
178
- /** The current test suite being registered. */
179
- // deno-lint-ignore no-explicit-any
180
- static current: TestSuiteInternal<any> | null = null;
181
-
182
- /** The stack of tests that are actively running. */
183
- static active: symbol[] = [];
184
-
185
- /** This is used internally for testing this module. */
186
- static reset() {
187
- TestSuiteInternal.runningCount = 0;
188
- TestSuiteInternal.started = false;
189
- TestSuiteInternal.current = null;
190
- TestSuiteInternal.active = [];
191
- }
192
-
193
- /** This is used internally to register tests. */
194
- static registerTest(options: dntShim.Deno.TestDefinition) {
195
- options = { ...options };
196
- if (options.only === undefined) {
197
- delete options.only;
198
- }
199
- if (options.permissions === undefined) {
200
- delete options.permissions;
201
- }
202
- if (options.ignore === undefined) {
203
- delete options.ignore;
204
- }
205
- if (options.sanitizeExit === undefined) {
206
- delete options.sanitizeExit;
207
- }
208
- if (options.sanitizeOps === undefined) {
209
- delete options.sanitizeOps;
210
- }
211
- if (options.sanitizeResources === undefined) {
212
- delete options.sanitizeResources;
213
- }
214
- dntShim.Deno.test(options);
215
- }
216
-
217
- /** Updates all steps within top level suite to have ignore set to true if only is not set to true on step. */
218
- static addingOnlyStep<T>(suite: TestSuiteInternal<T>) {
219
- if (!suite.hasOnlyStep) {
220
- for (let i = 0; i < suite.steps.length; i++) {
221
- const step = suite.steps[i]!;
222
- if (!(step instanceof TestSuiteInternal) && !step.only) {
223
- suite.steps.splice(i--, 1);
224
- }
225
- }
226
- suite.hasOnlyStep = true;
227
- }
228
-
229
- const parentSuite = suite.describe.suite;
230
- const parentTestSuite = parentSuite &&
231
- TestSuiteInternal.suites.get(parentSuite.symbol);
232
- if (parentTestSuite) {
233
- TestSuiteInternal.addingOnlyStep(parentTestSuite);
234
- }
235
- }
236
-
237
- /** This is used internally to add steps to a test suite. */
238
- static addStep<T>(
239
- suite: TestSuiteInternal<T>,
240
- step: TestSuiteInternal<T> | ItDefinition<T>,
241
- ) {
242
- if (!suite.hasOnlyStep) {
243
- if (step instanceof TestSuiteInternal) {
244
- if (step.hasOnlyStep || step.describe.only) {
245
- TestSuiteInternal.addingOnlyStep(suite);
246
- }
247
- } else {
248
- if (step.only) TestSuiteInternal.addingOnlyStep(suite);
249
- }
250
- }
251
-
252
- if (
253
- !(suite.hasOnlyStep && !(step instanceof TestSuiteInternal) && !step.only)
254
- ) {
255
- suite.steps.push(step);
256
- }
257
- }
258
-
259
- /** This is used internally to add hooks to a test suite. */
260
- static setHook<T>(
261
- suite: TestSuiteInternal<T>,
262
- name: HookNames,
263
- fn: (this: T) => void | Promise<void>,
264
- ) {
265
- if (suite.describe[name]) {
266
- if (typeof suite.describe[name] === "function") {
267
- suite.describe[name] = [
268
- suite.describe[name] as ((this: T) => void | Promise<void>),
269
- ];
270
- }
271
- (suite.describe[name] as ((this: T) => void | Promise<void>)[]).push(fn);
272
- } else {
273
- suite.describe[name] = fn;
274
- }
275
- }
276
-
277
- /** This is used internally to run all steps for a test suite. */
278
- static async run<T>(
279
- suite: TestSuiteInternal<T>,
280
- context: T,
281
- t: dntShim.Deno.TestContext,
282
- ) {
283
- const hasOnly = suite.hasOnlyStep || suite.describe.only || false;
284
- for (const step of suite.steps) {
285
- if (
286
- hasOnly && step instanceof TestSuiteInternal &&
287
- !(step.hasOnlyStep || step.describe.only || false)
288
- ) {
289
- continue;
290
- }
291
-
292
- const {
293
- name,
294
- fn,
295
- ignore,
296
- permissions,
297
- sanitizeExit,
298
- sanitizeOps,
299
- sanitizeResources,
300
- } = step instanceof TestSuiteInternal ? step.describe : step;
301
-
302
- const options: dntShim.Deno.TestStepDefinition = {
303
- name,
304
- fn: async (t) => {
305
- if (permissions) {
306
- throw new Error(
307
- "permissions option not available for nested tests",
308
- );
309
- }
310
- context = { ...context };
311
- if (step instanceof TestSuiteInternal) {
312
- const { beforeAll } = step.describe;
313
- if (typeof beforeAll === "function") {
314
- await beforeAll.call(context);
315
- } else if (beforeAll) {
316
- for (const hook of beforeAll) {
317
- await hook.call(context);
318
- }
319
- }
320
- try {
321
- TestSuiteInternal.active.push(step.symbol);
322
- await TestSuiteInternal.run(step, context, t);
323
- } finally {
324
- TestSuiteInternal.active.pop();
325
- const { afterAll } = step.describe;
326
- if (typeof afterAll === "function") {
327
- await afterAll.call(context);
328
- } else if (afterAll) {
329
- for (const hook of afterAll) {
330
- await hook.call(context);
331
- }
332
- }
333
- }
334
- } else {
335
- await TestSuiteInternal.runTest(t, fn!, context);
336
- }
337
- },
338
- };
339
- if (ignore !== undefined) {
340
- options.ignore = ignore;
341
- }
342
- if (sanitizeExit !== undefined) {
343
- options.sanitizeExit = sanitizeExit;
344
- }
345
- if (sanitizeOps !== undefined) {
346
- options.sanitizeOps = sanitizeOps;
347
- }
348
- if (sanitizeResources !== undefined) {
349
- options.sanitizeResources = sanitizeResources;
350
- }
351
- await t.step(options);
352
- }
353
- }
354
-
355
- static async runTest<T>(
356
- t: dntShim.Deno.TestContext,
357
- fn: (this: T, t: dntShim.Deno.TestContext) => void | Promise<void>,
358
- context: T,
359
- activeIndex = 0,
360
- ) {
361
- const suite = TestSuiteInternal.active[activeIndex];
362
- const testSuite = suite && TestSuiteInternal.suites.get(suite);
363
- if (testSuite) {
364
- if (activeIndex === 0) context = { ...context };
365
- const { beforeEach } = testSuite.describe;
366
- if (typeof beforeEach === "function") {
367
- await beforeEach.call(context);
368
- } else if (beforeEach) {
369
- for (const hook of beforeEach) {
370
- await hook.call(context);
371
- }
372
- }
373
- try {
374
- await TestSuiteInternal.runTest(t, fn, context, activeIndex + 1);
375
- } finally {
376
- const { afterEach } = testSuite.describe;
377
- if (typeof afterEach === "function") {
378
- await afterEach.call(context);
379
- } else if (afterEach) {
380
- for (const hook of afterEach) {
381
- await hook.call(context);
382
- }
383
- }
384
- }
385
- } else {
386
- await fn.call(context, t);
387
- }
388
- }
389
- }