ts-openapi-codegen 1.0.0-beta.6 → 1.0.0-beta.8

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 (671) hide show
  1. package/README.md +43 -58
  2. package/dist/cli/chekOpenApiConfig/chekOpenApiConfig.d.ts +1 -1
  3. package/dist/cli/chekOpenApiConfig/chekOpenApiConfig.d.ts.map +1 -1
  4. package/dist/cli/chekOpenApiConfig/chekOpenApiConfig.js +9 -4
  5. package/dist/cli/generate/runGenerateOpenApi.d.ts.map +1 -1
  6. package/dist/cli/generate/runGenerateOpenApi.js +8 -7
  7. package/dist/cli/index.js +30 -15
  8. package/dist/cli/initOpenApiConfig/Enums.d.ts +5 -0
  9. package/dist/cli/initOpenApiConfig/Enums.d.ts.map +1 -0
  10. package/dist/cli/initOpenApiConfig/Enums.js +8 -0
  11. package/dist/cli/initOpenApiConfig/Types.d.ts +6 -0
  12. package/dist/cli/initOpenApiConfig/Types.d.ts.map +1 -0
  13. package/dist/cli/initOpenApiConfig/runInitOpenapiConfig.d.ts +3 -0
  14. package/dist/cli/initOpenApiConfig/runInitOpenapiConfig.d.ts.map +1 -0
  15. package/dist/cli/initOpenApiConfig/runInitOpenapiConfig.js +77 -0
  16. package/dist/cli/utils.d.ts +0 -17
  17. package/dist/cli/utils.d.ts.map +1 -1
  18. package/dist/cli/utils.js +0 -20
  19. package/dist/common/Consts.d.ts +2 -0
  20. package/dist/common/Consts.d.ts.map +1 -0
  21. package/dist/common/Consts.js +4 -0
  22. package/dist/common/Enums.d.ts.map +1 -1
  23. package/dist/common/Options.d.ts +4 -6
  24. package/dist/common/Options.d.ts.map +1 -1
  25. package/dist/common/Utils.d.ts +1 -1
  26. package/dist/common/Utils.d.ts.map +1 -1
  27. package/dist/common/Utils.js +11 -12
  28. package/dist/common/VersionedSchema/CommonSchemas.d.ts +12 -0
  29. package/dist/common/VersionedSchema/CommonSchemas.d.ts.map +1 -1
  30. package/dist/common/VersionedSchema/CommonSchemas.js +27 -1
  31. package/dist/common/VersionedSchema/{MultiOptionsMigrationPlan.d.ts → MultiOptionsVersioned/MultiOptionsMigrationPlan.d.ts} +1 -1
  32. package/dist/common/VersionedSchema/MultiOptionsVersioned/MultiOptionsMigrationPlan.d.ts.map +1 -0
  33. package/dist/common/VersionedSchema/{MultiOptionsMigrationPlan.js → MultiOptionsVersioned/MultiOptionsMigrationPlan.js} +18 -7
  34. package/dist/common/VersionedSchema/MultiOptionsVersioned/MultiOptionsSchemaV1.d.ts +6 -0
  35. package/dist/common/VersionedSchema/MultiOptionsVersioned/MultiOptionsSchemaV1.d.ts.map +1 -0
  36. package/dist/common/VersionedSchema/{MultiOptionsSchemaV1.js → MultiOptionsVersioned/MultiOptionsSchemaV1.js} +4 -4
  37. package/dist/common/VersionedSchema/MultiOptionsVersioned/MultiOptionsSchemaV2.d.ts +6 -0
  38. package/dist/common/VersionedSchema/MultiOptionsVersioned/MultiOptionsSchemaV2.d.ts.map +1 -0
  39. package/dist/common/VersionedSchema/{MultiOptionsSchemaV2.js → MultiOptionsVersioned/MultiOptionsSchemaV2.js} +4 -4
  40. package/dist/common/VersionedSchema/MultiOptionsVersioned/MultiOptionsSchemaV3.d.ts +5 -0
  41. package/dist/common/VersionedSchema/MultiOptionsVersioned/MultiOptionsSchemaV3.d.ts.map +1 -0
  42. package/dist/common/VersionedSchema/{MultiOptionsSchemaV3.js → MultiOptionsVersioned/MultiOptionsSchemaV3.js} +3 -3
  43. package/dist/common/VersionedSchema/MultiOptionsVersioned/MultiOptionsSchemaV4.d.ts +6 -0
  44. package/dist/common/VersionedSchema/MultiOptionsVersioned/MultiOptionsSchemaV4.d.ts.map +1 -0
  45. package/dist/common/VersionedSchema/{MultiOptionsSchemaV4.js → MultiOptionsVersioned/MultiOptionsSchemaV4.js} +4 -4
  46. package/dist/common/VersionedSchema/MultiOptionsVersioned/MultiOptionsSchemaV5.d.ts +6 -0
  47. package/dist/common/VersionedSchema/MultiOptionsVersioned/MultiOptionsSchemaV5.d.ts.map +1 -0
  48. package/dist/common/VersionedSchema/MultiOptionsVersioned/MultiOptionsSchemaV5.js +22 -0
  49. package/dist/common/VersionedSchema/MultiOptionsVersioned/MultiOptionsVersionedSchemas.d.ts +3 -0
  50. package/dist/common/VersionedSchema/MultiOptionsVersioned/MultiOptionsVersionedSchemas.d.ts.map +1 -0
  51. package/dist/common/VersionedSchema/{MultiOptionsVersionedSchemas.js → MultiOptionsVersioned/MultiOptionsVersionedSchemas.js} +10 -5
  52. package/dist/common/VersionedSchema/{OptionsMigrationPlans.d.ts → OptionsVersioned/OptionsMigrationPlans.d.ts} +1 -1
  53. package/dist/common/VersionedSchema/OptionsVersioned/OptionsMigrationPlans.d.ts.map +1 -0
  54. package/dist/common/VersionedSchema/OptionsVersioned/OptionsMigrationPlans.js +23 -0
  55. package/dist/common/VersionedSchema/OptionsVersioned/OptionsSchemaV1.d.ts +6 -0
  56. package/dist/common/VersionedSchema/OptionsVersioned/OptionsSchemaV1.d.ts.map +1 -0
  57. package/dist/common/VersionedSchema/{OptionsSchemaV1.js → OptionsVersioned/OptionsSchemaV1.js} +4 -4
  58. package/dist/common/VersionedSchema/OptionsVersioned/OptionsSchemaV2.d.ts +6 -0
  59. package/dist/common/VersionedSchema/OptionsVersioned/OptionsSchemaV2.d.ts.map +1 -0
  60. package/dist/common/VersionedSchema/{OptionsSchemaV2.js → OptionsVersioned/OptionsSchemaV2.js} +4 -4
  61. package/dist/common/VersionedSchema/OptionsVersioned/OptionsSchemaV3.d.ts +5 -0
  62. package/dist/common/VersionedSchema/OptionsVersioned/OptionsSchemaV3.d.ts.map +1 -0
  63. package/dist/common/VersionedSchema/{OptionsSchemaV3.js → OptionsVersioned/OptionsSchemaV3.js} +3 -3
  64. package/dist/common/VersionedSchema/OptionsVersioned/OptionsSchemaV4.d.ts +6 -0
  65. package/dist/common/VersionedSchema/OptionsVersioned/OptionsSchemaV4.d.ts.map +1 -0
  66. package/dist/common/VersionedSchema/OptionsVersioned/OptionsSchemaV4.js +17 -0
  67. package/dist/common/VersionedSchema/OptionsVersioned/OptionsVersionedSchemas.d.ts +3 -0
  68. package/dist/common/VersionedSchema/OptionsVersioned/OptionsVersionedSchemas.d.ts.map +1 -0
  69. package/dist/common/VersionedSchema/{OptionsVersionedSchemas.js → OptionsVersioned/OptionsVersionedSchemas.js} +9 -4
  70. package/dist/common/VersionedSchema/Types.d.ts +0 -4
  71. package/dist/common/VersionedSchema/Types.d.ts.map +1 -1
  72. package/dist/common/__tests__/convertArrayToObject.test.js +62 -59
  73. package/dist/common/__tests__/mergeObjectSchemas.test.js +1 -1
  74. package/dist/common/__tests__/migrationForMultiOptions.test.js +9 -5
  75. package/dist/common/__tests__/migrationForOptions.test.js +17 -8
  76. package/dist/common/defaultOptions.d.ts.map +1 -1
  77. package/dist/common/defaultOptions.js +5 -7
  78. package/dist/core/Context.d.ts +15 -7
  79. package/dist/core/Context.d.ts.map +1 -1
  80. package/dist/core/Context.js +3 -0
  81. package/dist/core/WriteClient.d.ts +43 -45
  82. package/dist/core/WriteClient.d.ts.map +1 -1
  83. package/dist/core/WriteClient.js +156 -81
  84. package/dist/core/__tests__/WriteClient.test.js +12 -8
  85. package/dist/core/api/v2/parser/__tests__/getType.test.js +7 -25
  86. package/dist/core/api/v2/parser/getModel.d.ts.map +1 -1
  87. package/dist/core/api/v2/parser/getModel.js +5 -2
  88. package/dist/core/api/v2/parser/getModelProperties.d.ts.map +1 -1
  89. package/dist/core/api/v2/parser/getModelProperties.js +3 -1
  90. package/dist/core/api/v2/parser/getModels.d.ts.map +1 -1
  91. package/dist/core/api/v2/parser/getModels.js +3 -29
  92. package/dist/core/api/v2/parser/getOperation.d.ts +1 -1
  93. package/dist/core/api/v2/parser/getOperation.d.ts.map +1 -1
  94. package/dist/core/api/v2/parser/getOperation.js +3 -3
  95. package/dist/core/api/v2/parser/getOperationParameter.d.ts +1 -1
  96. package/dist/core/api/v2/parser/getOperationParameter.d.ts.map +1 -1
  97. package/dist/core/api/v2/parser/getOperationParameter.js +4 -2
  98. package/dist/core/api/v2/parser/getOperationParameters.d.ts +1 -1
  99. package/dist/core/api/v2/parser/getOperationParameters.d.ts.map +1 -1
  100. package/dist/core/api/v2/parser/getOperationParameters.js +2 -2
  101. package/dist/core/api/v2/parser/getOperationResponse.d.ts.map +1 -1
  102. package/dist/core/api/v2/parser/getOperationResponse.js +3 -1
  103. package/dist/core/api/v2/parser/getOperationResponses.d.ts +1 -1
  104. package/dist/core/api/v2/parser/getOperationResponses.d.ts.map +1 -1
  105. package/dist/core/api/v2/parser/getOperationResponses.js +2 -2
  106. package/dist/core/api/v2/parser/getServiceName.d.ts +3 -0
  107. package/dist/core/api/v2/parser/getServiceName.d.ts.map +1 -0
  108. package/dist/core/api/v2/parser/getServiceName.js +8 -0
  109. package/dist/core/api/v2/parser/getServices.d.ts.map +1 -1
  110. package/dist/core/api/v2/parser/getServices.js +21 -32
  111. package/dist/core/api/v2/parser/getType.d.ts.map +1 -1
  112. package/dist/core/api/v2/parser/getType.js +13 -9
  113. package/dist/core/api/v3/parser/__tests__/getType.test.js +6 -24
  114. package/dist/core/api/v3/parser/getModel.d.ts.map +1 -1
  115. package/dist/core/api/v3/parser/getModel.js +5 -2
  116. package/dist/core/api/v3/parser/getModelProperties.d.ts.map +1 -1
  117. package/dist/core/api/v3/parser/getModelProperties.js +3 -1
  118. package/dist/core/api/v3/parser/getModels.d.ts.map +1 -1
  119. package/dist/core/api/v3/parser/getModels.js +3 -29
  120. package/dist/core/api/v3/parser/getOperation.d.ts +1 -1
  121. package/dist/core/api/v3/parser/getOperation.d.ts.map +1 -1
  122. package/dist/core/api/v3/parser/getOperation.js +4 -4
  123. package/dist/core/api/v3/parser/getOperationParameter.d.ts +1 -1
  124. package/dist/core/api/v3/parser/getOperationParameter.d.ts.map +1 -1
  125. package/dist/core/api/v3/parser/getOperationParameter.js +6 -3
  126. package/dist/core/api/v3/parser/getOperationParameters.d.ts +1 -1
  127. package/dist/core/api/v3/parser/getOperationParameters.d.ts.map +1 -1
  128. package/dist/core/api/v3/parser/getOperationParameters.js +2 -2
  129. package/dist/core/api/v3/parser/getOperationRequestBody.d.ts.map +1 -1
  130. package/dist/core/api/v3/parser/getOperationRequestBody.js +3 -1
  131. package/dist/core/api/v3/parser/getOperationResponse.d.ts.map +1 -1
  132. package/dist/core/api/v3/parser/getOperationResponse.js +3 -1
  133. package/dist/core/api/v3/parser/getOperationResponses.d.ts +1 -1
  134. package/dist/core/api/v3/parser/getOperationResponses.d.ts.map +1 -1
  135. package/dist/core/api/v3/parser/getOperationResponses.js +2 -2
  136. package/dist/core/api/v3/parser/getServiceName.d.ts +3 -0
  137. package/dist/core/api/v3/parser/getServiceName.d.ts.map +1 -0
  138. package/dist/core/api/v3/parser/getServiceName.js +8 -0
  139. package/dist/core/api/v3/parser/getServices.d.ts.map +1 -1
  140. package/dist/core/api/v3/parser/getServices.js +18 -84
  141. package/dist/core/api/v3/parser/getType.d.ts.map +1 -1
  142. package/dist/core/api/v3/parser/getType.js +22 -10
  143. package/dist/core/api/v3/types/OpenApiPath.model.d.ts +2 -1
  144. package/dist/core/api/v3/types/OpenApiPath.model.d.ts.map +1 -1
  145. package/dist/core/index.d.ts +1 -1
  146. package/dist/core/index.d.ts.map +1 -1
  147. package/dist/core/index.js +19 -20
  148. package/dist/core/types/base/ClientArtifacts.model.d.ts +12 -0
  149. package/dist/core/types/base/ClientArtifacts.model.d.ts.map +1 -0
  150. package/dist/core/types/base/ExportedModel.model.d.ts +17 -0
  151. package/dist/core/types/base/ExportedModel.model.d.ts.map +1 -0
  152. package/dist/core/types/base/ExportedModel.model.js +2 -0
  153. package/dist/core/types/base/ExportedService.model.d.ts +9 -0
  154. package/dist/core/types/base/ExportedService.model.d.ts.map +1 -0
  155. package/dist/core/types/base/ExportedService.model.js +2 -0
  156. package/dist/core/types/base/OutputPaths.model.d.ts +15 -0
  157. package/dist/core/types/base/OutputPaths.model.d.ts.map +1 -0
  158. package/dist/core/types/base/OutputPaths.model.js +2 -0
  159. package/dist/core/types/base/PrefixArtifacts.model.d.ts +6 -0
  160. package/dist/core/types/base/PrefixArtifacts.model.d.ts.map +1 -0
  161. package/dist/core/types/base/PrefixArtifacts.model.js +2 -0
  162. package/dist/core/types/base/PropertyGroup.model.d.ts +4 -0
  163. package/dist/core/types/base/PropertyGroup.model.d.ts.map +1 -0
  164. package/dist/core/types/base/PropertyGroup.model.js +2 -0
  165. package/dist/core/types/base/RefWithtype.model.d.ts +11 -0
  166. package/dist/core/types/base/RefWithtype.model.d.ts.map +1 -0
  167. package/dist/core/types/base/RefWithtype.model.js +2 -0
  168. package/dist/core/types/base/Root.model.d.ts +5 -0
  169. package/dist/core/types/base/Root.model.d.ts.map +1 -0
  170. package/dist/core/types/base/Root.model.js +2 -0
  171. package/dist/core/types/base/SimpleClientArtifacts.model.d.ts +10 -0
  172. package/dist/core/types/base/SimpleClientArtifacts.model.d.ts.map +1 -0
  173. package/dist/core/types/base/SimpleClientArtifacts.model.js +2 -0
  174. package/dist/core/types/enums/HttpClient.enum.d.ts +7 -0
  175. package/dist/core/types/enums/HttpClient.enum.d.ts.map +1 -0
  176. package/dist/core/types/{Enums.js → enums/HttpClient.enum.js} +1 -9
  177. package/dist/core/types/enums/TypeRef.enum.d.ts +8 -0
  178. package/dist/core/types/enums/TypeRef.enum.d.ts.map +1 -0
  179. package/dist/core/types/enums/TypeRef.enum.js +11 -0
  180. package/dist/core/utils/__tests__/getAbsolutePath.test.js +1 -1
  181. package/dist/core/utils/__tests__/getGatheringRefs.test.js +3 -6
  182. package/dist/core/utils/__tests__/getRefFromSchema.test.js +1 -1
  183. package/dist/core/utils/__tests__/pathHelpers.test.js +4 -4
  184. package/dist/core/utils/__tests__/refResolver.test.d.ts +2 -0
  185. package/dist/core/utils/__tests__/refResolver.test.d.ts.map +1 -0
  186. package/dist/core/utils/__tests__/refResolver.test.js +55 -0
  187. package/dist/core/utils/__tests__/registerHandlebarHelpers.test.js +2 -2
  188. package/dist/core/utils/__tests__/registerHandlebarTemplates.test.js +7 -3
  189. package/dist/core/utils/__tests__/resolveRefToImportPath.test.d.ts +2 -0
  190. package/dist/core/utils/__tests__/resolveRefToImportPath.test.d.ts.map +1 -0
  191. package/dist/core/utils/__tests__/resolveRefToImportPath.test.js +67 -0
  192. package/dist/core/utils/__tests__/sortByRequiredExtended.test.js +24 -24
  193. package/dist/core/utils/__tests__/sortByRequiredSimple.test.js +13 -13
  194. package/dist/core/utils/__tests__/writeClientCore.test.js +14 -6
  195. package/dist/core/utils/__tests__/writeClientFullIndex.test.d.ts +2 -0
  196. package/dist/core/utils/__tests__/writeClientFullIndex.test.d.ts.map +1 -0
  197. package/dist/core/utils/__tests__/{writeClientIndex.test.js → writeClientFullIndex.test.js} +15 -7
  198. package/dist/core/utils/__tests__/writeClientModels.test.js +15 -7
  199. package/dist/core/utils/__tests__/writeClientSchemas.test.js +15 -7
  200. package/dist/core/utils/__tests__/writeClientServices.test.js +15 -7
  201. package/dist/core/utils/advancedDeduplicatePath.d.ts +5 -0
  202. package/dist/core/utils/advancedDeduplicatePath.d.ts.map +1 -0
  203. package/dist/core/utils/advancedDeduplicatePath.js +29 -0
  204. package/dist/core/utils/appendUniqueLinesToFile.d.ts +2 -0
  205. package/dist/core/utils/appendUniqueLinesToFile.d.ts.map +1 -0
  206. package/dist/core/utils/appendUniqueLinesToFile.js +24 -0
  207. package/dist/core/utils/createNormalizedRef.d.ts +7 -0
  208. package/dist/core/utils/createNormalizedRef.d.ts.map +1 -0
  209. package/dist/core/utils/createNormalizedRef.js +24 -0
  210. package/dist/core/utils/findCommonParent.d.ts +7 -0
  211. package/dist/core/utils/findCommonParent.d.ts.map +1 -0
  212. package/dist/core/utils/findCommonParent.js +20 -0
  213. package/dist/core/utils/getAbsolutePath.d.ts.map +1 -1
  214. package/dist/core/utils/getAbsolutePath.js +16 -5
  215. package/dist/core/utils/getGatheringRefs.d.ts +2 -2
  216. package/dist/core/utils/getGatheringRefs.d.ts.map +1 -1
  217. package/dist/core/utils/getGatheringRefs.js +26 -17
  218. package/dist/core/utils/getMappedType.d.ts +0 -1
  219. package/dist/core/utils/getMappedType.d.ts.map +1 -1
  220. package/dist/core/utils/getMappedType.js +3 -4
  221. package/dist/core/utils/getOpenApiSpec.d.ts.map +1 -1
  222. package/dist/core/utils/getOpenApiSpec.js +9 -32
  223. package/dist/core/utils/getOutputPaths.d.ts +2 -2
  224. package/dist/core/utils/getOutputPaths.d.ts.map +1 -1
  225. package/dist/core/utils/getPropertyGroupExtended.d.ts +2 -2
  226. package/dist/core/utils/getPropertyGroupExtended.d.ts.map +1 -1
  227. package/dist/core/utils/getPropertyGroupSimple.d.ts +2 -2
  228. package/dist/core/utils/getPropertyGroupSimple.d.ts.map +1 -1
  229. package/dist/core/utils/getRefFromSchema.js +2 -2
  230. package/dist/core/utils/getRelativeModelImportPath.js +1 -1
  231. package/dist/core/utils/getRelativeModelPath.d.ts.map +1 -1
  232. package/dist/core/utils/getRelativeModelPath.js +5 -0
  233. package/dist/core/utils/isDirectory.d.ts +2 -0
  234. package/dist/core/utils/isDirectory.d.ts.map +1 -0
  235. package/dist/core/utils/isDirectory.js +13 -0
  236. package/dist/core/utils/isFileName.d.ts +7 -0
  237. package/dist/core/utils/isFileName.d.ts.map +1 -0
  238. package/dist/core/utils/isFileName.js +30 -0
  239. package/dist/core/utils/mapPathToTargetDirSafe.d.ts +10 -0
  240. package/dist/core/utils/mapPathToTargetDirSafe.d.ts.map +1 -0
  241. package/dist/core/utils/mapPathToTargetDirSafe.js +49 -0
  242. package/dist/core/utils/modelHelpers.d.ts +28 -0
  243. package/dist/core/utils/modelHelpers.d.ts.map +1 -0
  244. package/dist/core/utils/modelHelpers.js +73 -0
  245. package/dist/core/utils/normalizeAllRefs.d.ts +6 -0
  246. package/dist/core/utils/normalizeAllRefs.d.ts.map +1 -0
  247. package/dist/core/utils/normalizeAllRefs.js +35 -0
  248. package/dist/core/utils/normalizePath.d.ts +5 -0
  249. package/dist/core/utils/normalizePath.d.ts.map +1 -0
  250. package/dist/core/utils/normalizePath.js +19 -0
  251. package/dist/core/utils/normalizeRef.d.ts +5 -0
  252. package/dist/core/utils/normalizeRef.d.ts.map +1 -0
  253. package/dist/core/utils/normalizeRef.js +17 -0
  254. package/dist/core/utils/parseRef.d.ts +18 -0
  255. package/dist/core/utils/parseRef.d.ts.map +1 -0
  256. package/dist/core/utils/parseRef.js +64 -0
  257. package/dist/core/utils/pathHelpers.d.ts +1 -0
  258. package/dist/core/utils/pathHelpers.d.ts.map +1 -1
  259. package/dist/core/utils/pathHelpers.js +23 -3
  260. package/dist/core/utils/prepareAlias.d.ts +2 -6
  261. package/dist/core/utils/prepareAlias.d.ts.map +1 -1
  262. package/dist/core/utils/prepareAlias.js +0 -4
  263. package/dist/core/utils/prepareOptions.d.ts.map +1 -1
  264. package/dist/core/utils/prepareOptions.js +5 -7
  265. package/dist/core/utils/registerHandlebarHelpers.d.ts +1 -1
  266. package/dist/core/utils/registerHandlebarHelpers.d.ts.map +1 -1
  267. package/dist/core/utils/registerHandlebarTemplates.d.ts +9 -2
  268. package/dist/core/utils/registerHandlebarTemplates.d.ts.map +1 -1
  269. package/dist/core/utils/registerHandlebarTemplates.js +90 -78
  270. package/dist/core/utils/resolveRefPath.d.ts +7 -0
  271. package/dist/core/utils/resolveRefPath.d.ts.map +1 -0
  272. package/dist/core/utils/resolveRefPath.js +34 -0
  273. package/dist/core/utils/resolveRefToImportPath.d.ts +7 -0
  274. package/dist/core/utils/resolveRefToImportPath.d.ts.map +1 -0
  275. package/dist/core/utils/resolveRefToImportPath.js +45 -0
  276. package/dist/core/utils/serviceHelpers.d.ts +41 -0
  277. package/dist/core/utils/serviceHelpers.d.ts.map +1 -0
  278. package/dist/core/utils/serviceHelpers.js +115 -0
  279. package/dist/core/utils/sortModelByName.d.ts +2 -2
  280. package/dist/core/utils/sortModelByName.d.ts.map +1 -1
  281. package/dist/core/utils/writeClientCore.d.ts +4 -2
  282. package/dist/core/utils/writeClientCore.d.ts.map +1 -1
  283. package/dist/core/utils/writeClientCore.js +4 -1
  284. package/dist/core/utils/writeClientCoreIndex.d.ts +11 -0
  285. package/dist/core/utils/writeClientCoreIndex.d.ts.map +1 -0
  286. package/dist/core/utils/writeClientCoreIndex.js +16 -0
  287. package/dist/core/utils/writeClientFullIndex.d.ts +9 -0
  288. package/dist/core/utils/writeClientFullIndex.d.ts.map +1 -0
  289. package/dist/core/utils/writeClientFullIndex.js +22 -0
  290. package/dist/core/utils/writeClientModels.d.ts +3 -2
  291. package/dist/core/utils/writeClientModels.d.ts.map +1 -1
  292. package/dist/core/utils/writeClientModels.js +5 -0
  293. package/dist/core/utils/writeClientModelsIndex.d.ts +12 -0
  294. package/dist/core/utils/writeClientModelsIndex.d.ts.map +1 -0
  295. package/dist/core/utils/writeClientModelsIndex.js +16 -0
  296. package/dist/core/utils/writeClientSchemas.d.ts +3 -2
  297. package/dist/core/utils/writeClientSchemas.d.ts.map +1 -1
  298. package/dist/core/utils/writeClientSchemas.js +5 -0
  299. package/dist/core/utils/writeClientSchemasIndex.d.ts +12 -0
  300. package/dist/core/utils/writeClientSchemasIndex.d.ts.map +1 -0
  301. package/dist/core/utils/writeClientSchemasIndex.js +16 -0
  302. package/dist/core/utils/writeClientServices.d.ts +5 -4
  303. package/dist/core/utils/writeClientServices.d.ts.map +1 -1
  304. package/dist/core/utils/writeClientServices.js +4 -0
  305. package/dist/core/utils/writeClientServicesIndex.d.ts +12 -0
  306. package/dist/core/utils/writeClientServicesIndex.d.ts.map +1 -0
  307. package/dist/core/utils/writeClientServicesIndex.js +16 -0
  308. package/dist/core/utils/writeClientSimpleIndex.d.ts +9 -0
  309. package/dist/core/utils/writeClientSimpleIndex.d.ts.map +1 -0
  310. package/dist/core/utils/writeClientSimpleIndex.js +22 -0
  311. package/dist/templatesCompiled/cli/openApiConfig.d.ts +9 -0
  312. package/dist/templatesCompiled/cli/openApiConfig.d.ts.map +1 -0
  313. package/dist/templatesCompiled/cli/openApiConfig.js +21 -0
  314. package/dist/templatesCompiled/client/core/ApiError.d.ts.map +1 -0
  315. package/dist/templatesCompiled/client/core/ApiRequestOptions.d.ts.map +1 -0
  316. package/dist/templatesCompiled/client/core/ApiResult.d.ts.map +1 -0
  317. package/dist/templatesCompiled/client/core/CancelablePromise.d.ts.map +1 -0
  318. package/dist/templatesCompiled/client/core/HttpStatusCode.d.ts.map +1 -0
  319. package/dist/templatesCompiled/client/core/OpenAPI.d.ts.map +1 -0
  320. package/dist/templatesCompiled/client/core/axios/getHeaders.d.ts.map +1 -0
  321. package/dist/templatesCompiled/client/core/axios/getRequestBody.d.ts.map +1 -0
  322. package/dist/templatesCompiled/client/core/axios/getResponseBody.d.ts.map +1 -0
  323. package/dist/templatesCompiled/client/core/axios/getResponseHeader.d.ts.map +1 -0
  324. package/dist/templatesCompiled/client/core/axios/request.d.ts.map +1 -0
  325. package/dist/templatesCompiled/client/core/axios/sendRequest.d.ts.map +1 -0
  326. package/dist/templatesCompiled/client/core/fetch/getHeaders.d.ts.map +1 -0
  327. package/dist/templatesCompiled/client/core/fetch/getRequestBody.d.ts.map +1 -0
  328. package/dist/templatesCompiled/client/core/fetch/getResponseBody.d.ts.map +1 -0
  329. package/dist/templatesCompiled/client/core/fetch/getResponseHeader.d.ts.map +1 -0
  330. package/dist/templatesCompiled/client/core/fetch/request.d.ts.map +1 -0
  331. package/dist/templatesCompiled/client/core/fetch/sendRequest.d.ts.map +1 -0
  332. package/dist/templatesCompiled/client/core/functions/catchErrors.d.ts.map +1 -0
  333. package/dist/templatesCompiled/client/core/functions/getFormData.d.ts.map +1 -0
  334. package/dist/templatesCompiled/client/core/functions/getQueryString.d.ts.map +1 -0
  335. package/dist/templatesCompiled/client/core/functions/getUrl.d.ts.map +1 -0
  336. package/dist/templatesCompiled/client/core/functions/isBinary.d.ts.map +1 -0
  337. package/dist/templatesCompiled/client/core/functions/isBlob.d.ts.map +1 -0
  338. package/dist/templatesCompiled/client/core/functions/isDefined.d.ts.map +1 -0
  339. package/dist/templatesCompiled/client/core/functions/isString.d.ts.map +1 -0
  340. package/dist/templatesCompiled/client/core/functions/isStringWithValue.d.ts.map +1 -0
  341. package/dist/templatesCompiled/client/core/functions/isSuccess.d.ts.map +1 -0
  342. package/dist/templatesCompiled/client/core/functions/resolve.d.ts.map +1 -0
  343. package/dist/templatesCompiled/client/core/node/getHeaders.d.ts.map +1 -0
  344. package/dist/templatesCompiled/client/core/node/getRequestBody.d.ts.map +1 -0
  345. package/dist/templatesCompiled/client/core/node/getResponseBody.d.ts.map +1 -0
  346. package/dist/templatesCompiled/client/core/node/getResponseHeader.d.ts.map +1 -0
  347. package/dist/templatesCompiled/client/core/node/request.d.ts.map +1 -0
  348. package/dist/templatesCompiled/client/core/node/sendRequest.d.ts.map +1 -0
  349. package/dist/templatesCompiled/client/core/request.d.ts.map +1 -0
  350. package/dist/templatesCompiled/client/core/xhr/getHeaders.d.ts.map +1 -0
  351. package/dist/templatesCompiled/client/core/xhr/getRequestBody.d.ts.map +1 -0
  352. package/dist/templatesCompiled/client/core/xhr/getResponseBody.d.ts.map +1 -0
  353. package/dist/templatesCompiled/client/core/xhr/getResponseHeader.d.ts.map +1 -0
  354. package/dist/templatesCompiled/client/core/xhr/request.d.ts.map +1 -0
  355. package/dist/templatesCompiled/client/core/xhr/sendRequest.d.ts.map +1 -0
  356. package/dist/templatesCompiled/client/exportModel.d.ts.map +1 -0
  357. package/dist/templatesCompiled/{exportModel.js → client/exportModel.js} +2 -2
  358. package/dist/templatesCompiled/client/exportSchema.d.ts.map +1 -0
  359. package/dist/templatesCompiled/client/exportService.d.ts.map +1 -0
  360. package/dist/templatesCompiled/client/indexCore.d.ts +9 -0
  361. package/dist/templatesCompiled/client/indexCore.d.ts.map +1 -0
  362. package/dist/templatesCompiled/client/indexCore.js +22 -0
  363. package/dist/templatesCompiled/{index.d.ts → client/indexFull.d.ts} +1 -1
  364. package/dist/templatesCompiled/client/indexFull.d.ts.map +1 -0
  365. package/dist/templatesCompiled/client/indexModels.d.ts +15 -0
  366. package/dist/templatesCompiled/client/indexModels.d.ts.map +1 -0
  367. package/dist/templatesCompiled/client/indexModels.js +82 -0
  368. package/dist/templatesCompiled/client/indexServices.d.ts +10 -0
  369. package/dist/templatesCompiled/client/indexServices.d.ts.map +1 -0
  370. package/dist/templatesCompiled/client/indexServices.js +35 -0
  371. package/dist/templatesCompiled/client/indexShemas.d.ts +11 -0
  372. package/dist/templatesCompiled/client/indexShemas.d.ts.map +1 -0
  373. package/dist/templatesCompiled/client/indexShemas.js +47 -0
  374. package/dist/templatesCompiled/client/indexSimple.d.ts +21 -0
  375. package/dist/templatesCompiled/client/indexSimple.d.ts.map +1 -0
  376. package/dist/templatesCompiled/client/indexSimple.js +121 -0
  377. package/dist/templatesCompiled/client/partials/base.d.ts.map +1 -0
  378. package/dist/templatesCompiled/client/partials/exportComposition.d.ts.map +1 -0
  379. package/dist/templatesCompiled/client/partials/exportEnum.d.ts.map +1 -0
  380. package/dist/templatesCompiled/client/partials/exportInterface.d.ts.map +1 -0
  381. package/dist/templatesCompiled/client/partials/exportType.d.ts.map +1 -0
  382. package/dist/templatesCompiled/client/partials/header.d.ts.map +1 -0
  383. package/dist/templatesCompiled/client/partials/isNullable.d.ts.map +1 -0
  384. package/dist/templatesCompiled/client/partials/isReadOnly.d.ts.map +1 -0
  385. package/dist/templatesCompiled/client/partials/isRequired.d.ts.map +1 -0
  386. package/dist/templatesCompiled/client/partials/isRequiredDefinition.d.ts.map +1 -0
  387. package/dist/templatesCompiled/client/partials/parameterValues.d.ts.map +1 -0
  388. package/dist/templatesCompiled/client/partials/parameters.d.ts.map +1 -0
  389. package/dist/templatesCompiled/client/partials/parametersDefinition.d.ts.map +1 -0
  390. package/dist/templatesCompiled/client/partials/result.d.ts.map +1 -0
  391. package/dist/templatesCompiled/client/partials/schema.d.ts.map +1 -0
  392. package/dist/templatesCompiled/client/partials/schemaArray.d.ts.map +1 -0
  393. package/dist/templatesCompiled/client/partials/schemaComposition.d.ts.map +1 -0
  394. package/dist/templatesCompiled/client/partials/schemaDictionary.d.ts.map +1 -0
  395. package/dist/templatesCompiled/client/partials/schemaEnum.d.ts.map +1 -0
  396. package/dist/templatesCompiled/client/partials/schemaGeneric.d.ts.map +1 -0
  397. package/dist/templatesCompiled/client/partials/schemaInterface.d.ts.map +1 -0
  398. package/dist/templatesCompiled/client/partials/serviceOption.d.ts.map +1 -0
  399. package/dist/templatesCompiled/client/partials/type.d.ts.map +1 -0
  400. package/dist/templatesCompiled/client/partials/typeArray.d.ts.map +1 -0
  401. package/dist/templatesCompiled/client/partials/typeDictionary.d.ts.map +1 -0
  402. package/dist/templatesCompiled/client/partials/typeEnum.d.ts.map +1 -0
  403. package/dist/templatesCompiled/client/partials/typeGeneric.d.ts.map +1 -0
  404. package/dist/templatesCompiled/client/partials/typeInterface.d.ts.map +1 -0
  405. package/dist/templatesCompiled/client/partials/typeIntersection.d.ts.map +1 -0
  406. package/dist/templatesCompiled/client/partials/typeReference.d.ts.map +1 -0
  407. package/dist/templatesCompiled/client/partials/typeUnion.d.ts.map +1 -0
  408. package/package.json +7 -4
  409. package/dist/common/VersionedSchema/MultiOptionsMigrationPlan.d.ts.map +0 -1
  410. package/dist/common/VersionedSchema/MultiOptionsSchemaV1.d.ts +0 -6
  411. package/dist/common/VersionedSchema/MultiOptionsSchemaV1.d.ts.map +0 -1
  412. package/dist/common/VersionedSchema/MultiOptionsSchemaV2.d.ts +0 -6
  413. package/dist/common/VersionedSchema/MultiOptionsSchemaV2.d.ts.map +0 -1
  414. package/dist/common/VersionedSchema/MultiOptionsSchemaV3.d.ts +0 -5
  415. package/dist/common/VersionedSchema/MultiOptionsSchemaV3.d.ts.map +0 -1
  416. package/dist/common/VersionedSchema/MultiOptionsSchemaV4.d.ts +0 -6
  417. package/dist/common/VersionedSchema/MultiOptionsSchemaV4.d.ts.map +0 -1
  418. package/dist/common/VersionedSchema/MultiOptionsVersionedSchemas.d.ts +0 -3
  419. package/dist/common/VersionedSchema/MultiOptionsVersionedSchemas.d.ts.map +0 -1
  420. package/dist/common/VersionedSchema/OptionsMigrationPlans.d.ts.map +0 -1
  421. package/dist/common/VersionedSchema/OptionsMigrationPlans.js +0 -15
  422. package/dist/common/VersionedSchema/OptionsSchemaV1.d.ts +0 -6
  423. package/dist/common/VersionedSchema/OptionsSchemaV1.d.ts.map +0 -1
  424. package/dist/common/VersionedSchema/OptionsSchemaV2.d.ts +0 -6
  425. package/dist/common/VersionedSchema/OptionsSchemaV2.d.ts.map +0 -1
  426. package/dist/common/VersionedSchema/OptionsSchemaV3.d.ts +0 -5
  427. package/dist/common/VersionedSchema/OptionsSchemaV3.d.ts.map +0 -1
  428. package/dist/common/VersionedSchema/OptionsVersionedSchemas.d.ts +0 -3
  429. package/dist/common/VersionedSchema/OptionsVersionedSchemas.d.ts.map +0 -1
  430. package/dist/core/types/Enums.d.ts +0 -14
  431. package/dist/core/types/Enums.d.ts.map +0 -1
  432. package/dist/core/types/Models.d.ts +0 -37
  433. package/dist/core/types/Models.d.ts.map +0 -1
  434. package/dist/core/types/shared/ConverterData.model.d.ts +0 -7
  435. package/dist/core/types/shared/ConverterData.model.d.ts.map +0 -1
  436. package/dist/core/utils/__tests__/writeClientIndex.test.d.ts +0 -2
  437. package/dist/core/utils/__tests__/writeClientIndex.test.d.ts.map +0 -1
  438. package/dist/core/utils/writeClientIndex.d.ts +0 -59
  439. package/dist/core/utils/writeClientIndex.d.ts.map +0 -1
  440. package/dist/core/utils/writeClientIndex.js +0 -27
  441. package/dist/templatesCompiled/core/ApiError.d.ts.map +0 -1
  442. package/dist/templatesCompiled/core/ApiRequestOptions.d.ts.map +0 -1
  443. package/dist/templatesCompiled/core/ApiResult.d.ts.map +0 -1
  444. package/dist/templatesCompiled/core/CancelablePromise.d.ts.map +0 -1
  445. package/dist/templatesCompiled/core/HttpStatusCode.d.ts.map +0 -1
  446. package/dist/templatesCompiled/core/OpenAPI.d.ts.map +0 -1
  447. package/dist/templatesCompiled/core/axios/getHeaders.d.ts.map +0 -1
  448. package/dist/templatesCompiled/core/axios/getRequestBody.d.ts.map +0 -1
  449. package/dist/templatesCompiled/core/axios/getResponseBody.d.ts.map +0 -1
  450. package/dist/templatesCompiled/core/axios/getResponseHeader.d.ts.map +0 -1
  451. package/dist/templatesCompiled/core/axios/request.d.ts.map +0 -1
  452. package/dist/templatesCompiled/core/axios/sendRequest.d.ts.map +0 -1
  453. package/dist/templatesCompiled/core/fetch/getHeaders.d.ts.map +0 -1
  454. package/dist/templatesCompiled/core/fetch/getRequestBody.d.ts.map +0 -1
  455. package/dist/templatesCompiled/core/fetch/getResponseBody.d.ts.map +0 -1
  456. package/dist/templatesCompiled/core/fetch/getResponseHeader.d.ts.map +0 -1
  457. package/dist/templatesCompiled/core/fetch/request.d.ts.map +0 -1
  458. package/dist/templatesCompiled/core/fetch/sendRequest.d.ts.map +0 -1
  459. package/dist/templatesCompiled/core/functions/catchErrors.d.ts.map +0 -1
  460. package/dist/templatesCompiled/core/functions/getFormData.d.ts.map +0 -1
  461. package/dist/templatesCompiled/core/functions/getQueryString.d.ts.map +0 -1
  462. package/dist/templatesCompiled/core/functions/getUrl.d.ts.map +0 -1
  463. package/dist/templatesCompiled/core/functions/isBinary.d.ts.map +0 -1
  464. package/dist/templatesCompiled/core/functions/isBlob.d.ts.map +0 -1
  465. package/dist/templatesCompiled/core/functions/isDefined.d.ts.map +0 -1
  466. package/dist/templatesCompiled/core/functions/isString.d.ts.map +0 -1
  467. package/dist/templatesCompiled/core/functions/isStringWithValue.d.ts.map +0 -1
  468. package/dist/templatesCompiled/core/functions/isSuccess.d.ts.map +0 -1
  469. package/dist/templatesCompiled/core/functions/resolve.d.ts.map +0 -1
  470. package/dist/templatesCompiled/core/node/getHeaders.d.ts.map +0 -1
  471. package/dist/templatesCompiled/core/node/getRequestBody.d.ts.map +0 -1
  472. package/dist/templatesCompiled/core/node/getResponseBody.d.ts.map +0 -1
  473. package/dist/templatesCompiled/core/node/getResponseHeader.d.ts.map +0 -1
  474. package/dist/templatesCompiled/core/node/request.d.ts.map +0 -1
  475. package/dist/templatesCompiled/core/node/sendRequest.d.ts.map +0 -1
  476. package/dist/templatesCompiled/core/request.d.ts.map +0 -1
  477. package/dist/templatesCompiled/core/xhr/getHeaders.d.ts.map +0 -1
  478. package/dist/templatesCompiled/core/xhr/getRequestBody.d.ts.map +0 -1
  479. package/dist/templatesCompiled/core/xhr/getResponseBody.d.ts.map +0 -1
  480. package/dist/templatesCompiled/core/xhr/getResponseHeader.d.ts.map +0 -1
  481. package/dist/templatesCompiled/core/xhr/request.d.ts.map +0 -1
  482. package/dist/templatesCompiled/core/xhr/sendRequest.d.ts.map +0 -1
  483. package/dist/templatesCompiled/exportModel.d.ts.map +0 -1
  484. package/dist/templatesCompiled/exportSchema.d.ts.map +0 -1
  485. package/dist/templatesCompiled/exportService.d.ts.map +0 -1
  486. package/dist/templatesCompiled/index.d.ts.map +0 -1
  487. package/dist/templatesCompiled/partials/base.d.ts.map +0 -1
  488. package/dist/templatesCompiled/partials/exportComposition.d.ts.map +0 -1
  489. package/dist/templatesCompiled/partials/exportEnum.d.ts.map +0 -1
  490. package/dist/templatesCompiled/partials/exportInterface.d.ts.map +0 -1
  491. package/dist/templatesCompiled/partials/exportType.d.ts.map +0 -1
  492. package/dist/templatesCompiled/partials/header.d.ts.map +0 -1
  493. package/dist/templatesCompiled/partials/isNullable.d.ts.map +0 -1
  494. package/dist/templatesCompiled/partials/isReadOnly.d.ts.map +0 -1
  495. package/dist/templatesCompiled/partials/isRequired.d.ts.map +0 -1
  496. package/dist/templatesCompiled/partials/isRequiredDefinition.d.ts.map +0 -1
  497. package/dist/templatesCompiled/partials/parameterValues.d.ts.map +0 -1
  498. package/dist/templatesCompiled/partials/parameters.d.ts.map +0 -1
  499. package/dist/templatesCompiled/partials/parametersDefinition.d.ts.map +0 -1
  500. package/dist/templatesCompiled/partials/result.d.ts.map +0 -1
  501. package/dist/templatesCompiled/partials/schema.d.ts.map +0 -1
  502. package/dist/templatesCompiled/partials/schemaArray.d.ts.map +0 -1
  503. package/dist/templatesCompiled/partials/schemaComposition.d.ts.map +0 -1
  504. package/dist/templatesCompiled/partials/schemaDictionary.d.ts.map +0 -1
  505. package/dist/templatesCompiled/partials/schemaEnum.d.ts.map +0 -1
  506. package/dist/templatesCompiled/partials/schemaGeneric.d.ts.map +0 -1
  507. package/dist/templatesCompiled/partials/schemaInterface.d.ts.map +0 -1
  508. package/dist/templatesCompiled/partials/serviceOption.d.ts.map +0 -1
  509. package/dist/templatesCompiled/partials/type.d.ts.map +0 -1
  510. package/dist/templatesCompiled/partials/typeArray.d.ts.map +0 -1
  511. package/dist/templatesCompiled/partials/typeDictionary.d.ts.map +0 -1
  512. package/dist/templatesCompiled/partials/typeEnum.d.ts.map +0 -1
  513. package/dist/templatesCompiled/partials/typeGeneric.d.ts.map +0 -1
  514. package/dist/templatesCompiled/partials/typeInterface.d.ts.map +0 -1
  515. package/dist/templatesCompiled/partials/typeIntersection.d.ts.map +0 -1
  516. package/dist/templatesCompiled/partials/typeReference.d.ts.map +0 -1
  517. package/dist/templatesCompiled/partials/typeUnion.d.ts.map +0 -1
  518. /package/dist/{core/types/Models.js → cli/initOpenApiConfig/Types.js} +0 -0
  519. /package/dist/core/types/{shared/ConverterData.model.js → base/ClientArtifacts.model.js} +0 -0
  520. /package/dist/templatesCompiled/{core → client/core}/ApiError.d.ts +0 -0
  521. /package/dist/templatesCompiled/{core → client/core}/ApiError.js +0 -0
  522. /package/dist/templatesCompiled/{core → client/core}/ApiRequestOptions.d.ts +0 -0
  523. /package/dist/templatesCompiled/{core → client/core}/ApiRequestOptions.js +0 -0
  524. /package/dist/templatesCompiled/{core → client/core}/ApiResult.d.ts +0 -0
  525. /package/dist/templatesCompiled/{core → client/core}/ApiResult.js +0 -0
  526. /package/dist/templatesCompiled/{core → client/core}/CancelablePromise.d.ts +0 -0
  527. /package/dist/templatesCompiled/{core → client/core}/CancelablePromise.js +0 -0
  528. /package/dist/templatesCompiled/{core → client/core}/HttpStatusCode.d.ts +0 -0
  529. /package/dist/templatesCompiled/{core → client/core}/HttpStatusCode.js +0 -0
  530. /package/dist/templatesCompiled/{core → client/core}/OpenAPI.d.ts +0 -0
  531. /package/dist/templatesCompiled/{core → client/core}/OpenAPI.js +0 -0
  532. /package/dist/templatesCompiled/{core → client/core}/axios/getHeaders.d.ts +0 -0
  533. /package/dist/templatesCompiled/{core → client/core}/axios/getHeaders.js +0 -0
  534. /package/dist/templatesCompiled/{core → client/core}/axios/getRequestBody.d.ts +0 -0
  535. /package/dist/templatesCompiled/{core → client/core}/axios/getRequestBody.js +0 -0
  536. /package/dist/templatesCompiled/{core → client/core}/axios/getResponseBody.d.ts +0 -0
  537. /package/dist/templatesCompiled/{core → client/core}/axios/getResponseBody.js +0 -0
  538. /package/dist/templatesCompiled/{core → client/core}/axios/getResponseHeader.d.ts +0 -0
  539. /package/dist/templatesCompiled/{core → client/core}/axios/getResponseHeader.js +0 -0
  540. /package/dist/templatesCompiled/{core → client/core}/axios/request.d.ts +0 -0
  541. /package/dist/templatesCompiled/{core → client/core}/axios/request.js +0 -0
  542. /package/dist/templatesCompiled/{core → client/core}/axios/sendRequest.d.ts +0 -0
  543. /package/dist/templatesCompiled/{core → client/core}/axios/sendRequest.js +0 -0
  544. /package/dist/templatesCompiled/{core → client/core}/fetch/getHeaders.d.ts +0 -0
  545. /package/dist/templatesCompiled/{core → client/core}/fetch/getHeaders.js +0 -0
  546. /package/dist/templatesCompiled/{core → client/core}/fetch/getRequestBody.d.ts +0 -0
  547. /package/dist/templatesCompiled/{core → client/core}/fetch/getRequestBody.js +0 -0
  548. /package/dist/templatesCompiled/{core → client/core}/fetch/getResponseBody.d.ts +0 -0
  549. /package/dist/templatesCompiled/{core → client/core}/fetch/getResponseBody.js +0 -0
  550. /package/dist/templatesCompiled/{core → client/core}/fetch/getResponseHeader.d.ts +0 -0
  551. /package/dist/templatesCompiled/{core → client/core}/fetch/getResponseHeader.js +0 -0
  552. /package/dist/templatesCompiled/{core → client/core}/fetch/request.d.ts +0 -0
  553. /package/dist/templatesCompiled/{core → client/core}/fetch/request.js +0 -0
  554. /package/dist/templatesCompiled/{core → client/core}/fetch/sendRequest.d.ts +0 -0
  555. /package/dist/templatesCompiled/{core → client/core}/fetch/sendRequest.js +0 -0
  556. /package/dist/templatesCompiled/{core → client/core}/functions/catchErrors.d.ts +0 -0
  557. /package/dist/templatesCompiled/{core → client/core}/functions/catchErrors.js +0 -0
  558. /package/dist/templatesCompiled/{core → client/core}/functions/getFormData.d.ts +0 -0
  559. /package/dist/templatesCompiled/{core → client/core}/functions/getFormData.js +0 -0
  560. /package/dist/templatesCompiled/{core → client/core}/functions/getQueryString.d.ts +0 -0
  561. /package/dist/templatesCompiled/{core → client/core}/functions/getQueryString.js +0 -0
  562. /package/dist/templatesCompiled/{core → client/core}/functions/getUrl.d.ts +0 -0
  563. /package/dist/templatesCompiled/{core → client/core}/functions/getUrl.js +0 -0
  564. /package/dist/templatesCompiled/{core → client/core}/functions/isBinary.d.ts +0 -0
  565. /package/dist/templatesCompiled/{core → client/core}/functions/isBinary.js +0 -0
  566. /package/dist/templatesCompiled/{core → client/core}/functions/isBlob.d.ts +0 -0
  567. /package/dist/templatesCompiled/{core → client/core}/functions/isBlob.js +0 -0
  568. /package/dist/templatesCompiled/{core → client/core}/functions/isDefined.d.ts +0 -0
  569. /package/dist/templatesCompiled/{core → client/core}/functions/isDefined.js +0 -0
  570. /package/dist/templatesCompiled/{core → client/core}/functions/isString.d.ts +0 -0
  571. /package/dist/templatesCompiled/{core → client/core}/functions/isString.js +0 -0
  572. /package/dist/templatesCompiled/{core → client/core}/functions/isStringWithValue.d.ts +0 -0
  573. /package/dist/templatesCompiled/{core → client/core}/functions/isStringWithValue.js +0 -0
  574. /package/dist/templatesCompiled/{core → client/core}/functions/isSuccess.d.ts +0 -0
  575. /package/dist/templatesCompiled/{core → client/core}/functions/isSuccess.js +0 -0
  576. /package/dist/templatesCompiled/{core → client/core}/functions/resolve.d.ts +0 -0
  577. /package/dist/templatesCompiled/{core → client/core}/functions/resolve.js +0 -0
  578. /package/dist/templatesCompiled/{core → client/core}/node/getHeaders.d.ts +0 -0
  579. /package/dist/templatesCompiled/{core → client/core}/node/getHeaders.js +0 -0
  580. /package/dist/templatesCompiled/{core → client/core}/node/getRequestBody.d.ts +0 -0
  581. /package/dist/templatesCompiled/{core → client/core}/node/getRequestBody.js +0 -0
  582. /package/dist/templatesCompiled/{core → client/core}/node/getResponseBody.d.ts +0 -0
  583. /package/dist/templatesCompiled/{core → client/core}/node/getResponseBody.js +0 -0
  584. /package/dist/templatesCompiled/{core → client/core}/node/getResponseHeader.d.ts +0 -0
  585. /package/dist/templatesCompiled/{core → client/core}/node/getResponseHeader.js +0 -0
  586. /package/dist/templatesCompiled/{core → client/core}/node/request.d.ts +0 -0
  587. /package/dist/templatesCompiled/{core → client/core}/node/request.js +0 -0
  588. /package/dist/templatesCompiled/{core → client/core}/node/sendRequest.d.ts +0 -0
  589. /package/dist/templatesCompiled/{core → client/core}/node/sendRequest.js +0 -0
  590. /package/dist/templatesCompiled/{core → client/core}/request.d.ts +0 -0
  591. /package/dist/templatesCompiled/{core → client/core}/request.js +0 -0
  592. /package/dist/templatesCompiled/{core → client/core}/xhr/getHeaders.d.ts +0 -0
  593. /package/dist/templatesCompiled/{core → client/core}/xhr/getHeaders.js +0 -0
  594. /package/dist/templatesCompiled/{core → client/core}/xhr/getRequestBody.d.ts +0 -0
  595. /package/dist/templatesCompiled/{core → client/core}/xhr/getRequestBody.js +0 -0
  596. /package/dist/templatesCompiled/{core → client/core}/xhr/getResponseBody.d.ts +0 -0
  597. /package/dist/templatesCompiled/{core → client/core}/xhr/getResponseBody.js +0 -0
  598. /package/dist/templatesCompiled/{core → client/core}/xhr/getResponseHeader.d.ts +0 -0
  599. /package/dist/templatesCompiled/{core → client/core}/xhr/getResponseHeader.js +0 -0
  600. /package/dist/templatesCompiled/{core → client/core}/xhr/request.d.ts +0 -0
  601. /package/dist/templatesCompiled/{core → client/core}/xhr/request.js +0 -0
  602. /package/dist/templatesCompiled/{core → client/core}/xhr/sendRequest.d.ts +0 -0
  603. /package/dist/templatesCompiled/{core → client/core}/xhr/sendRequest.js +0 -0
  604. /package/dist/templatesCompiled/{exportModel.d.ts → client/exportModel.d.ts} +0 -0
  605. /package/dist/templatesCompiled/{exportSchema.d.ts → client/exportSchema.d.ts} +0 -0
  606. /package/dist/templatesCompiled/{exportSchema.js → client/exportSchema.js} +0 -0
  607. /package/dist/templatesCompiled/{exportService.d.ts → client/exportService.d.ts} +0 -0
  608. /package/dist/templatesCompiled/{exportService.js → client/exportService.js} +0 -0
  609. /package/dist/templatesCompiled/{index.js → client/indexFull.js} +0 -0
  610. /package/dist/templatesCompiled/{partials → client/partials}/base.d.ts +0 -0
  611. /package/dist/templatesCompiled/{partials → client/partials}/base.js +0 -0
  612. /package/dist/templatesCompiled/{partials → client/partials}/exportComposition.d.ts +0 -0
  613. /package/dist/templatesCompiled/{partials → client/partials}/exportComposition.js +0 -0
  614. /package/dist/templatesCompiled/{partials → client/partials}/exportEnum.d.ts +0 -0
  615. /package/dist/templatesCompiled/{partials → client/partials}/exportEnum.js +0 -0
  616. /package/dist/templatesCompiled/{partials → client/partials}/exportInterface.d.ts +0 -0
  617. /package/dist/templatesCompiled/{partials → client/partials}/exportInterface.js +0 -0
  618. /package/dist/templatesCompiled/{partials → client/partials}/exportType.d.ts +0 -0
  619. /package/dist/templatesCompiled/{partials → client/partials}/exportType.js +0 -0
  620. /package/dist/templatesCompiled/{partials → client/partials}/header.d.ts +0 -0
  621. /package/dist/templatesCompiled/{partials → client/partials}/header.js +0 -0
  622. /package/dist/templatesCompiled/{partials → client/partials}/isNullable.d.ts +0 -0
  623. /package/dist/templatesCompiled/{partials → client/partials}/isNullable.js +0 -0
  624. /package/dist/templatesCompiled/{partials → client/partials}/isReadOnly.d.ts +0 -0
  625. /package/dist/templatesCompiled/{partials → client/partials}/isReadOnly.js +0 -0
  626. /package/dist/templatesCompiled/{partials → client/partials}/isRequired.d.ts +0 -0
  627. /package/dist/templatesCompiled/{partials → client/partials}/isRequired.js +0 -0
  628. /package/dist/templatesCompiled/{partials → client/partials}/isRequiredDefinition.d.ts +0 -0
  629. /package/dist/templatesCompiled/{partials → client/partials}/isRequiredDefinition.js +0 -0
  630. /package/dist/templatesCompiled/{partials → client/partials}/parameterValues.d.ts +0 -0
  631. /package/dist/templatesCompiled/{partials → client/partials}/parameterValues.js +0 -0
  632. /package/dist/templatesCompiled/{partials → client/partials}/parameters.d.ts +0 -0
  633. /package/dist/templatesCompiled/{partials → client/partials}/parameters.js +0 -0
  634. /package/dist/templatesCompiled/{partials → client/partials}/parametersDefinition.d.ts +0 -0
  635. /package/dist/templatesCompiled/{partials → client/partials}/parametersDefinition.js +0 -0
  636. /package/dist/templatesCompiled/{partials → client/partials}/result.d.ts +0 -0
  637. /package/dist/templatesCompiled/{partials → client/partials}/result.js +0 -0
  638. /package/dist/templatesCompiled/{partials → client/partials}/schema.d.ts +0 -0
  639. /package/dist/templatesCompiled/{partials → client/partials}/schema.js +0 -0
  640. /package/dist/templatesCompiled/{partials → client/partials}/schemaArray.d.ts +0 -0
  641. /package/dist/templatesCompiled/{partials → client/partials}/schemaArray.js +0 -0
  642. /package/dist/templatesCompiled/{partials → client/partials}/schemaComposition.d.ts +0 -0
  643. /package/dist/templatesCompiled/{partials → client/partials}/schemaComposition.js +0 -0
  644. /package/dist/templatesCompiled/{partials → client/partials}/schemaDictionary.d.ts +0 -0
  645. /package/dist/templatesCompiled/{partials → client/partials}/schemaDictionary.js +0 -0
  646. /package/dist/templatesCompiled/{partials → client/partials}/schemaEnum.d.ts +0 -0
  647. /package/dist/templatesCompiled/{partials → client/partials}/schemaEnum.js +0 -0
  648. /package/dist/templatesCompiled/{partials → client/partials}/schemaGeneric.d.ts +0 -0
  649. /package/dist/templatesCompiled/{partials → client/partials}/schemaGeneric.js +0 -0
  650. /package/dist/templatesCompiled/{partials → client/partials}/schemaInterface.d.ts +0 -0
  651. /package/dist/templatesCompiled/{partials → client/partials}/schemaInterface.js +0 -0
  652. /package/dist/templatesCompiled/{partials → client/partials}/serviceOption.d.ts +0 -0
  653. /package/dist/templatesCompiled/{partials → client/partials}/serviceOption.js +0 -0
  654. /package/dist/templatesCompiled/{partials → client/partials}/type.d.ts +0 -0
  655. /package/dist/templatesCompiled/{partials → client/partials}/type.js +0 -0
  656. /package/dist/templatesCompiled/{partials → client/partials}/typeArray.d.ts +0 -0
  657. /package/dist/templatesCompiled/{partials → client/partials}/typeArray.js +0 -0
  658. /package/dist/templatesCompiled/{partials → client/partials}/typeDictionary.d.ts +0 -0
  659. /package/dist/templatesCompiled/{partials → client/partials}/typeDictionary.js +0 -0
  660. /package/dist/templatesCompiled/{partials → client/partials}/typeEnum.d.ts +0 -0
  661. /package/dist/templatesCompiled/{partials → client/partials}/typeEnum.js +0 -0
  662. /package/dist/templatesCompiled/{partials → client/partials}/typeGeneric.d.ts +0 -0
  663. /package/dist/templatesCompiled/{partials → client/partials}/typeGeneric.js +0 -0
  664. /package/dist/templatesCompiled/{partials → client/partials}/typeInterface.d.ts +0 -0
  665. /package/dist/templatesCompiled/{partials → client/partials}/typeInterface.js +0 -0
  666. /package/dist/templatesCompiled/{partials → client/partials}/typeIntersection.d.ts +0 -0
  667. /package/dist/templatesCompiled/{partials → client/partials}/typeIntersection.js +0 -0
  668. /package/dist/templatesCompiled/{partials → client/partials}/typeReference.d.ts +0 -0
  669. /package/dist/templatesCompiled/{partials → client/partials}/typeReference.js +0 -0
  670. /package/dist/templatesCompiled/{partials → client/partials}/typeUnion.d.ts +0 -0
  671. /package/dist/templatesCompiled/{partials → client/partials}/typeUnion.js +0 -0
