@skmtc/core 0.0.223 → 0.0.225

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 (331) hide show
  1. package/{script → esm}/_dnt.polyfills.js +1 -2
  2. package/{script → esm}/_dnt.shims.js +4 -8
  3. package/{script → esm}/context/CoreContext.js +24 -28
  4. package/{script → esm}/context/GenerateContext.js +13 -17
  5. package/{script → esm}/context/LogStore.js +1 -5
  6. package/{script → esm}/context/ParseContext.js +1 -5
  7. package/{script → esm}/context/RenderContext.js +17 -47
  8. package/{script → esm}/context/Trail.js +1 -5
  9. package/esm/context/types.js +1 -0
  10. package/{script → esm}/deps/jsr.io/@std/encoding/1.0.1/_validate_binary_like.js +1 -4
  11. package/{script → esm}/deps/jsr.io/@std/encoding/1.0.1/ascii85.js +4 -8
  12. package/{script → esm}/deps/jsr.io/@std/encoding/1.0.1/base32.js +4 -8
  13. package/{script → esm}/deps/jsr.io/@std/encoding/1.0.1/base58.js +4 -8
  14. package/{script → esm}/deps/jsr.io/@std/encoding/1.0.1/base64.js +4 -8
  15. package/{script → esm}/deps/jsr.io/@std/encoding/1.0.1/base64url.js +3 -30
  16. package/{script → esm}/deps/jsr.io/@std/encoding/1.0.1/hex.js +4 -8
  17. package/esm/deps/jsr.io/@std/encoding/1.0.1/mod.js +22 -0
  18. package/{script → esm}/deps/jsr.io/@std/encoding/1.0.1/varint.js +8 -14
  19. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/_common/assert_path.js +1 -4
  20. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/_common/basename.js +5 -10
  21. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/_common/common.js +1 -4
  22. package/esm/deps/jsr.io/@std/path/1.0.0/_common/constants.js +46 -0
  23. package/esm/deps/jsr.io/@std/path/1.0.0/_common/dirname.js +8 -0
  24. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/_common/format.js +2 -6
  25. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/_common/from_file_url.js +1 -4
  26. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/_common/glob_to_reg_exp.js +1 -4
  27. package/esm/deps/jsr.io/@std/path/1.0.0/_common/normalize.js +8 -0
  28. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/_common/normalize_string.js +6 -9
  29. package/esm/deps/jsr.io/@std/path/1.0.0/_common/relative.js +9 -0
  30. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/_common/strip_trailing_separators.js +1 -4
  31. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/_common/to_file_url.js +1 -4
  32. package/esm/deps/jsr.io/@std/path/1.0.0/_os.js +14 -0
  33. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/basename.js +7 -10
  34. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/common.js +4 -7
  35. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/constants.js +4 -7
  36. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/dirname.js +5 -8
  37. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/extname.js +5 -8
  38. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/format.js +5 -8
  39. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/from_file_url.js +5 -8
  40. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/glob_to_regexp.js +7 -10
  41. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/is_absolute.js +5 -8
  42. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/is_glob.js +1 -4
  43. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/join.js +5 -8
  44. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/join_globs.js +7 -10
  45. package/esm/deps/jsr.io/@std/path/1.0.0/mod.js +54 -0
  46. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/normalize.js +5 -8
  47. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/normalize_glob.js +7 -10
  48. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/parse.js +5 -8
  49. package/esm/deps/jsr.io/@std/path/1.0.0/posix/_util.js +8 -0
  50. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/posix/basename.js +8 -11
  51. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/posix/constants.js +3 -6
  52. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/posix/dirname.js +8 -11
  53. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/posix/extname.js +7 -10
  54. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/posix/format.js +4 -7
  55. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/posix/from_file_url.js +3 -6
  56. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/posix/glob_to_regexp.js +3 -6
  57. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/posix/is_absolute.js +5 -8
  58. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/posix/join.js +5 -8
  59. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/posix/join_globs.js +7 -10
  60. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/posix/normalize.js +8 -11
  61. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/posix/normalize_glob.js +6 -9
  62. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/posix/parse.js +10 -13
  63. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/posix/relative.js +14 -17
  64. package/esm/deps/jsr.io/@std/path/1.0.0/posix/resolve.js +59 -0
  65. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/posix/to_file_url.js +5 -8
  66. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/posix/to_namespaced_path.js +1 -4
  67. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/relative.js +5 -8
  68. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/resolve.js +7 -10
  69. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/to_file_url.js +5 -8
  70. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/to_namespaced_path.js +7 -10
  71. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/types.js +1 -2
  72. package/esm/deps/jsr.io/@std/path/1.0.0/windows/_util.js +15 -0
  73. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/windows/basename.js +11 -14
  74. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/windows/constants.js +3 -6
  75. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/windows/dirname.js +17 -20
  76. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/windows/extname.js +9 -12
  77. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/windows/format.js +4 -7
  78. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/windows/from_file_url.js +3 -6
  79. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/windows/glob_to_regexp.js +3 -6
  80. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/windows/is_absolute.js +9 -12
  81. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/windows/join.js +10 -13
  82. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/windows/join_globs.js +7 -10
  83. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/windows/normalize.js +17 -20
  84. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/windows/normalize_glob.js +6 -9
  85. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/windows/parse.js +16 -19
  86. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/windows/relative.js +16 -19
  87. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/windows/resolve.js +17 -43
  88. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/windows/to_file_url.js +5 -8
  89. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/windows/to_namespaced_path.js +11 -14
  90. package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/_dumper/dumper.js +10 -36
  91. package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/_dumper/dumper_state.js +2 -6
  92. package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/_error.js +1 -5
  93. package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/_loader/loader.js +9 -36
  94. package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/_loader/loader_state.js +2 -6
  95. package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/_mark.js +3 -7
  96. package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/_state.js +3 -7
  97. package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/_type/binary.js +2 -5
  98. package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/_type/bool.js +4 -7
  99. package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/_type/float.js +5 -8
  100. package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/_type/function.js +2 -5
  101. package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/_type/int.js +4 -7
  102. package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/_type/map.js +2 -5
  103. package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/_type/merge.js +2 -5
  104. package/esm/deps/jsr.io/@std/yaml/0.215.0/_type/mod.js +20 -0
  105. package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/_type/nil.js +2 -5
  106. package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/_type/omap.js +2 -5
  107. package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/_type/pairs.js +2 -5
  108. package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/_type/regexp.js +2 -5
  109. package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/_type/seq.js +2 -5
  110. package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/_type/set.js +2 -5
  111. package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/_type/str.js +2 -5
  112. package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/_type/timestamp.js +2 -5
  113. package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/_type/undefined.js +2 -5
  114. package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/_utils.js +15 -32
  115. package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/mod.js +4 -20
  116. package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/parse.js +5 -9
  117. package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/schema/core.js +4 -7
  118. package/esm/deps/jsr.io/@std/yaml/0.215.0/schema/default.js +15 -0
  119. package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/schema/extended.js +6 -9
  120. package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/schema/failsafe.js +4 -7
  121. package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/schema/json.js +6 -9
  122. package/esm/deps/jsr.io/@std/yaml/0.215.0/schema/mod.js +10 -0
  123. package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/schema.js +3 -7
  124. package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/stringify.js +3 -6
  125. package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/type.js +1 -5
  126. package/{script → esm}/dsl/ContentSettings.js +1 -5
  127. package/{script → esm}/dsl/Definition.js +4 -8
  128. package/{script → esm}/dsl/GeneratedValueList.js +3 -7
  129. package/{script → esm}/dsl/Identifier.js +8 -12
  130. package/{script → esm}/dsl/Import.js +2 -7
  131. package/esm/dsl/ModelCreator.js +1 -0
  132. package/{script → esm}/dsl/ModelDriver.js +14 -18
  133. package/esm/dsl/OperationCreator.js +1 -0
  134. package/{script → esm}/dsl/OperationDriver.js +11 -15
  135. package/esm/dsl/Stringable.js +1 -0
  136. package/{script → esm}/dsl/ValueBase.js +1 -5
  137. package/{script → esm}/dsl/base.js +5 -13
  138. package/esm/dsl/constants.js +1 -0
  139. package/{script → esm}/dsl/withConfig.js +9 -15
  140. package/esm/generate/generate.js +47 -0
  141. package/esm/generate/generateModels.js +29 -0
  142. package/esm/generate/generateOperations.js +35 -0
  143. package/{script → esm}/helpers/logStatus.js +2 -7
  144. package/esm/helpers/naming.js +25 -0
  145. package/esm/helpers/refFns.js +24 -0
  146. package/esm/helpers/strings.js +6 -0
  147. package/{script → esm}/helpers/verifyType.js +1 -4
  148. package/esm/mod.js +61 -0
  149. package/{script → esm}/oas/array/Array.js +2 -6
  150. package/esm/oas/array/array-types.js +17 -0
  151. package/esm/oas/array/toArray.js +20 -0
  152. package/{script → esm}/oas/boolean/Boolean.js +2 -6
  153. package/esm/oas/boolean/boolean-types.js +8 -0
  154. package/esm/oas/boolean/toBoolean.js +10 -0
  155. package/{script → esm}/oas/components/Components.js +2 -6
  156. package/esm/oas/components/toComponentsV3.js +44 -0
  157. package/esm/oas/contact/contact-types.js +7 -0
  158. package/{script → esm}/oas/discriminator/Discriminator.js +2 -6
  159. package/esm/oas/discriminator/discriminator-types.js +6 -0
  160. package/esm/oas/discriminator/toDiscriminatorV3.js +11 -0
  161. package/{script → esm}/oas/document/Document.js +2 -6
  162. package/esm/oas/document/toDocumentV3.js +24 -0
  163. package/{script → esm}/oas/example/Example.js +2 -6
  164. package/esm/oas/example/example-types.js +9 -0
  165. package/esm/oas/example/toExamplesV3.js +45 -0
  166. package/{script → esm}/oas/header/Header.js +2 -6
  167. package/esm/oas/header/toHeadersV3.js +42 -0
  168. package/{script → esm}/oas/info/Info.js +2 -6
  169. package/{script → esm}/oas/info/toInfoV3.js +3 -7
  170. package/{script → esm}/oas/integer/Integer.js +2 -6
  171. package/esm/oas/integer/integer-types.js +18 -0
  172. package/esm/oas/integer/toInteger.js +13 -0
  173. package/{script → esm}/oas/intersection/Intersection.js +2 -6
  174. package/esm/oas/intersection/intersection-types.js +12 -0
  175. package/esm/oas/intersection/toIntersection.js +22 -0
  176. package/esm/oas/license/license-types.js +7 -0
  177. package/esm/oas/markdown/markdown-types.js +2 -0
  178. package/{script → esm}/oas/mediaType/MediaType.js +2 -6
  179. package/esm/oas/mediaType/mediaType-types.js +12 -0
  180. package/esm/oas/mediaType/toMediaTypeItemV3.js +37 -0
  181. package/esm/oas/null/null-types.js +8 -0
  182. package/{script → esm}/oas/number/Number.js +2 -6
  183. package/esm/oas/number/number-types.js +14 -0
  184. package/esm/oas/number/toNumber.js +10 -0
  185. package/{script → esm}/oas/object/Object.js +4 -8
  186. package/esm/oas/object/object-types.js +27 -0
  187. package/esm/oas/object/toAdditionalPropertiesV3.js +14 -0
  188. package/esm/oas/object/toObject.js +23 -0
  189. package/{script → esm}/oas/operation/Operation.js +2 -6
  190. package/{script → esm}/oas/operation/toOperationsV3.js +13 -18
  191. package/{script → esm}/oas/parameter/Parameter.js +2 -6
  192. package/esm/oas/parameter/parameter-types.js +38 -0
  193. package/{script → esm}/oas/parameter/toParameterV3.js +22 -28
  194. package/{script → esm}/oas/pathItem/PathItem.js +2 -6
  195. package/esm/oas/pathItem/toPathItemV3.js +15 -0
  196. package/{script → esm}/oas/ref/Ref.js +6 -10
  197. package/esm/oas/ref/ref-types.js +54 -0
  198. package/esm/oas/ref/toRefV31.js +11 -0
  199. package/{script → esm}/oas/requestBody/RequestBody.js +2 -6
  200. package/esm/oas/requestBody/toRequestBodiesV3.js +46 -0
  201. package/{script → esm}/oas/response/Response.js +2 -6
  202. package/esm/oas/response/toResponseV3.js +35 -0
  203. package/esm/oas/schema/Schema.js +1 -0
  204. package/esm/oas/schema/schema-types.js +23 -0
  205. package/esm/oas/schema/toSchemasV3.js +60 -0
  206. package/{script → esm}/oas/string/String.js +2 -6
  207. package/esm/oas/string/string-types.js +29 -0
  208. package/esm/oas/string/toString.js +11 -0
  209. package/{script → esm}/oas/tag/Tag.js +2 -6
  210. package/esm/oas/tag/toTagsV3.js +14 -0
  211. package/{script → esm}/oas/union/Union.js +2 -6
  212. package/esm/oas/union/toUnion.js +22 -0
  213. package/esm/oas/union/union-types.js +12 -0
  214. package/{script → esm}/oas/unknown/Unknown.js +2 -6
  215. package/esm/oas/unknown/toUnknown.js +9 -0
  216. package/esm/oas/unknown/unknown-types.js +8 -0
  217. package/{script → esm}/oas/void/Void.js +4 -8
  218. package/{script → esm}/oas-elements/OasBase.js +1 -5
  219. package/esm/package.json +3 -0
  220. package/esm/parse/parse.js +16 -0
  221. package/{script → esm}/schemas/client.js +2 -4
  222. package/{script → esm}/server/createServer.js +24 -51
  223. package/esm/types/Brand.js +1 -0
  224. package/{script → esm}/types/CustomValue.js +3 -8
  225. package/esm/types/GeneratedValue.js +1 -0
  226. package/{script → esm}/types/GenerationType.js +1 -2
  227. package/esm/types/GeneratorKeys.js +13 -0
  228. package/esm/types/Method.js +32 -0
  229. package/esm/types/Modifiers.js +1 -0
  230. package/esm/types/RefName.js +1 -0
  231. package/esm/types/Settings.js +42 -0
  232. package/esm/types/TypeSystem.js +1 -0
  233. package/esm/types/prettierConfig.js +46 -0
  234. package/{script → esm}/typescript/EntityType.js +3 -7
  235. package/{script → esm}/typescript/FunctionParameter.js +10 -17
  236. package/{script → esm}/typescript/ReactRouterPathParams.js +2 -6
  237. package/esm/typescript/identifiers.js +7 -0
  238. package/esm/typescript/keyValues.js +11 -0
  239. package/{script → esm}/typescript/toDestructuredObject.js +1 -5
  240. package/{script → esm}/typescript/toOperationArg.js +7 -14
  241. package/esm/typescript/toOperationResponse.js +17 -0
  242. package/esm/typescript/toParamsObject.js +12 -0
  243. package/esm/typescript/toPathTemplate.js +3 -0
  244. package/esm/typescript/withDescription.js +3 -0
  245. package/package.json +14 -8
  246. package/types/types/Method.d.ts +1 -0
  247. package/types/types/Method.d.ts.map +1 -1
  248. package/script/context/types.js +0 -2
  249. package/script/deps/jsr.io/@std/encoding/1.0.1/mod.js +0 -38
  250. package/script/deps/jsr.io/@std/path/1.0.0/_common/constants.js +0 -49
  251. package/script/deps/jsr.io/@std/path/1.0.0/_common/dirname.js +0 -11
  252. package/script/deps/jsr.io/@std/path/1.0.0/_common/normalize.js +0 -11
  253. package/script/deps/jsr.io/@std/path/1.0.0/_common/relative.js +0 -12
  254. package/script/deps/jsr.io/@std/path/1.0.0/_os.js +0 -40
  255. package/script/deps/jsr.io/@std/path/1.0.0/mod.js +0 -70
  256. package/script/deps/jsr.io/@std/path/1.0.0/posix/_util.js +0 -11
  257. package/script/deps/jsr.io/@std/path/1.0.0/posix/resolve.js +0 -85
  258. package/script/deps/jsr.io/@std/path/1.0.0/windows/_util.js +0 -20
  259. package/script/deps/jsr.io/@std/yaml/0.215.0/_type/mod.js +0 -39
  260. package/script/deps/jsr.io/@std/yaml/0.215.0/schema/default.js +0 -18
  261. package/script/deps/jsr.io/@std/yaml/0.215.0/schema/mod.js +0 -18
  262. package/script/dsl/ModelCreator.js +0 -2
  263. package/script/dsl/OperationCreator.js +0 -2
  264. package/script/dsl/Stringable.js +0 -2
  265. package/script/dsl/constants.js +0 -4
  266. package/script/generate/generate.js +0 -75
  267. package/script/generate/generateModels.js +0 -56
  268. package/script/generate/generateOperations.js +0 -62
  269. package/script/helpers/naming.js +0 -33
  270. package/script/helpers/refFns.js +0 -30
  271. package/script/helpers/strings.js +0 -11
  272. package/script/mod.js +0 -77
  273. package/script/oas/array/array-types.js +0 -20
  274. package/script/oas/array/toArray.js +0 -24
  275. package/script/oas/boolean/boolean-types.js +0 -11
  276. package/script/oas/boolean/toBoolean.js +0 -14
  277. package/script/oas/components/toComponentsV3.js +0 -48
  278. package/script/oas/contact/contact-types.js +0 -10
  279. package/script/oas/discriminator/discriminator-types.js +0 -9
  280. package/script/oas/discriminator/toDiscriminatorV3.js +0 -15
  281. package/script/oas/document/toDocumentV3.js +0 -28
  282. package/script/oas/example/example-types.js +0 -12
  283. package/script/oas/example/toExamplesV3.js +0 -51
  284. package/script/oas/header/toHeadersV3.js +0 -46
  285. package/script/oas/integer/integer-types.js +0 -21
  286. package/script/oas/integer/toInteger.js +0 -17
  287. package/script/oas/intersection/intersection-types.js +0 -15
  288. package/script/oas/intersection/toIntersection.js +0 -26
  289. package/script/oas/license/license-types.js +0 -10
  290. package/script/oas/markdown/markdown-types.js +0 -5
  291. package/script/oas/mediaType/mediaType-types.js +0 -15
  292. package/script/oas/mediaType/toMediaTypeItemV3.js +0 -43
  293. package/script/oas/null/null-types.js +0 -11
  294. package/script/oas/number/number-types.js +0 -17
  295. package/script/oas/number/toNumber.js +0 -14
  296. package/script/oas/object/object-types.js +0 -30
  297. package/script/oas/object/toAdditionalPropertiesV3.js +0 -18
  298. package/script/oas/object/toObject.js +0 -27
  299. package/script/oas/parameter/parameter-types.js +0 -41
  300. package/script/oas/pathItem/toPathItemV3.js +0 -19
  301. package/script/oas/ref/ref-types.js +0 -57
  302. package/script/oas/ref/toRefV31.js +0 -15
  303. package/script/oas/requestBody/toRequestBodiesV3.js +0 -51
  304. package/script/oas/response/toResponseV3.js +0 -41
  305. package/script/oas/schema/Schema.js +0 -2
  306. package/script/oas/schema/schema-types.js +0 -26
  307. package/script/oas/schema/toSchemasV3.js +0 -67
  308. package/script/oas/string/string-types.js +0 -32
  309. package/script/oas/string/toString.js +0 -15
  310. package/script/oas/tag/toTagsV3.js +0 -18
  311. package/script/oas/union/toUnion.js +0 -26
  312. package/script/oas/union/union-types.js +0 -15
  313. package/script/oas/unknown/toUnknown.js +0 -13
  314. package/script/oas/unknown/unknown-types.js +0 -11
  315. package/script/package.json +0 -3
  316. package/script/parse/parse.js +0 -20
  317. package/script/types/Brand.js +0 -2
  318. package/script/types/GeneratedValue.js +0 -2
  319. package/script/types/GeneratorKeys.js +0 -19
  320. package/script/types/Method.js +0 -34
  321. package/script/types/Modifiers.js +0 -2
  322. package/script/types/RefName.js +0 -2
  323. package/script/types/Settings.js +0 -45
  324. package/script/types/TypeSystem.js +0 -2
  325. package/script/types/prettierConfig.js +0 -49
  326. package/script/typescript/identifiers.js +0 -12
  327. package/script/typescript/keyValues.js +0 -15
  328. package/script/typescript/toOperationResponse.js +0 -21
  329. package/script/typescript/toParamsObject.js +0 -16
  330. package/script/typescript/toPathTemplate.js +0 -7
  331. package/script/typescript/withDescription.js +0 -7