@@ -5,16 +5,16 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const node_assert_1 = __importDefault(require("node:assert"));
7
7
  const node_test_1 = require("node:test");
8
- const Enums_1 = require("../../types/Enums");
8
+ const HttpClient_enum_1 = require("../../types/enums/HttpClient.enum");
9
+ const WriteClient_1 = require("../../WriteClient");
9
10
  const fileSystem_1 = require("../fileSystem");
10
- const writeClientSchemas_1 = require("../writeClientSchemas");
11
11
  (0, node_test_1.test)('@unit: writeClientSchemas writes to filesystem', async () => {
12
12
  const writeFileCalls = [];
13
13
  // Re-assigning the function manually with a mock
14
14
  const originalWriteFile = fileSystem_1.fileSystem.writeFile;
15
- fileSystem_1.fileSystem.writeFile = node_test_1.mock.fn(async (path, content) => {
15
+ fileSystem_1.fileSystem.writeFile = async (path, content) => {
16
16
  writeFileCalls.push([path, content]);
17
- });
17
+ };
18
18
  const models = [
19
19
  {
20
20
  export: 'interface',
@@ -37,7 +37,14 @@ const writeClientSchemas_1 = require("../writeClientSchemas");
37
37
  },
38
38
  ];
39
39
  const templates = {
40
- index: () => 'index',
40
+ indexes: {
41
+ full: () => 'fullIndex',
42
+ simple: () => 'simpleIndex',
43
+ core: () => 'coreIndex',
44
+ models: () => 'modelsIndex',
45
+ schemas: () => 'schemasIndex',
46
+ services: () => 'servicesIndex',
47
+ },
41
48
  exports: {
42
49
  model: () => 'model',
43
50
  schema: () => 'schema',
@@ -53,11 +60,12 @@ const writeClientSchemas_1 = require("../writeClientSchemas");
53
60
  httpStatusCode: () => 'httpStatusCode',
54
61
  },
55
62
  };
56
- await (0, writeClientSchemas_1.writeClientSchemas)({
63
+ const writeClient = new WriteClient_1.WriteClient();
64
+ await writeClient.writeClientSchemas({
57
65
  models,
58
66
  templates,
59
67
  outputSchemasPath: '/',
60
- httpClient: Enums_1.HttpClient.FETCH,
68
+ httpClient: HttpClient_enum_1.HttpClient.FETCH,
61
69
  useUnionTypes: false,
62
70
  });
63
71
  node_assert_1.default.ok(writeFileCalls.some(([filePath, content]) => filePath.toString().includes('MyModelSchema.ts') && content.toString().includes('schema')), 'Expected writeFile to be called with schema content for MyModelSchema.ts');
@@ -5,16 +5,16 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const node_assert_1 = __importDefault(require("node:assert"));
7
7
  const node_test_1 = require("node:test");
8
- const Enums_1 = require("../../types/Enums");
8
+ const HttpClient_enum_1 = require("../../types/enums/HttpClient.enum");
9
+ const WriteClient_1 = require("../../WriteClient");
9
10
  const fileSystem_1 = require("../fileSystem");
10
- const writeClientServices_1 = require("../writeClientServices");
11
11
  (0, node_test_1.test)('@unit: writeClientServices writes to filesystem', async () => {
12
12
  const writeFileCalls = [];
13
13
  // Re-assigning the function manually with a mock
14
14
  const originalWriteFile = fileSystem_1.fileSystem.writeFile;
15
- fileSystem_1.fileSystem.writeFile = node_test_1.mock.fn(async (path, content) => {
15
+ fileSystem_1.fileSystem.writeFile = async (path, content) => {
16
16
  writeFileCalls.push([path, content]);
17
- });
17
+ };
18
18
  const services = [
19
19
  {
20
20
  name: 'MyService',
@@ -24,7 +24,14 @@ const writeClientServices_1 = require("../writeClientServices");
24
24
  },
25
25
  ];
26
26
  const templates = {
27
- index: () => 'index',
27
+ indexes: {
28
+ full: () => 'fullIndex',
29
+ simple: () => 'simpleIndex',
30
+ core: () => 'coreIndex',
31
+ models: () => 'modelsIndex',
32
+ schemas: () => 'schemasIndex',
33
+ services: () => 'servicesIndex',
34
+ },
28
35
  exports: {
29
36
  model: () => 'model',
30
37
  schema: () => 'schema',
@@ -40,7 +47,8 @@ const writeClientServices_1 = require("../writeClientServices");
40
47
  httpStatusCode: () => 'httpStatusCode',
41
48
  },
42
49
  };
43
- await (0, writeClientServices_1.writeClientServices)({
50
+ const writeClient = new WriteClient_1.WriteClient();
51
+ await writeClient.writeClientServices({
44
52
  services,
45
53
  templates,
46
54
  outputPaths: {
@@ -48,7 +56,7 @@ const writeClientServices_1 = require("../writeClientServices");
48
56
  outputModels: '/',
49
57
  outputServices: '/',
50
58
  },
51
- httpClient: Enums_1.HttpClient.FETCH,
59
+ httpClient: HttpClient_enum_1.HttpClient.FETCH,
52
60
  useUnionTypes: false,
53
61
  useOptions: false,
54
62
  useCancelableRequest: false,
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Advanced path deduplication - remove consecutive duplicate segments
3
+ */
4
+ export declare function advancedDeduplicatePath(path: string): string;
5
+ //# sourceMappingURL=advancedDeduplicatePath.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"advancedDeduplicatePath.d.ts","sourceRoot":"","sources":["../../../src/core/utils/advancedDeduplicatePath.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CA2B5D"}
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.advancedDeduplicatePath = advancedDeduplicatePath;
4
+ /**
5
+ * Advanced path deduplication - remove consecutive duplicate segments
6
+ */
7
+ function advancedDeduplicatePath(path) {
8
+ const segments = path.split('/');
9
+ const result = [];
10
+ for (let i = 0; i < segments.length; i++) {
11
+ const segment = segments[i];
12
+ if (segment === '' || segment === '.') {
13
+ continue;
14
+ }
15
+ if (segment === '..') {
16
+ if (result.length > 0) {
17
+ result.pop();
18
+ }
19
+ continue;
20
+ }
21
+ // Check if this segment is a duplicate of the previous one
22
+ if (result.length > 0 && result[result.length - 1] === segment) {
23
+ // Skip duplicate segment
24
+ continue;
25
+ }
26
+ result.push(segment);
27
+ }
28
+ return result.length > 0 ? '/' + result.join('/') : '';
29
+ }
@@ -0,0 +1,2 @@
1
+ export declare function appendUniqueLinesToFile(filePath: string, data: string): Promise<void>;
2
+ //# sourceMappingURL=appendUniqueLinesToFile.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"appendUniqueLinesToFile.d.ts","sourceRoot":"","sources":["../../../src/core/utils/appendUniqueLinesToFile.ts"],"names":[],"mappings":"AAEA,wBAAsB,uBAAuB,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,iBAoB3E"}
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.appendUniqueLinesToFile = appendUniqueLinesToFile;
4
+ const fileSystem_1 = require("./fileSystem");
5
+ async function appendUniqueLinesToFile(filePath, data) {
6
+ try {
7
+ let existingContent = '';
8
+ const fileExists = await fileSystem_1.fileSystem.exists(filePath);
9
+ if (fileExists) {
10
+ existingContent = await fileSystem_1.fileSystem.readFile(filePath, "utf8");
11
+ }
12
+ const existingLines = existingContent.split(/\r?\n/).filter(Boolean);
13
+ const dataLines = data.split(/\r?\n/).filter(Boolean);
14
+ const linesToAdd = dataLines.filter(line => !existingLines.includes(line.trim()));
15
+ if (linesToAdd.length === 0) {
16
+ return;
17
+ }
18
+ const updatedContent = existingContent + linesToAdd.join('\n') + '\n';
19
+ await fileSystem_1.fileSystem.writeFile(filePath, updatedContent);
20
+ }
21
+ catch (error) {
22
+ throw new Error(`Error when writing to a file: ${error?.message}`);
23
+ }
24
+ }
@@ -0,0 +1,7 @@
1
+ import { ParsedRef } from './parseRef';
2
+ /**
3
+ * Create normalized reference string from parsedRef and resolvedPath.
4
+ * If resolvedPath is a URL, preserve it.
5
+ */
6
+ export declare function createNormalizedRef(parsedRef: ParsedRef, resolvedPath: string): string;
7
+ //# sourceMappingURL=createNormalizedRef.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createNormalizedRef.d.ts","sourceRoot":"","sources":["../../../src/core/utils/createNormalizedRef.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAW,MAAM,YAAY,CAAC;AAEhD;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,GAAG,MAAM,CAetF"}
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createNormalizedRef = createNormalizedRef;
4
+ const parseRef_1 = require("./parseRef");
5
+ /**
6
+ * Create normalized reference string from parsedRef and resolvedPath.
7
+ * If resolvedPath is a URL, preserve it.
8
+ */
9
+ function createNormalizedRef(parsedRef, resolvedPath) {
10
+ switch (parsedRef.type) {
11
+ case parseRef_1.RefType.LOCAL_FRAGMENT:
12
+ return `${resolvedPath}${parsedRef.fragment ?? ''}`;
13
+ case parseRef_1.RefType.EXTERNAL_FILE:
14
+ return resolvedPath;
15
+ case parseRef_1.RefType.EXTERNAL_FILE_FRAGMENT:
16
+ return `${resolvedPath}${parsedRef.fragment ?? ''}`;
17
+ case parseRef_1.RefType.ABSOLUTE_PATH:
18
+ return parsedRef.fragment ? `${resolvedPath}${parsedRef.fragment}` : resolvedPath;
19
+ case parseRef_1.RefType.HTTP_URL:
20
+ return parsedRef.originalRef;
21
+ default:
22
+ return resolvedPath;
23
+ }
24
+ }
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Finds the common parent directory of two paths
3
+ * @param path1 The value of the path
4
+ * @param path2 The value of the path
5
+ */
6
+ export declare function findCommonParent(path1: string, path2: string): string | null;
7
+ //# sourceMappingURL=findCommonParent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"findCommonParent.d.ts","sourceRoot":"","sources":["../../../src/core/utils/findCommonParent.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAa5E"}
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.findCommonParent = findCommonParent;
4
+ /**
5
+ * Finds the common parent directory of two paths
6
+ * @param path1 The value of the path
7
+ * @param path2 The value of the path
8
+ */
9
+ function findCommonParent(path1, path2) {
10
+ const pathSep = '/';
11
+ const parts1 = path1.split(pathSep).filter(Boolean);
12
+ const parts2 = path2.split(pathSep).filter(Boolean);
13
+ let i = 0;
14
+ while (i < parts1.length && i < parts2.length && parts1[i] === parts2[i]) {
15
+ i++;
16
+ }
17
+ if (i === 0)
18
+ return null;
19
+ return pathSep + parts1.slice(0, i).join(pathSep);
20
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"getAbsolutePath.d.ts","sourceRoot":"","sources":["../../../src/core/utils/getAbsolutePath.ts"],"names":[],"mappings":"AAEA,wBAAgB,eAAe,CAAC,aAAa,EAAE,MAAM,GAAG,SAAS,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAkB5F"}
1
+ {"version":3,"file":"getAbsolutePath.d.ts","sourceRoot":"","sources":["../../../src/core/utils/getAbsolutePath.ts"],"names":[],"mappings":"AAEA,wBAAgB,eAAe,CAAC,aAAa,EAAE,MAAM,GAAG,SAAS,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAgC5F"}
@@ -7,14 +7,25 @@ function getAbsolutePath(definitionRef, parentRef) {
7
7
  if (!definitionRef) {
8
8
  return parentRef.startsWith('#/') ? '' : parentRef;
9
9
  }
10
+ const parentBase = parentRef.split('#')[0] || '';
11
+ // If definitionRef is an absolute fragment, attach to parent base
10
12
  if (definitionRef.startsWith('#/')) {
11
- // If definitionRef is an absolute reference (#/), replace the part after # in parentRef.
12
- const basePath = parentRef.split('#')[0]; // We take everything up to #
13
- return `${basePath}${definitionRef}`;
13
+ return `${parentBase}${definitionRef}`;
14
14
  }
15
+ // If parentRef is only a fragment, keep definitionRef as is
15
16
  if (parentRef.startsWith('#/')) {
16
- // If parentRef is an absolute reference, we return definitionRef as it is.
17
17
  return definitionRef;
18
18
  }
19
- return (0, pathHelpers_1.join)((0, pathHelpers_1.dirName)(parentRef), definitionRef);
19
+ // Full URL or absolute filesystem path → return as is
20
+ if (/^https?:\/\//i.test(definitionRef) || definitionRef.startsWith('/')) {
21
+ return definitionRef;
22
+ }
23
+ // If definitionRef already has its own fragment and/or relative path
24
+ if (definitionRef.includes('#')) {
25
+ const [defPath, defFrag] = definitionRef.split('#');
26
+ const absPath = defPath ? (0, pathHelpers_1.join)((0, pathHelpers_1.dirName)(parentBase), defPath) : parentBase;
27
+ return defFrag ? `${absPath}#${defFrag}` : absPath;
28
+ }
29
+ // Plain relative path → resolve against parent base directory
30
+ return (0, pathHelpers_1.join)((0, pathHelpers_1.dirName)(parentBase), definitionRef);
20
31
  }
@@ -1,4 +1,4 @@
1
1
  import { Context } from '../Context';
2
- import { IRefWithtype } from '../types/Models';
3
- export declare function getGatheringRefs(context: Context, object: Record<string, any>, references?: IRefWithtype[], root?: string, isSchema?: boolean): IRefWithtype[];
2
+ import { RefWithType } from '../types/base/RefWithtype.model';
3
+ export declare function getGatheringRefs(context: Context, object: Record<string, any>, references?: RefWithType[], root?: string, isSchema?: boolean): RefWithType[];
4
4
  //# sourceMappingURL=getGatheringRefs.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"getGatheringRefs.d.ts","sourceRoot":"","sources":["../../../src/core/utils/getGatheringRefs.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAY/C,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,UAAU,GAAE,YAAY,EAAO,EAAE,IAAI,GAAE,MAAW,EAAE,QAAQ,GAAE,OAAe,GAAG,YAAY,EAAE,CA+C7K"}
1
+ {"version":3,"file":"getGatheringRefs.d.ts","sourceRoot":"","sources":["../../../src/core/utils/getGatheringRefs.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAe9D,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,UAAU,GAAE,WAAW,EAAO,EAAE,IAAI,GAAE,MAAW,EAAE,QAAQ,GAAE,OAAe,GAAG,WAAW,EAAE,CAqD3K"}
@@ -5,8 +5,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.getGatheringRefs = getGatheringRefs;
7
7
  const fast_deep_equal_1 = __importDefault(require("fast-deep-equal"));
8
- const Enums_1 = require("../types/Enums");
9
- const pathHelpers_1 = require("../utils/pathHelpers");
8
+ const TypeRef_enum_1 = require("../types/enums/TypeRef.enum");
9
+ const normalizeRef_1 = require("./normalizeRef");
10
+ const parseRef_1 = require("./parseRef");
11
+ const resolveRefPath_1 = require("./resolveRefPath");
10
12
  function includes(references, value) {
11
13
  return references.findIndex(item => (0, fast_deep_equal_1.default)(item.value, value)) !== -1;
12
14
  }
@@ -20,24 +22,31 @@ function getGatheringRefs(context, object, references = [], root = '', isSchema
20
22
  return references;
21
23
  }
22
24
  if (object.$ref) {
23
- const isAbsoluteRef = object.$ref.startsWith('#/');
24
- const isHttpRef = object.$ref.startsWith('http://') || object.$ref.startsWith('https://');
25
- // Extracting the base path from root
25
+ // Parse the reference to understand its type
26
26
  const baseRoot = extractBasePath(root);
27
- let newRef = isHttpRef ? object.$ref : isAbsoluteRef ? (0, pathHelpers_1.join)(baseRoot, object.$ref) : (0, pathHelpers_1.join)((0, pathHelpers_1.dirName)(baseRoot), object.$ref);
28
- // Remove the extra '/' before the '#' if there is one.
29
- if (newRef.includes('#/')) {
30
- newRef = newRef.replace(/\/#/, '#');
31
- }
32
- if (includes(references, newRef)) {
27
+ const parsedRef = (0, parseRef_1.parseRef)(object.$ref);
28
+ // Create normalized reference for context.get
29
+ const normalizedRef = (0, normalizeRef_1.normalizeRef)(object.$ref, baseRoot);
30
+ if (includes(references, normalizedRef)) {
33
31
  return references;
34
32
  }
35
- references.push({ value: newRef, type: isSchema ? Enums_1.TypeRef.SCHEMA : Enums_1.TypeRef.OTHERS });
36
- const newObject = context.get(newRef);
37
- let newRoot = isHttpRef ? '' : isAbsoluteRef ? baseRoot : (0, pathHelpers_1.join)((0, pathHelpers_1.dirName)(baseRoot), object.$ref);
38
- // Remove the extra '/' before the '#' if there is one.
39
- if (newRoot.includes('#/')) {
40
- newRoot = newRoot.replace(/\/#/, '#');
33
+ references.push({ value: normalizedRef, type: isSchema ? TypeRef_enum_1.TypeRef.SCHEMA : TypeRef_enum_1.TypeRef.OTHERS });
34
+ const newObject = context.get(normalizedRef);
35
+ // For recursive processing, determine the correct root path
36
+ let newRoot;
37
+ if (parsedRef.type === 'local_fragment') {
38
+ // For local fragments, keep the same root
39
+ newRoot = baseRoot;
40
+ }
41
+ else if (parsedRef.type === 'external_file' || parsedRef.type === 'external_file_fragment') {
42
+ // For external files, use the resolved file path
43
+ const resolvedPath = (0, resolveRefPath_1.resolveRefPath)(parsedRef, baseRoot);
44
+ newRoot = resolvedPath;
45
+ }
46
+ else {
47
+ // For other types, use the normalized path without fragment
48
+ const [filePath] = normalizedRef.split('#');
49
+ newRoot = filePath;
41
50
  }
42
51
  return getGatheringRefs(context, newObject, references, newRoot, isSchema);
43
52
  }
@@ -1,4 +1,3 @@
1
- export declare const TYPE_MAPPINGS: Map<string, string>;
2
1
  /**
3
2
  * Get mapped type for given type to any basic Typescript/Javascript type.
4
3
  */
@@ -1 +1 @@
1
- {"version":3,"file":"getMappedType.d.ts","sourceRoot":"","sources":["../../../src/core/utils/getMappedType.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa,qBAsBxB,CAAC;AAEH;;GAEG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAE9D;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEnD"}
1
+ {"version":3,"file":"getMappedType.d.ts","sourceRoot":"","sources":["../../../src/core/utils/getMappedType.ts"],"names":[],"mappings":"AAwBA;;GAEG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAE9D;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEnD"}
@@ -1,9 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TYPE_MAPPINGS = void 0;
4
3
  exports.getMappedType = getMappedType;
5
4
  exports.hasMappedType = hasMappedType;
6
- exports.TYPE_MAPPINGS = new Map([
5
+ const TYPE_MAPPINGS = new Map([
7
6
  ['File', 'File'],
8
7
  ['file', 'File'],
9
8
  ['any', 'any'],
@@ -30,8 +29,8 @@ exports.TYPE_MAPPINGS = new Map([
30
29
  * Get mapped type for given type to any basic Typescript/Javascript type.
31
30
  */
32
31
  function getMappedType(type) {
33
- return exports.TYPE_MAPPINGS.get(type);
32
+ return TYPE_MAPPINGS.get(type);
34
33
  }
35
34
  function hasMappedType(type) {
36
- return exports.TYPE_MAPPINGS.has(type);
35
+ return TYPE_MAPPINGS.has(type);
37
36
  }
@@ -1 +1 @@
1
- {"version":3,"file":"getOpenApiSpec.d.ts","sourceRoot":"","sources":["../../../src/core/utils/getOpenApiSpec.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AAsBpE;;;;;GAKG;AACH,wBAAsB,cAAc,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC,CAmC5F"}
1
+ {"version":3,"file":"getOpenApiSpec.d.ts","sourceRoot":"","sources":["../../../src/core/utils/getOpenApiSpec.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AAMpE;;;;;GAKG;AACH,wBAAsB,cAAc,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC,CA6B5F"}
@@ -4,27 +4,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.getOpenApiSpec = getOpenApiSpec;
7
- const json_schema_ref_parser_1 = __importDefault(require("@apidevtools/json-schema-ref-parser"));
8
- const path_1 = require("path");
7
+ const swagger_parser_1 = __importDefault(require("@apidevtools/swagger-parser"));
9
8
  const pathHelpers_1 = require("../utils/pathHelpers");
10
9
  const fileSystem_1 = require("./fileSystem");
11
- function replaceRef(object, context, parentRef) {
12
- if (object.$ref && !(0, path_1.isAbsolute)(object.$ref) && !object.$ref.match(/^(http:\/\/|https:\/\/|#\/)/g)) {
13
- object.$ref = (0, pathHelpers_1.join)(parentRef, object.$ref);
14
- }
15
- else {
16
- for (const key of Object.keys(object)) {
17
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
18
- // @ts-ignore
19
- if (object[key] instanceof Object) {
20
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
21
- // @ts-ignore
22
- replaceRef(object[key], context, parentRef);
23
- }
24
- }
25
- }
26
- return object;
27
- }
10
+ const normalizeAllRefs_1 = require("./normalizeAllRefs");
28
11
  /**
29
12
  * Load and parse te open api spec. If the file extension is ".yml" or ".yaml"
30
13
  * we will try to parse the file as a YAML spec, otherwise we will fallback
@@ -40,23 +23,17 @@ async function getOpenApiSpec(context, input) {
40
23
  if (!fileExists) {
41
24
  throw new Error(`Could not read OpenApi spec: "${absoluteInput}"`);
42
25
  }
43
- const resolvedRefs = await json_schema_ref_parser_1.default.resolve(absoluteInput);
26
+ // const isValidated = await SwaggerParser.validate(absoluteInput)
27
+ const resolvedRefs = await swagger_parser_1.default.resolve(absoluteInput, { validate: false });
28
+ // Coerce to the loose interface expected by Context
44
29
  context.addRefs(resolvedRefs);
45
30
  const raw = resolvedRefs.get(absoluteInput);
46
31
  if (!raw || typeof raw !== 'object' || Array.isArray(raw) || !('paths' in raw)) {
47
32
  throw new Error(`Schema at "${absoluteInput}" is not a valid OpenAPI object`);
48
33
  }
49
34
  const mainSchema = raw;
50
- const newPaths = {};
51
- for (const [pathKey, value] of Object.entries(mainSchema.paths)) {
52
- const maybeRef = value;
53
- if (maybeRef.$ref) {
54
- newPaths[pathKey] = replaceRef(context.get(maybeRef.$ref), context, (0, pathHelpers_1.dirName)(maybeRef.$ref));
55
- }
56
- else {
57
- newPaths[pathKey] = value;
58
- }
59
- }
60
- mainSchema.paths = newPaths;
61
- return mainSchema;
35
+ // Normalize all $ref in the entire schema using the new comprehensive resolver
36
+ const normalizedSchema = (0, normalizeAllRefs_1.normalizeAllRefs)(mainSchema, context, absoluteInput);
37
+ // The schema is already fully normalized, so we can return it directly
38
+ return normalizedSchema;
62
39
  }
@@ -1,9 +1,9 @@
1
- import { IOutput } from '../types/Models';
1
+ import { OutputPaths } from '../types/base/OutputPaths.model';
2
2
  export declare const getOutputPaths: ({ output, outputCore, outputModels, outputSchemas, outputServices, }: {
3
3
  output: string;
4
4
  outputCore?: string | undefined;
5
5
  outputServices?: string | undefined;
6
6
  outputModels?: string | undefined;
7
7
  outputSchemas?: string | undefined;
8
- }) => IOutput;
8
+ }) => OutputPaths;
9
9
  //# sourceMappingURL=getOutputPaths.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"getOutputPaths.d.ts","sourceRoot":"","sources":["../../../src/core/utils/getOutputPaths.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAI1C,eAAO,MAAM,cAAc,GAAI,sEAM5B;IACC,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,cAAc,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACpC,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACtC,KAAG,OA+BH,CAAC"}
1
+ {"version":3,"file":"getOutputPaths.d.ts","sourceRoot":"","sources":["../../../src/core/utils/getOutputPaths.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAI9D,eAAO,MAAM,cAAc,GAAI,sEAM5B;IACC,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,cAAc,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACpC,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACtC,KAAG,WA+BH,CAAC"}
@@ -1,4 +1,4 @@
1
- import { TPropertyGroupExtended } from '../types/Models';
1
+ import { PropertyGroupExtended } from '../types/base/PropertyGroup.model';
2
2
  import { OperationParameter } from '../types/shared/OperationParameter.model';
3
- export declare function getPropertyGroupExtended(prop: OperationParameter): TPropertyGroupExtended;
3
+ export declare function getPropertyGroupExtended(prop: OperationParameter): PropertyGroupExtended;
4
4
  //# sourceMappingURL=getPropertyGroupExtended.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"getPropertyGroupExtended.d.ts","sourceRoot":"","sources":["../../../src/core/utils/getPropertyGroupExtended.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,0CAA0C,CAAC;AAG9E,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,kBAAkB,GAAG,sBAAsB,CAKzF"}
1
+ {"version":3,"file":"getPropertyGroupExtended.d.ts","sourceRoot":"","sources":["../../../src/core/utils/getPropertyGroupExtended.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAC1E,OAAO,EAAE,kBAAkB,EAAE,MAAM,0CAA0C,CAAC;AAG9E,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,kBAAkB,GAAG,qBAAqB,CAKxF"}
@@ -1,3 +1,3 @@
1
- import { TPropertyGroupSimple } from '../types/Models';
2
- export declare function getPropertyGroupSimple(prop: any): TPropertyGroupSimple;
1
+ import { PropertyGroupSimple } from '../types/base/PropertyGroup.model';
2
+ export declare function getPropertyGroupSimple(prop: any): PropertyGroupSimple;
3
3
  //# sourceMappingURL=getPropertyGroupSimple.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"getPropertyGroupSimple.d.ts","sourceRoot":"","sources":["../../../src/core/utils/getPropertyGroupSimple.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAGvD,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,GAAG,GAAG,oBAAoB,CAItE"}
1
+ {"version":3,"file":"getPropertyGroupSimple.d.ts","sourceRoot":"","sources":["../../../src/core/utils/getPropertyGroupSimple.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AAGxE,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,GAAG,GAAG,mBAAmB,CAIrE"}
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getRefFromSchema = getRefFromSchema;
4
- const Enums_1 = require("../types/Enums");
4
+ const TypeRef_enum_1 = require("../types/enums/TypeRef.enum");
5
5
  const getGatheringRefs_1 = require("./getGatheringRefs");
6
6
  function getRefFromSchema(context, object) {
7
7
  const references = (0, getGatheringRefs_1.getGatheringRefs)(context, object);
8
- return references.filter(item => item.type === Enums_1.TypeRef.SCHEMA).map(value => value.value);
8
+ return references.filter(item => item.type === TypeRef_enum_1.TypeRef.SCHEMA).map(value => value.value);
9
9
  }
@@ -30,7 +30,7 @@ function getRelativeModelImportPath(rootPath, sourcePath, targetPath) {
30
30
  absSourcePath = path_1.default.resolve(absoluteRoot, sourceRelativePath);
31
31
  }
32
32
  const absSourceDir = normalizedSourcePath ? path_1.default.dirname(absSourcePath) : absoluteRoot;
33
- let absTargetPath = path_1.default.resolve(absSourceDir, targetPath);
33
+ let absTargetPath = path_1.default.isAbsolute(targetPath) ? targetPath : path_1.default.resolve(absSourceDir, targetPath);
34
34
  if (!(0, isInsideDirectory_1.isInsideDirectory)(absTargetPath, rootPath)) {
35
35
  const targetRelativePath = (0, getRelativeModelPath_1.getRelativeModelPath)(absoluteRoot, targetPath);
36
36
  absTargetPath = path_1.default.resolve(absoluteRoot, targetRelativePath);
@@ -1 +1 @@
1
- {"version":3,"file":"getRelativeModelPath.d.ts","sourceRoot":"","sources":["../../../src/core/utils/getRelativeModelPath.ts"],"names":[],"mappings":"AAKA;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,UAAU,EAAE,MAAM,GAAG,SAAS,EAAE,iBAAiB,EAAE,MAAM,UAwB7F"}
1
+ {"version":3,"file":"getRelativeModelPath.d.ts","sourceRoot":"","sources":["../../../src/core/utils/getRelativeModelPath.ts"],"names":[],"mappings":"AAMA;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,UAAU,EAAE,MAAM,GAAG,SAAS,EAAE,iBAAiB,EAAE,MAAM,UA6B7F"}
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getRelativeModelPath = getRelativeModelPath;
4
+ const getTypeName_1 = require("./getTypeName");
4
5
  const isInsideDirectory_1 = require("./isInsideDirectory");
5
6
  const pathHelpers_1 = require("./pathHelpers");
6
7
  const replaceString_1 = require("./replaceString");
@@ -19,6 +20,10 @@ function getRelativeModelPath(folderPath, relativeModelPath) {
19
20
  const pathSep = '/';
20
21
  let mappedPaths = '';
21
22
  let modelPath = relativeModelPath;
23
+ // If absolute path (filesystem or URL-like), collapse to type name only
24
+ if (modelPath.startsWith('/')) {
25
+ return (0, getTypeName_1.getTypeName)(modelPath);
26
+ }
22
27
  if (modelPath.startsWith('../')) {
23
28
  const pathArray = modelPath.split(pathSep).filter(Boolean);
24
29
  while (pathArray[0] === '..') {
@@ -0,0 +1,2 @@
1
+ export declare function isDirectory(path: string): boolean;
2
+ //# sourceMappingURL=isDirectory.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isDirectory.d.ts","sourceRoot":"","sources":["../../../src/core/utils/isDirectory.ts"],"names":[],"mappings":"AAIA,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAMjD"}
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isDirectory = isDirectory;
4
+ const fs_1 = require("fs");
5
+ const pathHelpers_1 = require("./pathHelpers");
6
+ function isDirectory(path) {
7
+ try {
8
+ return (0, fs_1.statSync)((0, pathHelpers_1.normalize)(path)).isDirectory();
9
+ }
10
+ catch {
11
+ return false;
12
+ }
13
+ }
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Checks if the string is just a file name (with an extension)
3
+ * @param str - the line to check
4
+ * @returns true, if this is the file name
5
+ */
6
+ export declare function isFileName(str: string): boolean;
7
+ //# sourceMappingURL=isFileName.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isFileName.d.ts","sourceRoot":"","sources":["../../../src/core/utils/isFileName.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAmB/C"}