@@ -1,67 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.toOptionalSchemaV3 = exports.toSchemaV3 = exports.toOptionalSchemasV3 = exports.toSchemasV3 = void 0;
4
- const toRefV31_js_1 = require("../ref/toRefV31.js");
5
- const refFns_js_1 = require("../../helpers/refFns.js");
6
- const ts_pattern_1 = require("ts-pattern");
7
- const toArray_js_1 = require("../array/toArray.js");
8
- const toObject_js_1 = require("../object/toObject.js");
9
- const toInteger_js_1 = require("../integer/toInteger.js");
10
- const toNumber_js_1 = require("../number/toNumber.js");
11
- const toBoolean_js_1 = require("../boolean/toBoolean.js");
12
- const toString_js_1 = require("../string/toString.js");
13
- const toUnknown_js_1 = require("../unknown/toUnknown.js");
14
- const toUnion_js_1 = require("../union/toUnion.js");
15
- const toIntersection_js_1 = require("../intersection/toIntersection.js");
16
- const toSchemasV3 = ({ schemas, trail, context }) => {
17
- return Object.fromEntries(Object.entries(schemas).map(([key, schema]) => {
18
- return [
19
- key,
20
- (0, exports.toSchemaV3)({ schema, trail: trail.addSchemaRef(key), context })
21
- ];
22
- }));
23
- };
24
- exports.toSchemasV3 = toSchemasV3;
25
- const toOptionalSchemasV3 = ({ schemas, trail, context }) => {
26
- if (!schemas) {
27
- return undefined;
28
- }
29
- return (0, exports.toSchemasV3)({ schemas, trail, context });
30
- };
31
- exports.toOptionalSchemasV3 = toOptionalSchemasV3;
32
- const toSchemaV3 = ({ schema, trail, context }) => {
33
- if ((0, refFns_js_1.isRef)(schema)) {
34
- return (0, toRefV31_js_1.toRefV31)({ ref: schema, refType: 'schema', trail, context });
35
- }
36
- // Workaround for dodgy Reapit schema
37
- if (schema.type !== 'array' &&
38
- 'optional' in schema &&
39
- schema.optional === true) {
40
- schema.nullable = true;
41
- }
42
- return (0, ts_pattern_1.match)(schema)
43
- .with({ oneOf: ts_pattern_1.P.array() }, ({ oneOf: members, ...value }) => {
44
- return (0, toUnion_js_1.toUnion)({ value, members, trail, context });
45
- })
46
- .with({ anyOf: ts_pattern_1.P.array() }, ({ anyOf: members, ...value }) => {
47
- return (0, toUnion_js_1.toUnion)({ value, members, trail, context });
48
- })
49
- .with({ allOf: ts_pattern_1.P.array() }, ({ allOf: members, ...value }) => {
50
- return (0, toIntersection_js_1.toIntersection)({ value, members, trail, context });
51
- })
52
- .with({ type: 'object' }, value => (0, toObject_js_1.toObject)({ value, trail, context }))
53
- .with({ type: 'array' }, value => (0, toArray_js_1.toArray)({ value, trail, context }))
54
- .with({ type: 'integer' }, value => (0, toInteger_js_1.toInteger)({ value, trail, context }))
55
- .with({ type: 'number' }, value => (0, toNumber_js_1.toNumber)({ value, trail, context }))
56
- .with({ type: 'boolean' }, value => (0, toBoolean_js_1.toBoolean)({ value, trail, context }))
57
- .with({ type: 'string' }, value => (0, toString_js_1.toString)({ value, trail, context }))
58
- .otherwise(value => (0, toUnknown_js_1.toUnknown)({ value, trail, context }));
59
- };
60
- exports.toSchemaV3 = toSchemaV3;
61
- const toOptionalSchemaV3 = ({ schema, trail, context }) => {
62
- if (!schema) {
63
- return undefined;
64
- }
65
- return (0, exports.toSchemaV3)({ schema, trail, context });
66
- };
67
- exports.toOptionalSchemaV3 = toOptionalSchemaV3;
@@ -1,32 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.oasStringData = void 0;
4
- const zod_1 = require("zod");
5
- exports.oasStringData = zod_1.z.object({
6
- oasType: zod_1.z.literal('schema'),
7
- title: zod_1.z.string().optional(),
8
- description: zod_1.z.string().optional(),
9
- default: zod_1.z.string().optional(),
10
- type: zod_1.z.literal('string'),
11
- // Add soon
12
- // maxLength: z.number().optional(),
13
- // minLength: z.number().optional(),
14
- pattern: zod_1.z.string().optional(),
15
- enums: zod_1.z.array(zod_1.z.string()).optional(),
16
- format: zod_1.z
17
- .enum([
18
- 'date-time',
19
- 'time',
20
- 'date',
21
- 'duration',
22
- 'email',
23
- 'hostname',
24
- 'ipv4',
25
- 'ipv6',
26
- 'uuid',
27
- 'uri',
28
- 'regex',
29
- 'binary'
30
- ])
31
- .optional()
32
- });
@@ -1,15 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.toString = void 0;
4
- const String_js_1 = require("./String.js");
5
- const toString = ({ value, trail, context }) => {
6
- const { type: _type, title, description, enum: enums, nullable, ...skipped } = value;
7
- const fields = {
8
- title,
9
- description,
10
- enums,
11
- nullable
12
- };
13
- return new String_js_1.OasString({ fields, trail, skipped, context });
14
- };
15
- exports.toString = toString;
@@ -1,18 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.toTagsV3 = void 0;
4
- const Tag_js_1 = require("./Tag.js");
5
- const toTagsV3 = ({ tags, trail, context }) => {
6
- if (!tags) {
7
- return undefined;
8
- }
9
- return tags.map(tag => {
10
- const { name, description, ...skipped } = tag;
11
- const fields = {
12
- name,
13
- description
14
- };
15
- return new Tag_js_1.OasTag({ fields, trail, context, skipped });
16
- });
17
- };
18
- exports.toTagsV3 = toTagsV3;
@@ -1,26 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.toUnion = void 0;
4
- const Union_js_1 = require("./Union.js");
5
- const toDiscriminatorV3_js_1 = require("../discriminator/toDiscriminatorV3.js");
6
- const toSchemasV3_js_1 = require("../schema/toSchemasV3.js");
7
- const toUnion = ({ value, members, trail, context }) => {
8
- const { discriminator, title, description, nullable, ...skipped } = value;
9
- const fields = {
10
- title,
11
- description,
12
- nullable,
13
- discriminator: (0, toDiscriminatorV3_js_1.toDiscriminatorV3)({
14
- discriminator,
15
- trail: trail.add('oneOf').add('discriminator'),
16
- context
17
- }),
18
- members: members.map((item, index) => (0, toSchemasV3_js_1.toSchemaV3)({
19
- schema: item,
20
- trail: trail.add('oneOf').add(`${index}`),
21
- context
22
- }))
23
- };
24
- return new Union_js_1.OasUnion({ fields, trail, skipped, context });
25
- };
26
- exports.toUnion = toUnion;
@@ -1,15 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.oasUnionData = void 0;
4
- const zod_1 = require("zod");
5
- const schema_types_js_1 = require("../schema/schema-types.js");
6
- const ref_types_js_1 = require("../ref/ref-types.js");
7
- const discriminator_types_js_1 = require("../discriminator/discriminator-types.js");
8
- exports.oasUnionData = zod_1.z.object({
9
- oasType: zod_1.z.literal('schema'),
10
- type: zod_1.z.literal('union'),
11
- title: zod_1.z.string().optional(),
12
- description: zod_1.z.string().optional(),
13
- members: zod_1.z.lazy(() => zod_1.z.array(zod_1.z.union([schema_types_js_1.oasSchemaData, ref_types_js_1.oasSchemaRefData]))),
14
- discriminator: discriminator_types_js_1.oasDiscriminatorData.optional()
15
- });
@@ -1,13 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.toUnknown = void 0;
4
- const Unknown_js_1 = require("./Unknown.js");
5
- const toUnknown = ({ value, trail, context }) => {
6
- const { type: _type, title, description, ...skipped } = value;
7
- const fields = {
8
- title,
9
- description
10
- };
11
- return new Unknown_js_1.OasUnknown({ fields, trail, skipped, context });
12
- };
13
- exports.toUnknown = toUnknown;
@@ -1,11 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.oasUnknownData = void 0;
4
- const zod_1 = require("zod");
5
- exports.oasUnknownData = zod_1.z.object({
6
- oasType: zod_1.z.literal('schema'),
7
- title: zod_1.z.string().optional(),
8
- description: zod_1.z.string().optional(),
9
- default: zod_1.z.unknown().optional(),
10
- type: zod_1.z.literal('unknown')
11
- });
@@ -1,3 +0,0 @@
1
- {
2
- "type": "commonjs"
3
- }
@@ -1,20 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.oasToSkmtc = void 0;
4
- const toDocumentV3_js_1 = require("../oas/document/toDocumentV3.js");
5
- const Trail_js_1 = require("../context/Trail.js");
6
- const oasToSkmtc = (context) => {
7
- const { parsedDocument } = context;
8
- const trail = new Trail_js_1.Trail({
9
- document: parsedDocument
10
- });
11
- if (!parsedDocument.openapi.startsWith('3.0.')) {
12
- throw new Error('Only OpenAPI v3 is supported');
13
- }
14
- return (0, toDocumentV3_js_1.toDocumentV3)({
15
- document: parsedDocument,
16
- trail,
17
- context
18
- });
19
- };
20
- exports.oasToSkmtc = oasToSkmtc;
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,19 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.toGeneratorOnlyKey = exports.toModelGeneratorKey = exports.toOperationGeneratorKey = void 0;
4
- const toOperationGeneratorKey = ({ generatorId, ...rest }) => {
5
- const { path, method } = 'operation' in rest ? rest.operation : rest;
6
- const nakedKey = `${generatorId}|${path}|${method}`;
7
- return nakedKey;
8
- };
9
- exports.toOperationGeneratorKey = toOperationGeneratorKey;
10
- const toModelGeneratorKey = ({ generatorId, refName }) => {
11
- const nakedKey = `${generatorId}|${refName}`;
12
- return nakedKey;
13
- };
14
- exports.toModelGeneratorKey = toModelGeneratorKey;
15
- const toGeneratorOnlyKey = ({ generatorId }) => {
16
- const nakedKey = `${generatorId}`;
17
- return nakedKey;
18
- };
19
- exports.toGeneratorOnlyKey = toGeneratorOnlyKey;
@@ -1,34 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.methods = exports.method = exports.methodValuesNoTrace = exports.methodValues = void 0;
4
- const zod_1 = require("zod");
5
- exports.methodValues = [
6
- 'get',
7
- 'put',
8
- 'post',
9
- 'delete',
10
- 'options',
11
- 'head',
12
- 'patch',
13
- 'trace'
14
- ];
15
- exports.methodValuesNoTrace = [
16
- 'get',
17
- 'put',
18
- 'post',
19
- 'delete',
20
- 'options',
21
- 'head',
22
- 'patch'
23
- ];
24
- exports.method = zod_1.z.enum([
25
- 'get',
26
- 'put',
27
- 'post',
28
- 'delete',
29
- 'options',
30
- 'head',
31
- 'patch',
32
- 'trace'
33
- ]);
34
- exports.methods = zod_1.z.array(exports.method);
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,45 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.skmtcServerConfig = exports.generatorType = exports.skmtcClientConfig = exports.clientSettings = exports.clientGeneratorSettings = exports.modelsGeneratorSettings = exports.operationsGeneratorSettings = exports.baseSettings = void 0;
4
- require("../_dnt.polyfills.js");
5
- const Method_js_1 = require("./Method.js");
6
- const zod_1 = require("zod");
7
- exports.baseSettings = zod_1.z.object({
8
- selected: zod_1.z.boolean(),
9
- name: zod_1.z.string().optional(),
10
- importFrom: zod_1.z.string().optional(),
11
- exportPath: zod_1.z.string().optional()
12
- });
13
- exports.operationsGeneratorSettings = zod_1.z.object({
14
- id: zod_1.z.string(),
15
- exportPath: zod_1.z.string().optional(),
16
- description: zod_1.z.string().optional(),
17
- operations: zod_1.z.record(zod_1.z.record(Method_js_1.method, exports.baseSettings))
18
- });
19
- exports.modelsGeneratorSettings = zod_1.z.object({
20
- id: zod_1.z.string(),
21
- exportPath: zod_1.z.string().optional(),
22
- description: zod_1.z.string().optional(),
23
- models: zod_1.z.record(exports.baseSettings)
24
- });
25
- exports.clientGeneratorSettings = zod_1.z.union([
26
- exports.operationsGeneratorSettings,
27
- exports.modelsGeneratorSettings
28
- ]);
29
- exports.clientSettings = zod_1.z.object({
30
- basePath: zod_1.z.string().optional(),
31
- alias: zod_1.z.record(zod_1.z.string()).optional(),
32
- generators: zod_1.z.array(exports.clientGeneratorSettings)
33
- });
34
- exports.skmtcClientConfig = zod_1.z.object({
35
- serverName: zod_1.z.string().optional(),
36
- stackName: zod_1.z.string().optional(),
37
- deploymentId: zod_1.z.string().optional(),
38
- settings: exports.clientSettings
39
- });
40
- exports.generatorType = zod_1.z.enum(['operation', 'model']);
41
- exports.skmtcServerConfig = zod_1.z.object({
42
- name: zod_1.z.string().optional(),
43
- version: zod_1.z.string().optional(),
44
- generators: zod_1.z.array(zod_1.z.string())
45
- });
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,49 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.prettierConfigType = void 0;
4
- const zod_1 = require("zod");
5
- exports.prettierConfigType = zod_1.z.object({
6
- printWidth: zod_1.z.number().optional(),
7
- tabWidth: zod_1.z.number().optional(),
8
- useTabs: zod_1.z.boolean().optional(),
9
- semi: zod_1.z.boolean().optional(),
10
- singleQuote: zod_1.z.boolean().optional(),
11
- quoteProps: zod_1.z
12
- .union([
13
- zod_1.z.literal('as-needed'),
14
- zod_1.z.literal('consistent'),
15
- zod_1.z.literal('preserve')
16
- ])
17
- .optional(),
18
- jsxSingleQuote: zod_1.z.boolean().optional(),
19
- trailingComma: zod_1.z
20
- .union([zod_1.z.literal('none'), zod_1.z.literal('es5'), zod_1.z.literal('all')])
21
- .optional(),
22
- bracketSameLine: zod_1.z.boolean().optional(),
23
- bracketSpacing: zod_1.z.boolean().optional(),
24
- jsxBracketSameLine: zod_1.z.boolean().optional(),
25
- arrowParens: zod_1.z.union([zod_1.z.literal('avoid'), zod_1.z.literal('always')]).optional(),
26
- rangeStart: zod_1.z.number().optional(),
27
- rangeEnd: zod_1.z.number().optional(),
28
- requirePragma: zod_1.z.boolean().optional(),
29
- insertPragma: zod_1.z.boolean().optional(),
30
- proseWrap: zod_1.z
31
- .union([zod_1.z.literal('always'), zod_1.z.literal('never'), zod_1.z.literal('preserve')])
32
- .optional(),
33
- htmlWhitespaceSensitivity: zod_1.z
34
- .union([zod_1.z.literal('css'), zod_1.z.literal('strict'), zod_1.z.literal('ignore')])
35
- .optional(),
36
- vueIndentScriptAndStyle: zod_1.z.boolean().optional(),
37
- endOfLine: zod_1.z
38
- .union([
39
- zod_1.z.literal('auto'),
40
- zod_1.z.literal('lf'),
41
- zod_1.z.literal('crlf'),
42
- zod_1.z.literal('cr')
43
- ])
44
- .optional(),
45
- embeddedLanguageFormatting: zod_1.z
46
- .union([zod_1.z.literal('auto'), zod_1.z.literal('off')])
47
- .optional(),
48
- singleAttributePerLine: zod_1.z.boolean().optional()
49
- });
@@ -1,12 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.handlePropertyName = exports.handleKey = void 0;
4
- const helper_validator_identifier_1 = require("@babel/helper-validator-identifier");
5
- const handleKey = (key) => {
6
- return (0, helper_validator_identifier_1.isIdentifierName)(key) ? key : `'${key}'`;
7
- };
8
- exports.handleKey = handleKey;
9
- const handlePropertyName = (name, parent) => {
10
- return (0, helper_validator_identifier_1.isIdentifierName)(name) ? `${parent}.${name}` : `${parent}['${name}']`;
11
- };
12
- exports.handlePropertyName = handlePropertyName;
@@ -1,15 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.keyValues = void 0;
4
- const constants_js_1 = require("../dsl/constants.js");
5
- // Filter out properties with falsy or EMPTY values and return as joined string
6
- const keyValues = (properties) => {
7
- const filteredEntries = Object.entries(properties)
8
- .map(([key, value]) => {
9
- const renderedValue = value?.toString() || constants_js_1.EMPTY;
10
- return renderedValue === constants_js_1.EMPTY ? constants_js_1.EMPTY : `${key}: ${renderedValue}`;
11
- })
12
- .filter(row => row !== constants_js_1.EMPTY);
13
- return filteredEntries.length ? `{${filteredEntries.join(',\n')}}` : constants_js_1.EMPTY;
14
- };
15
- exports.keyValues = keyValues;
@@ -1,21 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.toOperationResponse = void 0;
4
- const Definition_js_1 = require("../dsl/Definition.js");
5
- const Void_js_1 = require("../oas/void/Void.js");
6
- const naming_js_1 = require("../helpers/naming.js");
7
- const toOperationResponse = ({ context, operation, destinationPath, typeSystemCreator, toIdentifier }) => {
8
- const successResponse = operation.toSuccessResponse()?.resolve();
9
- const value = typeSystemCreator.create({
10
- context,
11
- schema: successResponse?.toSchema() ?? Void_js_1.OasVoid.empty(context),
12
- destinationPath
13
- });
14
- return new Definition_js_1.Definition({
15
- context,
16
- identifier: toIdentifier((0, naming_js_1.toResponseName)(operation)),
17
- value,
18
- description: successResponse?.description
19
- });
20
- };
21
- exports.toOperationResponse = toOperationResponse;
@@ -1,16 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.toParamsObject = void 0;
4
- const identifiers_js_1 = require("./identifiers.js");
5
- const constants_js_1 = require("../dsl/constants.js");
6
- const toParamsObject = (parameters, queryArg) => {
7
- if (!parameters?.length) {
8
- return constants_js_1.EMPTY;
9
- }
10
- const keyValues = parameters.map(({ name }) => {
11
- const keyValue = `${(0, identifiers_js_1.handleKey)(name)}: ${(0, identifiers_js_1.handlePropertyName)(name, queryArg)}`;
12
- return keyValue;
13
- });
14
- return `{${keyValues.join(',\n')}}`;
15
- };
16
- exports.toParamsObject = toParamsObject;
@@ -1,7 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.toPathTemplate = void 0;
4
- const toPathTemplate = (path, queryArg) => {
5
- return `${path.replaceAll(/{([^}]*)}/g, queryArg ? '${' + queryArg + '.$1}' : '${$1}')}`;
6
- };
7
- exports.toPathTemplate = toPathTemplate;
@@ -1,7 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.withDescription = void 0;
4
- const withDescription = (value, { description }) => {
5
- return description ? `/** ${description} */\n${value}` : `${value}`;
6
- };
7
- exports.withDescription = withDescription;