ts-openapi-codegen 1.0.0-beta.7 → 1.0.0

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 (662) hide show
  1. package/README.md +221 -123
  2. package/README.rus.md +725 -0
  3. package/dist/cli/checkAndUpdateConfig/checkConfig.d.ts +12 -0
  4. package/dist/cli/checkAndUpdateConfig/checkConfig.d.ts.map +1 -0
  5. package/dist/cli/checkAndUpdateConfig/checkConfig.js +66 -0
  6. package/dist/cli/checkAndUpdateConfig/constants.d.ts +13 -0
  7. package/dist/cli/checkAndUpdateConfig/constants.d.ts.map +1 -0
  8. package/dist/cli/checkAndUpdateConfig/constants.js +29 -0
  9. package/dist/cli/checkAndUpdateConfig/types.d.ts +20 -0
  10. package/dist/cli/checkAndUpdateConfig/types.d.ts.map +1 -0
  11. package/dist/cli/checkAndUpdateConfig/types.js +12 -0
  12. package/dist/cli/checkAndUpdateConfig/updateConfig.d.ts +12 -0
  13. package/dist/cli/checkAndUpdateConfig/updateConfig.d.ts.map +1 -0
  14. package/dist/cli/checkAndUpdateConfig/updateConfig.js +56 -0
  15. package/dist/cli/checkAndUpdateConfig/utils/generateConfigExample.d.ts +2 -0
  16. package/dist/cli/checkAndUpdateConfig/utils/generateConfigExample.d.ts.map +1 -0
  17. package/dist/cli/checkAndUpdateConfig/utils/generateConfigExample.js +11 -0
  18. package/dist/cli/checkAndUpdateConfig/utils/prepareConfigData.d.ts +14 -0
  19. package/dist/cli/checkAndUpdateConfig/utils/prepareConfigData.d.ts.map +1 -0
  20. package/dist/cli/checkAndUpdateConfig/utils/prepareConfigData.js +30 -0
  21. package/dist/cli/checkAndUpdateConfig/utils/removeDefaultConfigValues.d.ts +17 -0
  22. package/dist/cli/checkAndUpdateConfig/utils/removeDefaultConfigValues.d.ts.map +1 -0
  23. package/dist/cli/checkAndUpdateConfig/utils/removeDefaultConfigValues.js +29 -0
  24. package/dist/cli/checkAndUpdateConfig/utils/rewriteConfigFile.d.ts +2 -0
  25. package/dist/cli/checkAndUpdateConfig/utils/rewriteConfigFile.d.ts.map +1 -0
  26. package/dist/cli/checkAndUpdateConfig/utils/rewriteConfigFile.js +11 -0
  27. package/dist/cli/checkAndUpdateConfig/utils/selectConfigAction.d.ts +29 -0
  28. package/dist/cli/checkAndUpdateConfig/utils/selectConfigAction.d.ts.map +1 -0
  29. package/dist/cli/checkAndUpdateConfig/utils/selectConfigAction.js +49 -0
  30. package/dist/cli/checkAndUpdateConfig/utils/updateExistingConfigFile.d.ts +6 -0
  31. package/dist/cli/checkAndUpdateConfig/utils/updateExistingConfigFile.d.ts.map +1 -0
  32. package/dist/cli/checkAndUpdateConfig/utils/updateExistingConfigFile.js +22 -0
  33. package/dist/cli/checkAndUpdateConfig/utils/validateAndMigrateConfigData.d.ts +17 -0
  34. package/dist/cli/checkAndUpdateConfig/utils/validateAndMigrateConfigData.d.ts.map +1 -0
  35. package/dist/cli/checkAndUpdateConfig/utils/validateAndMigrateConfigData.js +53 -0
  36. package/dist/cli/checkAndUpdateConfig/utils/writeConfigFile.d.ts +34 -0
  37. package/dist/cli/checkAndUpdateConfig/utils/writeConfigFile.d.ts.map +1 -0
  38. package/dist/cli/checkAndUpdateConfig/utils/writeConfigFile.js +41 -0
  39. package/dist/cli/checkAndUpdateConfig/utils/writeExampleConfigFile.d.ts +6 -0
  40. package/dist/cli/checkAndUpdateConfig/utils/writeExampleConfigFile.d.ts.map +1 -0
  41. package/dist/cli/checkAndUpdateConfig/utils/writeExampleConfigFile.js +18 -0
  42. package/dist/cli/generate/runGenerateOpenApi.d.ts +2 -2
  43. package/dist/cli/generate/runGenerateOpenApi.d.ts.map +1 -1
  44. package/dist/cli/generate/runGenerateOpenApi.js +15 -16
  45. package/dist/cli/index.d.ts +1 -0
  46. package/dist/cli/index.js +66 -23
  47. package/dist/cli/initOpenApiConfig/Enums.d.ts +5 -0
  48. package/dist/cli/initOpenApiConfig/Enums.d.ts.map +1 -0
  49. package/dist/cli/initOpenApiConfig/Enums.js +8 -0
  50. package/dist/cli/initOpenApiConfig/Types.d.ts +6 -0
  51. package/dist/cli/initOpenApiConfig/Types.d.ts.map +1 -0
  52. package/dist/cli/initOpenApiConfig/Types.js +2 -0
  53. package/dist/cli/initOpenApiConfig/runInitOpenapiConfig.d.ts +3 -0
  54. package/dist/cli/initOpenApiConfig/runInitOpenapiConfig.d.ts.map +1 -0
  55. package/dist/cli/initOpenApiConfig/runInitOpenapiConfig.js +70 -0
  56. package/dist/cli/interactive/confirmDialog.d.ts +17 -0
  57. package/dist/cli/interactive/confirmDialog.d.ts.map +1 -0
  58. package/dist/cli/interactive/confirmDialog.js +36 -0
  59. package/dist/cli/interactive/constants.d.ts +7 -0
  60. package/dist/cli/interactive/constants.d.ts.map +1 -0
  61. package/dist/cli/interactive/constants.js +25 -0
  62. package/dist/cli/interactive/selectDialog.d.ts +17 -0
  63. package/dist/cli/interactive/selectDialog.d.ts.map +1 -0
  64. package/dist/cli/interactive/selectDialog.js +43 -0
  65. package/dist/cli/interactive/types.d.ts +40 -0
  66. package/dist/cli/interactive/types.d.ts.map +1 -0
  67. package/dist/cli/interactive/types.js +12 -0
  68. package/dist/common/Consts.d.ts +25 -0
  69. package/dist/common/Consts.d.ts.map +1 -0
  70. package/dist/common/Consts.js +31 -0
  71. package/dist/common/Enums.d.ts +4 -0
  72. package/dist/common/Enums.d.ts.map +1 -1
  73. package/dist/common/Enums.js +6 -1
  74. package/dist/common/Logger.d.ts +1 -1
  75. package/dist/common/Logger.d.ts.map +1 -1
  76. package/dist/common/Logger.js +5 -38
  77. package/dist/common/UpdateNotifier.d.ts +36 -2
  78. package/dist/common/UpdateNotifier.d.ts.map +1 -1
  79. package/dist/common/UpdateNotifier.js +150 -57
  80. package/dist/common/VersionedSchema/Types.d.ts +5 -0
  81. package/dist/common/VersionedSchema/Types.d.ts.map +1 -1
  82. package/dist/common/VersionedSchema/Utils/determineBestMatchingSchemaVersion.d.ts +1 -7
  83. package/dist/common/VersionedSchema/Utils/determineBestMatchingSchemaVersion.d.ts.map +1 -1
  84. package/dist/common/VersionedSchema/Utils/getCurrentErrorMessage.d.ts +3 -0
  85. package/dist/common/VersionedSchema/Utils/getCurrentErrorMessage.d.ts.map +1 -0
  86. package/dist/common/VersionedSchema/Utils/getCurrentErrorMessage.js +14 -0
  87. package/dist/common/VersionedSchema/Utils/getKeyByMapValue.d.ts +2 -0
  88. package/dist/common/VersionedSchema/Utils/getKeyByMapValue.d.ts.map +1 -0
  89. package/dist/common/VersionedSchema/Utils/getKeyByMapValue.js +11 -0
  90. package/dist/common/VersionedSchema/Utils/migrateDataToLatestSchemaVersion.d.ts +5 -2
  91. package/dist/common/VersionedSchema/Utils/migrateDataToLatestSchemaVersion.d.ts.map +1 -1
  92. package/dist/common/VersionedSchema/Utils/migrateDataToLatestSchemaVersion.js +22 -15
  93. package/dist/common/utils/__tests__/__mock__/mockJoiSchema.d.ts.map +1 -0
  94. package/dist/common/utils/__tests__/convertArrayToObject.test.d.ts.map +1 -0
  95. package/dist/common/{__tests__ → utils/__tests__}/convertArrayToObject.test.js +14 -14
  96. package/dist/common/utils/__tests__/determineBestMatchingSchemaVersion.test.d.ts.map +1 -0
  97. package/dist/common/{__tests__ → utils/__tests__}/determineBestMatchingSchemaVersion.test.js +5 -5
  98. package/dist/common/utils/__tests__/generateKeyMappingForInvalidKeys.test.d.ts.map +1 -0
  99. package/dist/common/{__tests__ → utils/__tests__}/generateKeyMappingForInvalidKeys.test.js +4 -4
  100. package/dist/common/utils/__tests__/getUniqueKeysFromSchemas.test.d.ts.map +1 -0
  101. package/dist/common/{__tests__ → utils/__tests__}/getUniqueKeysFromSchemas.test.js +4 -4
  102. package/dist/common/utils/__tests__/getUniqueObjectKeys.test.d.ts.map +1 -0
  103. package/dist/common/{__tests__ → utils/__tests__}/getUniqueObjectKeys.test.js +5 -5
  104. package/dist/common/utils/__tests__/mergeObjectSchemas.test.d.ts.map +1 -0
  105. package/dist/common/{__tests__ → utils/__tests__}/mergeObjectSchemas.test.js +5 -5
  106. package/dist/common/utils/__tests__/migrationForMultiOptions.test.d.ts.map +1 -0
  107. package/dist/common/{__tests__ → utils/__tests__}/migrationForMultiOptions.test.js +21 -15
  108. package/dist/common/utils/__tests__/migrationForOptions.test.d.ts.map +1 -0
  109. package/dist/common/{__tests__ → utils/__tests__}/migrationForOptions.test.js +13 -9
  110. package/dist/common/utils/__tests__/pathHelpers.test.d.ts.map +1 -0
  111. package/dist/{core → common}/utils/__tests__/pathHelpers.test.js +8 -8
  112. package/dist/common/utils/__tests__/replaceInvalidKeysWithMappedNames.test.d.ts.map +1 -0
  113. package/dist/common/{__tests__ → utils/__tests__}/replaceInvalidKeysWithMappedNames.test.js +5 -5
  114. package/dist/common/utils/__tests__/validateAndSuggestKeyCorrections.test.d.ts.map +1 -0
  115. package/dist/common/{__tests__ → utils/__tests__}/validateAndSuggestKeyCorrections.test.js +5 -5
  116. package/dist/common/utils/convertArrayToObject.d.ts +2 -0
  117. package/dist/common/utils/convertArrayToObject.d.ts.map +1 -0
  118. package/dist/common/{Utils.js → utils/convertArrayToObject.js} +0 -20
  119. package/dist/{core/utils/fileSystem.d.ts → common/utils/fileSystemHelpers.d.ts} +8 -5
  120. package/dist/common/utils/fileSystemHelpers.d.ts.map +1 -0
  121. package/dist/common/utils/fileSystemHelpers.js +85 -0
  122. package/dist/common/utils/format.d.ts +3 -0
  123. package/dist/common/utils/format.d.ts.map +1 -0
  124. package/dist/{core → common}/utils/format.js +2 -2
  125. package/dist/common/utils/loadConfigIfExists.d.ts +2 -0
  126. package/dist/common/utils/loadConfigIfExists.d.ts.map +1 -0
  127. package/dist/common/utils/loadConfigIfExists.js +22 -0
  128. package/dist/common/utils/pathHelpers.d.ts +6 -0
  129. package/dist/common/utils/pathHelpers.d.ts.map +1 -0
  130. package/dist/{core → common}/utils/pathHelpers.js +16 -20
  131. package/dist/common/utils/safeHasOwn.d.ts +2 -0
  132. package/dist/common/utils/safeHasOwn.d.ts.map +1 -0
  133. package/dist/common/utils/safeHasOwn.js +9 -0
  134. package/dist/core/Context.d.ts.map +1 -1
  135. package/dist/core/Context.js +3 -3
  136. package/dist/core/WriteClient.d.ts.map +1 -1
  137. package/dist/core/WriteClient.js +18 -18
  138. package/dist/core/__tests__/WriteClient.test.js +61 -60
  139. package/dist/core/api/v2/Parser.d.ts.map +1 -1
  140. package/dist/core/api/v2/Parser.js +2 -9
  141. package/dist/core/api/v2/parser/__tests__/getServer.test.js +2 -2
  142. package/dist/core/api/v2/parser/__tests__/getType.test.js +3 -3
  143. package/dist/core/api/v2/parser/getModelProperties.d.ts.map +1 -1
  144. package/dist/core/api/v2/parser/getModelProperties.js +2 -5
  145. package/dist/core/api/v2/parser/getModels.d.ts.map +1 -1
  146. package/dist/core/api/v2/parser/getModels.js +2 -1
  147. package/dist/core/api/v2/parser/getOperationParameter.d.ts.map +1 -1
  148. package/dist/core/api/v2/parser/getOperationParameter.js +2 -1
  149. package/dist/core/api/v2/parser/getOperationResponse.d.ts.map +1 -1
  150. package/dist/core/api/v2/parser/getOperationResponse.js +2 -5
  151. package/dist/core/api/v2/parser/getOperationResponses.d.ts.map +1 -1
  152. package/dist/core/api/v2/parser/getOperationResponses.js +2 -5
  153. package/dist/core/api/v2/parser/getServices.d.ts.map +1 -1
  154. package/dist/core/api/v2/parser/getServices.js +2 -5
  155. package/dist/core/api/v2/parser/getType.js +4 -4
  156. package/dist/core/api/v3/Parser.d.ts +1 -1
  157. package/dist/core/api/v3/Parser.d.ts.map +1 -1
  158. package/dist/core/api/v3/Parser.js +2 -9
  159. package/dist/core/api/v3/parser/__tests__/getServer.test.js +3 -3
  160. package/dist/core/api/v3/parser/__tests__/getType.test.js +3 -3
  161. package/dist/core/api/v3/parser/getModelProperties.d.ts.map +1 -1
  162. package/dist/core/api/v3/parser/getModelProperties.js +2 -5
  163. package/dist/core/api/v3/parser/getModels.d.ts.map +1 -1
  164. package/dist/core/api/v3/parser/getModels.js +2 -1
  165. package/dist/core/api/v3/parser/getOperationResponse.d.ts.map +1 -1
  166. package/dist/core/api/v3/parser/getOperationResponse.js +2 -5
  167. package/dist/core/api/v3/parser/getOperationResponses.d.ts.map +1 -1
  168. package/dist/core/api/v3/parser/getOperationResponses.js +2 -5
  169. package/dist/core/api/v3/parser/getServer.d.ts.map +1 -1
  170. package/dist/core/api/v3/parser/getServer.js +2 -5
  171. package/dist/core/api/v3/parser/getServices.d.ts.map +1 -1
  172. package/dist/core/api/v3/parser/getServices.js +2 -5
  173. package/dist/core/api/v3/parser/getType.d.ts.map +1 -1
  174. package/dist/core/api/v3/parser/getType.js +5 -13
  175. package/dist/core/index.d.ts +4 -0
  176. package/dist/core/index.d.ts.map +1 -1
  177. package/dist/core/index.js +34 -27
  178. package/dist/core/types/Consts.d.ts +5 -1
  179. package/dist/core/types/Consts.d.ts.map +1 -1
  180. package/dist/core/types/Consts.js +6 -2
  181. package/dist/core/types/base/Root.model.d.ts +1 -0
  182. package/dist/core/types/base/Root.model.d.ts.map +1 -1
  183. package/dist/core/utils/__tests__/escapeDescription.test.js +3 -3
  184. package/dist/core/utils/__tests__/escapeName.test.js +2 -2
  185. package/dist/core/utils/__tests__/flatMap.test.js +2 -2
  186. package/dist/core/utils/__tests__/getAbsolutePath.test.js +6 -6
  187. package/dist/core/utils/__tests__/getClassName.test.js +2 -2
  188. package/dist/core/utils/__tests__/getComment.test.js +2 -2
  189. package/dist/core/utils/__tests__/getEnumFromDescription.test.js +2 -2
  190. package/dist/core/utils/__tests__/getFileName.test.js +2 -2
  191. package/dist/core/utils/__tests__/getGatheringRefs.test.js +2 -2
  192. package/dist/core/utils/__tests__/getMappedType.test.js +2 -2
  193. package/dist/core/utils/__tests__/getModelNames.test.js +2 -2
  194. package/dist/core/utils/__tests__/getOpenApiVersion.test.js +2 -2
  195. package/dist/core/utils/__tests__/getOperationName.test.js +2 -2
  196. package/dist/core/utils/__tests__/getOperationParameterName.test.js +2 -2
  197. package/dist/core/utils/__tests__/getOperationPath.test.js +2 -2
  198. package/dist/core/utils/__tests__/getOperationResponseCode.test.js +2 -2
  199. package/dist/core/utils/__tests__/getPattern.test.js +2 -2
  200. package/dist/core/utils/__tests__/getRefFromSchema.test.js +2 -2
  201. package/dist/core/utils/__tests__/getRefs.test.js +2 -2
  202. package/dist/core/utils/__tests__/getRelativeModelPath.test.js +3 -3
  203. package/dist/core/utils/__tests__/getServiceClassName.test.js +2 -2
  204. package/dist/core/utils/__tests__/getServiceNames.test.js +2 -2
  205. package/dist/core/utils/__tests__/getServiceVersion.test.js +2 -2
  206. package/dist/core/utils/__tests__/isString.test.js +2 -2
  207. package/dist/core/utils/__tests__/isSubdirectory.test.js +10 -10
  208. package/dist/core/utils/__tests__/registerHandlebarHelpers.test.js +2 -2
  209. package/dist/core/utils/__tests__/registerHandlebarTemplates.test.js +2 -2
  210. package/dist/core/utils/__tests__/replaceString.test.js +2 -2
  211. package/dist/core/utils/__tests__/resolveRefToImportPath.test.js +360 -51
  212. package/dist/core/utils/__tests__/sort.test.js +2 -2
  213. package/dist/core/utils/__tests__/sortByRequiredExtended.test.js +11 -11
  214. package/dist/core/utils/__tests__/sortByRequiredSimple.test.js +11 -11
  215. package/dist/core/utils/__tests__/sortModelsByName.test.js +2 -2
  216. package/dist/core/utils/__tests__/sortServicesByName.test.js +2 -2
  217. package/dist/core/utils/__tests__/stripNamespace.test.js +2 -2
  218. package/dist/core/utils/__tests__/unique.test.js +2 -2
  219. package/dist/core/utils/__tests__/writeClientCore.test.js +52 -50
  220. package/dist/core/utils/__tests__/writeClientFullIndex.test.js +39 -37
  221. package/dist/core/utils/__tests__/writeClientModels.test.js +65 -63
  222. package/dist/core/utils/__tests__/writeClientSchemas.test.js +65 -63
  223. package/dist/core/utils/__tests__/writeClientServices.test.js +60 -58
  224. package/dist/core/utils/appendUniqueLinesToFile.js +4 -4
  225. package/dist/core/utils/createNormalizedRef.js +2 -2
  226. package/dist/core/utils/getAbsolutePath.js +3 -3
  227. package/dist/core/utils/getModelNameWithPrefix.d.ts +3 -0
  228. package/dist/core/utils/getModelNameWithPrefix.d.ts.map +1 -0
  229. package/dist/core/utils/getModelNameWithPrefix.js +15 -0
  230. package/dist/core/utils/getOpenApiSpec.d.ts.map +1 -1
  231. package/dist/core/utils/getOpenApiSpec.js +4 -4
  232. package/dist/core/utils/getOutputPaths.d.ts.map +1 -1
  233. package/dist/core/utils/getOutputPaths.js +6 -6
  234. package/dist/core/utils/getPattern.d.ts.map +1 -1
  235. package/dist/core/utils/getPattern.js +2 -1
  236. package/dist/core/utils/getRelativeModelPath.d.ts.map +1 -1
  237. package/dist/core/utils/getRelativeModelPath.js +2 -6
  238. package/dist/core/utils/isSubdirectory.d.ts.map +1 -1
  239. package/dist/core/utils/isSubdirectory.js +4 -3
  240. package/dist/core/utils/mapPathToTargetDirSafe.d.ts.map +1 -1
  241. package/dist/core/utils/mapPathToTargetDirSafe.js +11 -12
  242. package/dist/core/utils/modelHelpers.d.ts.map +1 -1
  243. package/dist/core/utils/modelHelpers.js +18 -6
  244. package/dist/core/utils/normalizeString.d.ts +2 -0
  245. package/dist/core/utils/normalizeString.d.ts.map +1 -0
  246. package/dist/core/utils/normalizeString.js +14 -0
  247. package/dist/core/utils/normalizedAbsolutePath.js +3 -3
  248. package/dist/core/utils/parseRef.d.ts.map +1 -1
  249. package/dist/core/utils/parseRef.js +7 -10
  250. package/dist/core/utils/precompileTemplates.js +14 -10
  251. package/dist/core/utils/registerHandlebarHelpers.d.ts.map +1 -1
  252. package/dist/core/utils/registerHandlebarHelpers.js +24 -0
  253. package/dist/core/utils/registerHandlebarTemplates.js +82 -82
  254. package/dist/core/utils/replaceString.d.ts.map +1 -1
  255. package/dist/core/utils/replaceString.js +2 -1
  256. package/dist/core/utils/resolveRefPath.d.ts.map +1 -1
  257. package/dist/core/utils/resolveRefPath.js +3 -3
  258. package/dist/core/utils/resolveRefToImportPath.d.ts +8 -2
  259. package/dist/core/utils/resolveRefToImportPath.d.ts.map +1 -1
  260. package/dist/core/utils/resolveRefToImportPath.js +91 -31
  261. package/dist/core/utils/serviceHelpers.d.ts.map +1 -1
  262. package/dist/core/utils/serviceHelpers.js +2 -1
  263. package/dist/core/utils/stripNamespace.js +5 -5
  264. package/dist/core/utils/writeClientCore.d.ts.map +1 -1
  265. package/dist/core/utils/writeClientCore.js +12 -12
  266. package/dist/core/utils/writeClientCoreIndex.d.ts.map +1 -1
  267. package/dist/core/utils/writeClientCoreIndex.js +2 -2
  268. package/dist/core/utils/writeClientFullIndex.d.ts.map +1 -1
  269. package/dist/core/utils/writeClientFullIndex.js +4 -4
  270. package/dist/core/utils/writeClientModels.d.ts.map +1 -1
  271. package/dist/core/utils/writeClientModels.js +7 -7
  272. package/dist/core/utils/writeClientModelsIndex.d.ts.map +1 -1
  273. package/dist/core/utils/writeClientModelsIndex.js +2 -2
  274. package/dist/core/utils/writeClientSchemas.d.ts.map +1 -1
  275. package/dist/core/utils/writeClientSchemas.js +7 -7
  276. package/dist/core/utils/writeClientSchemasIndex.d.ts.map +1 -1
  277. package/dist/core/utils/writeClientSchemasIndex.js +2 -2
  278. package/dist/core/utils/writeClientServices.d.ts.map +1 -1
  279. package/dist/core/utils/writeClientServices.js +5 -5
  280. package/dist/core/utils/writeClientServicesIndex.d.ts.map +1 -1
  281. package/dist/core/utils/writeClientServicesIndex.js +2 -2
  282. package/dist/core/utils/writeClientSimpleIndex.d.ts.map +1 -1
  283. package/dist/core/utils/writeClientSimpleIndex.js +4 -4
  284. package/dist/templatesCompiled/cli/openApiConfig.d.ts +9 -0
  285. package/dist/templatesCompiled/cli/openApiConfig.d.ts.map +1 -0
  286. package/dist/templatesCompiled/cli/openApiConfig.js +21 -0
  287. package/dist/templatesCompiled/client/core/ApiError.d.ts.map +1 -0
  288. package/dist/templatesCompiled/client/core/ApiRequestOptions.d.ts.map +1 -0
  289. package/dist/templatesCompiled/client/core/ApiResult.d.ts.map +1 -0
  290. package/dist/templatesCompiled/client/core/CancelablePromise.d.ts.map +1 -0
  291. package/dist/templatesCompiled/client/core/HttpStatusCode.d.ts.map +1 -0
  292. package/dist/templatesCompiled/client/core/OpenAPI.d.ts.map +1 -0
  293. package/dist/templatesCompiled/client/core/axios/getHeaders.d.ts.map +1 -0
  294. package/dist/templatesCompiled/client/core/axios/getRequestBody.d.ts.map +1 -0
  295. package/dist/templatesCompiled/client/core/axios/getResponseBody.d.ts.map +1 -0
  296. package/dist/templatesCompiled/client/core/axios/getResponseHeader.d.ts.map +1 -0
  297. package/dist/templatesCompiled/client/core/axios/request.d.ts.map +1 -0
  298. package/dist/templatesCompiled/client/core/axios/sendRequest.d.ts.map +1 -0
  299. package/dist/templatesCompiled/client/core/fetch/getHeaders.d.ts.map +1 -0
  300. package/dist/templatesCompiled/client/core/fetch/getRequestBody.d.ts.map +1 -0
  301. package/dist/templatesCompiled/client/core/fetch/getResponseBody.d.ts.map +1 -0
  302. package/dist/templatesCompiled/client/core/fetch/getResponseHeader.d.ts.map +1 -0
  303. package/dist/templatesCompiled/client/core/fetch/request.d.ts.map +1 -0
  304. package/dist/templatesCompiled/client/core/fetch/sendRequest.d.ts.map +1 -0
  305. package/dist/templatesCompiled/client/core/functions/catchErrors.d.ts.map +1 -0
  306. package/dist/templatesCompiled/client/core/functions/getFormData.d.ts.map +1 -0
  307. package/dist/templatesCompiled/client/core/functions/getQueryString.d.ts.map +1 -0
  308. package/dist/templatesCompiled/client/core/functions/getUrl.d.ts.map +1 -0
  309. package/dist/templatesCompiled/client/core/functions/isBinary.d.ts.map +1 -0
  310. package/dist/templatesCompiled/client/core/functions/isBlob.d.ts.map +1 -0
  311. package/dist/templatesCompiled/client/core/functions/isDefined.d.ts.map +1 -0
  312. package/dist/templatesCompiled/client/core/functions/isString.d.ts.map +1 -0
  313. package/dist/templatesCompiled/client/core/functions/isStringWithValue.d.ts.map +1 -0
  314. package/dist/templatesCompiled/client/core/functions/isSuccess.d.ts.map +1 -0
  315. package/dist/templatesCompiled/client/core/functions/resolve.d.ts.map +1 -0
  316. package/dist/templatesCompiled/client/core/node/getHeaders.d.ts.map +1 -0
  317. package/dist/templatesCompiled/client/core/node/getRequestBody.d.ts.map +1 -0
  318. package/dist/templatesCompiled/client/core/node/getResponseBody.d.ts.map +1 -0
  319. package/dist/templatesCompiled/client/core/node/getResponseHeader.d.ts.map +1 -0
  320. package/dist/templatesCompiled/client/core/node/request.d.ts.map +1 -0
  321. package/dist/templatesCompiled/client/core/node/sendRequest.d.ts.map +1 -0
  322. package/dist/templatesCompiled/client/core/request.d.ts.map +1 -0
  323. package/dist/templatesCompiled/client/core/xhr/getHeaders.d.ts.map +1 -0
  324. package/dist/templatesCompiled/client/core/xhr/getRequestBody.d.ts.map +1 -0
  325. package/dist/templatesCompiled/client/core/xhr/getResponseBody.d.ts.map +1 -0
  326. package/dist/templatesCompiled/client/core/xhr/getResponseHeader.d.ts.map +1 -0
  327. package/dist/templatesCompiled/client/core/xhr/request.d.ts.map +1 -0
  328. package/dist/templatesCompiled/client/core/xhr/sendRequest.d.ts.map +1 -0
  329. package/dist/templatesCompiled/client/exportModel.d.ts.map +1 -0
  330. package/dist/templatesCompiled/{exportModel.js → client/exportModel.js} +4 -4
  331. package/dist/templatesCompiled/client/exportSchema.d.ts.map +1 -0
  332. package/dist/templatesCompiled/client/exportService.d.ts.map +1 -0
  333. package/dist/templatesCompiled/{exportService.js → client/exportService.js} +12 -13
  334. package/dist/templatesCompiled/client/indexCore.d.ts.map +1 -0
  335. package/dist/templatesCompiled/client/indexFull.d.ts.map +1 -0
  336. package/dist/templatesCompiled/{indexFull.js → client/indexFull.js} +35 -29
  337. package/dist/templatesCompiled/client/indexModels.d.ts.map +1 -0
  338. package/dist/templatesCompiled/client/indexServices.d.ts.map +1 -0
  339. package/dist/templatesCompiled/client/indexShemas.d.ts.map +1 -0
  340. package/dist/templatesCompiled/client/indexSimple.d.ts.map +1 -0
  341. package/dist/templatesCompiled/client/partials/base.d.ts.map +1 -0
  342. package/dist/templatesCompiled/client/partials/exportComposition.d.ts.map +1 -0
  343. package/dist/templatesCompiled/client/partials/exportEnum.d.ts.map +1 -0
  344. package/dist/templatesCompiled/client/partials/exportInterface.d.ts.map +1 -0
  345. package/dist/templatesCompiled/client/partials/exportType.d.ts.map +1 -0
  346. package/dist/templatesCompiled/client/partials/header.d.ts.map +1 -0
  347. package/dist/templatesCompiled/client/partials/isNullable.d.ts.map +1 -0
  348. package/dist/templatesCompiled/client/partials/isReadOnly.d.ts.map +1 -0
  349. package/dist/templatesCompiled/client/partials/isRequired.d.ts.map +1 -0
  350. package/dist/templatesCompiled/client/partials/isRequiredDefinition.d.ts.map +1 -0
  351. package/dist/templatesCompiled/client/partials/parameterValues.d.ts.map +1 -0
  352. package/dist/templatesCompiled/client/partials/parameters.d.ts +17 -0
  353. package/dist/templatesCompiled/client/partials/parameters.d.ts.map +1 -0
  354. package/dist/templatesCompiled/client/partials/parameters.js +96 -0
  355. package/dist/templatesCompiled/{partials/parameters.d.ts → client/partials/parametersDefinition.d.ts} +2 -3
  356. package/dist/templatesCompiled/client/partials/parametersDefinition.d.ts.map +1 -0
  357. package/dist/templatesCompiled/{partials/parameters.js → client/partials/parametersDefinition.js} +15 -23
  358. package/dist/templatesCompiled/client/partials/result.d.ts.map +1 -0
  359. package/dist/templatesCompiled/client/partials/schema.d.ts.map +1 -0
  360. package/dist/templatesCompiled/client/partials/schemaArray.d.ts.map +1 -0
  361. package/dist/templatesCompiled/client/partials/schemaComposition.d.ts.map +1 -0
  362. package/dist/templatesCompiled/client/partials/schemaDictionary.d.ts.map +1 -0
  363. package/dist/templatesCompiled/client/partials/schemaEnum.d.ts.map +1 -0
  364. package/dist/templatesCompiled/client/partials/schemaGeneric.d.ts.map +1 -0
  365. package/dist/templatesCompiled/client/partials/schemaInterface.d.ts.map +1 -0
  366. package/dist/templatesCompiled/client/partials/serviceOption.d.ts.map +1 -0
  367. package/dist/templatesCompiled/client/partials/type.d.ts.map +1 -0
  368. package/dist/templatesCompiled/client/partials/typeArray.d.ts.map +1 -0
  369. package/dist/templatesCompiled/client/partials/typeDictionary.d.ts.map +1 -0
  370. package/dist/templatesCompiled/client/partials/typeEnum.d.ts.map +1 -0
  371. package/dist/templatesCompiled/client/partials/typeGeneric.d.ts.map +1 -0
  372. package/dist/templatesCompiled/client/partials/typeInterface.d.ts.map +1 -0
  373. package/dist/templatesCompiled/client/partials/typeIntersection.d.ts.map +1 -0
  374. package/dist/templatesCompiled/client/partials/typeReference.d.ts.map +1 -0
  375. package/dist/templatesCompiled/client/partials/typeUnion.d.ts.map +1 -0
  376. package/package.json +15 -13
  377. package/dist/cli/chekOpenApiConfig/chekOpenApiConfig.d.ts +0 -5
  378. package/dist/cli/chekOpenApiConfig/chekOpenApiConfig.d.ts.map +0 -1
  379. package/dist/cli/chekOpenApiConfig/chekOpenApiConfig.js +0 -40
  380. package/dist/common/Utils.d.ts +0 -3
  381. package/dist/common/Utils.d.ts.map +0 -1
  382. package/dist/common/__tests__/__mock__/mockJoiSchema.d.ts.map +0 -1
  383. package/dist/common/__tests__/convertArrayToObject.test.d.ts.map +0 -1
  384. package/dist/common/__tests__/determineBestMatchingSchemaVersion.test.d.ts.map +0 -1
  385. package/dist/common/__tests__/generateKeyMappingForInvalidKeys.test.d.ts.map +0 -1
  386. package/dist/common/__tests__/getUniqueKeysFromSchemas.test.d.ts.map +0 -1
  387. package/dist/common/__tests__/getUniqueObjectKeys.test.d.ts.map +0 -1
  388. package/dist/common/__tests__/mergeObjectSchemas.test.d.ts.map +0 -1
  389. package/dist/common/__tests__/migrationForMultiOptions.test.d.ts.map +0 -1
  390. package/dist/common/__tests__/migrationForOptions.test.d.ts.map +0 -1
  391. package/dist/common/__tests__/replaceInvalidKeysWithMappedNames.test.d.ts.map +0 -1
  392. package/dist/common/__tests__/validateAndSuggestKeyCorrections.test.d.ts.map +0 -1
  393. package/dist/core/utils/__tests__/getRelativeModelImportPath.test.d.ts +0 -2
  394. package/dist/core/utils/__tests__/getRelativeModelImportPath.test.d.ts.map +0 -1
  395. package/dist/core/utils/__tests__/getRelativeModelImportPath.test.js +0 -82
  396. package/dist/core/utils/__tests__/pathHelpers.test.d.ts.map +0 -1
  397. package/dist/core/utils/fileSystem.d.ts.map +0 -1
  398. package/dist/core/utils/fileSystem.js +0 -26
  399. package/dist/core/utils/format.d.ts +0 -2
  400. package/dist/core/utils/format.d.ts.map +0 -1
  401. package/dist/core/utils/getRelativeModelImportPath.d.ts +0 -9
  402. package/dist/core/utils/getRelativeModelImportPath.d.ts.map +0 -1
  403. package/dist/core/utils/getRelativeModelImportPath.js +0 -45
  404. package/dist/core/utils/isDirectory.d.ts +0 -2
  405. package/dist/core/utils/isDirectory.d.ts.map +0 -1
  406. package/dist/core/utils/isDirectory.js +0 -13
  407. package/dist/core/utils/pathHelpers.d.ts +0 -7
  408. package/dist/core/utils/pathHelpers.d.ts.map +0 -1
  409. package/dist/templatesCompiled/core/ApiError.d.ts.map +0 -1
  410. package/dist/templatesCompiled/core/ApiRequestOptions.d.ts.map +0 -1
  411. package/dist/templatesCompiled/core/ApiResult.d.ts.map +0 -1
  412. package/dist/templatesCompiled/core/CancelablePromise.d.ts.map +0 -1
  413. package/dist/templatesCompiled/core/HttpStatusCode.d.ts.map +0 -1
  414. package/dist/templatesCompiled/core/OpenAPI.d.ts.map +0 -1
  415. package/dist/templatesCompiled/core/axios/getHeaders.d.ts.map +0 -1
  416. package/dist/templatesCompiled/core/axios/getRequestBody.d.ts.map +0 -1
  417. package/dist/templatesCompiled/core/axios/getResponseBody.d.ts.map +0 -1
  418. package/dist/templatesCompiled/core/axios/getResponseHeader.d.ts.map +0 -1
  419. package/dist/templatesCompiled/core/axios/request.d.ts.map +0 -1
  420. package/dist/templatesCompiled/core/axios/sendRequest.d.ts.map +0 -1
  421. package/dist/templatesCompiled/core/fetch/getHeaders.d.ts.map +0 -1
  422. package/dist/templatesCompiled/core/fetch/getRequestBody.d.ts.map +0 -1
  423. package/dist/templatesCompiled/core/fetch/getResponseBody.d.ts.map +0 -1
  424. package/dist/templatesCompiled/core/fetch/getResponseHeader.d.ts.map +0 -1
  425. package/dist/templatesCompiled/core/fetch/request.d.ts.map +0 -1
  426. package/dist/templatesCompiled/core/fetch/sendRequest.d.ts.map +0 -1
  427. package/dist/templatesCompiled/core/functions/catchErrors.d.ts.map +0 -1
  428. package/dist/templatesCompiled/core/functions/getFormData.d.ts.map +0 -1
  429. package/dist/templatesCompiled/core/functions/getQueryString.d.ts.map +0 -1
  430. package/dist/templatesCompiled/core/functions/getUrl.d.ts.map +0 -1
  431. package/dist/templatesCompiled/core/functions/isBinary.d.ts.map +0 -1
  432. package/dist/templatesCompiled/core/functions/isBlob.d.ts.map +0 -1
  433. package/dist/templatesCompiled/core/functions/isDefined.d.ts.map +0 -1
  434. package/dist/templatesCompiled/core/functions/isString.d.ts.map +0 -1
  435. package/dist/templatesCompiled/core/functions/isStringWithValue.d.ts.map +0 -1
  436. package/dist/templatesCompiled/core/functions/isSuccess.d.ts.map +0 -1
  437. package/dist/templatesCompiled/core/functions/resolve.d.ts.map +0 -1
  438. package/dist/templatesCompiled/core/node/getHeaders.d.ts.map +0 -1
  439. package/dist/templatesCompiled/core/node/getRequestBody.d.ts.map +0 -1
  440. package/dist/templatesCompiled/core/node/getResponseBody.d.ts.map +0 -1
  441. package/dist/templatesCompiled/core/node/getResponseHeader.d.ts.map +0 -1
  442. package/dist/templatesCompiled/core/node/request.d.ts.map +0 -1
  443. package/dist/templatesCompiled/core/node/sendRequest.d.ts.map +0 -1
  444. package/dist/templatesCompiled/core/request.d.ts.map +0 -1
  445. package/dist/templatesCompiled/core/xhr/getHeaders.d.ts.map +0 -1
  446. package/dist/templatesCompiled/core/xhr/getRequestBody.d.ts.map +0 -1
  447. package/dist/templatesCompiled/core/xhr/getResponseBody.d.ts.map +0 -1
  448. package/dist/templatesCompiled/core/xhr/getResponseHeader.d.ts.map +0 -1
  449. package/dist/templatesCompiled/core/xhr/request.d.ts.map +0 -1
  450. package/dist/templatesCompiled/core/xhr/sendRequest.d.ts.map +0 -1
  451. package/dist/templatesCompiled/exportModel.d.ts.map +0 -1
  452. package/dist/templatesCompiled/exportSchema.d.ts.map +0 -1
  453. package/dist/templatesCompiled/exportService.d.ts.map +0 -1
  454. package/dist/templatesCompiled/indexCore.d.ts.map +0 -1
  455. package/dist/templatesCompiled/indexFull.d.ts.map +0 -1
  456. package/dist/templatesCompiled/indexModels.d.ts.map +0 -1
  457. package/dist/templatesCompiled/indexServices.d.ts.map +0 -1
  458. package/dist/templatesCompiled/indexShemas.d.ts.map +0 -1
  459. package/dist/templatesCompiled/indexSimple.d.ts.map +0 -1
  460. package/dist/templatesCompiled/partials/base.d.ts.map +0 -1
  461. package/dist/templatesCompiled/partials/exportComposition.d.ts.map +0 -1
  462. package/dist/templatesCompiled/partials/exportEnum.d.ts.map +0 -1
  463. package/dist/templatesCompiled/partials/exportInterface.d.ts.map +0 -1
  464. package/dist/templatesCompiled/partials/exportType.d.ts.map +0 -1
  465. package/dist/templatesCompiled/partials/header.d.ts.map +0 -1
  466. package/dist/templatesCompiled/partials/isNullable.d.ts.map +0 -1
  467. package/dist/templatesCompiled/partials/isReadOnly.d.ts.map +0 -1
  468. package/dist/templatesCompiled/partials/isRequired.d.ts.map +0 -1
  469. package/dist/templatesCompiled/partials/isRequiredDefinition.d.ts.map +0 -1
  470. package/dist/templatesCompiled/partials/parameterValues.d.ts.map +0 -1
  471. package/dist/templatesCompiled/partials/parameters.d.ts.map +0 -1
  472. package/dist/templatesCompiled/partials/parametersDefinition.d.ts +0 -13
  473. package/dist/templatesCompiled/partials/parametersDefinition.d.ts.map +0 -1
  474. package/dist/templatesCompiled/partials/parametersDefinition.js +0 -62
  475. package/dist/templatesCompiled/partials/result.d.ts.map +0 -1
  476. package/dist/templatesCompiled/partials/schema.d.ts.map +0 -1
  477. package/dist/templatesCompiled/partials/schemaArray.d.ts.map +0 -1
  478. package/dist/templatesCompiled/partials/schemaComposition.d.ts.map +0 -1
  479. package/dist/templatesCompiled/partials/schemaDictionary.d.ts.map +0 -1
  480. package/dist/templatesCompiled/partials/schemaEnum.d.ts.map +0 -1
  481. package/dist/templatesCompiled/partials/schemaGeneric.d.ts.map +0 -1
  482. package/dist/templatesCompiled/partials/schemaInterface.d.ts.map +0 -1
  483. package/dist/templatesCompiled/partials/serviceOption.d.ts.map +0 -1
  484. package/dist/templatesCompiled/partials/type.d.ts.map +0 -1
  485. package/dist/templatesCompiled/partials/typeArray.d.ts.map +0 -1
  486. package/dist/templatesCompiled/partials/typeDictionary.d.ts.map +0 -1
  487. package/dist/templatesCompiled/partials/typeEnum.d.ts.map +0 -1
  488. package/dist/templatesCompiled/partials/typeGeneric.d.ts.map +0 -1
  489. package/dist/templatesCompiled/partials/typeInterface.d.ts.map +0 -1
  490. package/dist/templatesCompiled/partials/typeIntersection.d.ts.map +0 -1
  491. package/dist/templatesCompiled/partials/typeReference.d.ts.map +0 -1
  492. package/dist/templatesCompiled/partials/typeUnion.d.ts.map +0 -1
  493. /package/dist/common/{__tests__ → utils/__tests__}/__mock__/mockJoiSchema.d.ts +0 -0
  494. /package/dist/common/{__tests__ → utils/__tests__}/__mock__/mockJoiSchema.js +0 -0
  495. /package/dist/common/{__tests__ → utils/__tests__}/convertArrayToObject.test.d.ts +0 -0
  496. /package/dist/common/{__tests__ → utils/__tests__}/determineBestMatchingSchemaVersion.test.d.ts +0 -0
  497. /package/dist/common/{__tests__ → utils/__tests__}/generateKeyMappingForInvalidKeys.test.d.ts +0 -0
  498. /package/dist/common/{__tests__ → utils/__tests__}/getUniqueKeysFromSchemas.test.d.ts +0 -0
  499. /package/dist/common/{__tests__ → utils/__tests__}/getUniqueObjectKeys.test.d.ts +0 -0
  500. /package/dist/common/{__tests__ → utils/__tests__}/mergeObjectSchemas.test.d.ts +0 -0
  501. /package/dist/common/{__tests__ → utils/__tests__}/migrationForMultiOptions.test.d.ts +0 -0
  502. /package/dist/common/{__tests__ → utils/__tests__}/migrationForOptions.test.d.ts +0 -0
  503. /package/dist/{core → common}/utils/__tests__/pathHelpers.test.d.ts +0 -0
  504. /package/dist/common/{__tests__ → utils/__tests__}/replaceInvalidKeysWithMappedNames.test.d.ts +0 -0
  505. /package/dist/common/{__tests__ → utils/__tests__}/validateAndSuggestKeyCorrections.test.d.ts +0 -0
  506. /package/dist/templatesCompiled/{core → client/core}/ApiError.d.ts +0 -0
  507. /package/dist/templatesCompiled/{core → client/core}/ApiError.js +0 -0
  508. /package/dist/templatesCompiled/{core → client/core}/ApiRequestOptions.d.ts +0 -0
  509. /package/dist/templatesCompiled/{core → client/core}/ApiRequestOptions.js +0 -0
  510. /package/dist/templatesCompiled/{core → client/core}/ApiResult.d.ts +0 -0
  511. /package/dist/templatesCompiled/{core → client/core}/ApiResult.js +0 -0
  512. /package/dist/templatesCompiled/{core → client/core}/CancelablePromise.d.ts +0 -0
  513. /package/dist/templatesCompiled/{core → client/core}/CancelablePromise.js +0 -0
  514. /package/dist/templatesCompiled/{core → client/core}/HttpStatusCode.d.ts +0 -0
  515. /package/dist/templatesCompiled/{core → client/core}/HttpStatusCode.js +0 -0
  516. /package/dist/templatesCompiled/{core → client/core}/OpenAPI.d.ts +0 -0
  517. /package/dist/templatesCompiled/{core → client/core}/OpenAPI.js +0 -0
  518. /package/dist/templatesCompiled/{core → client/core}/axios/getHeaders.d.ts +0 -0
  519. /package/dist/templatesCompiled/{core → client/core}/axios/getHeaders.js +0 -0
  520. /package/dist/templatesCompiled/{core → client/core}/axios/getRequestBody.d.ts +0 -0
  521. /package/dist/templatesCompiled/{core → client/core}/axios/getRequestBody.js +0 -0
  522. /package/dist/templatesCompiled/{core → client/core}/axios/getResponseBody.d.ts +0 -0
  523. /package/dist/templatesCompiled/{core → client/core}/axios/getResponseBody.js +0 -0
  524. /package/dist/templatesCompiled/{core → client/core}/axios/getResponseHeader.d.ts +0 -0
  525. /package/dist/templatesCompiled/{core → client/core}/axios/getResponseHeader.js +0 -0
  526. /package/dist/templatesCompiled/{core → client/core}/axios/request.d.ts +0 -0
  527. /package/dist/templatesCompiled/{core → client/core}/axios/request.js +0 -0
  528. /package/dist/templatesCompiled/{core → client/core}/axios/sendRequest.d.ts +0 -0
  529. /package/dist/templatesCompiled/{core → client/core}/axios/sendRequest.js +0 -0
  530. /package/dist/templatesCompiled/{core → client/core}/fetch/getHeaders.d.ts +0 -0
  531. /package/dist/templatesCompiled/{core → client/core}/fetch/getHeaders.js +0 -0
  532. /package/dist/templatesCompiled/{core → client/core}/fetch/getRequestBody.d.ts +0 -0
  533. /package/dist/templatesCompiled/{core → client/core}/fetch/getRequestBody.js +0 -0
  534. /package/dist/templatesCompiled/{core → client/core}/fetch/getResponseBody.d.ts +0 -0
  535. /package/dist/templatesCompiled/{core → client/core}/fetch/getResponseBody.js +0 -0
  536. /package/dist/templatesCompiled/{core → client/core}/fetch/getResponseHeader.d.ts +0 -0
  537. /package/dist/templatesCompiled/{core → client/core}/fetch/getResponseHeader.js +0 -0
  538. /package/dist/templatesCompiled/{core → client/core}/fetch/request.d.ts +0 -0
  539. /package/dist/templatesCompiled/{core → client/core}/fetch/request.js +0 -0
  540. /package/dist/templatesCompiled/{core → client/core}/fetch/sendRequest.d.ts +0 -0
  541. /package/dist/templatesCompiled/{core → client/core}/fetch/sendRequest.js +0 -0
  542. /package/dist/templatesCompiled/{core → client/core}/functions/catchErrors.d.ts +0 -0
  543. /package/dist/templatesCompiled/{core → client/core}/functions/catchErrors.js +0 -0
  544. /package/dist/templatesCompiled/{core → client/core}/functions/getFormData.d.ts +0 -0
  545. /package/dist/templatesCompiled/{core → client/core}/functions/getFormData.js +0 -0
  546. /package/dist/templatesCompiled/{core → client/core}/functions/getQueryString.d.ts +0 -0
  547. /package/dist/templatesCompiled/{core → client/core}/functions/getQueryString.js +0 -0
  548. /package/dist/templatesCompiled/{core → client/core}/functions/getUrl.d.ts +0 -0
  549. /package/dist/templatesCompiled/{core → client/core}/functions/getUrl.js +0 -0
  550. /package/dist/templatesCompiled/{core → client/core}/functions/isBinary.d.ts +0 -0
  551. /package/dist/templatesCompiled/{core → client/core}/functions/isBinary.js +0 -0
  552. /package/dist/templatesCompiled/{core → client/core}/functions/isBlob.d.ts +0 -0
  553. /package/dist/templatesCompiled/{core → client/core}/functions/isBlob.js +0 -0
  554. /package/dist/templatesCompiled/{core → client/core}/functions/isDefined.d.ts +0 -0
  555. /package/dist/templatesCompiled/{core → client/core}/functions/isDefined.js +0 -0
  556. /package/dist/templatesCompiled/{core → client/core}/functions/isString.d.ts +0 -0
  557. /package/dist/templatesCompiled/{core → client/core}/functions/isString.js +0 -0
  558. /package/dist/templatesCompiled/{core → client/core}/functions/isStringWithValue.d.ts +0 -0
  559. /package/dist/templatesCompiled/{core → client/core}/functions/isStringWithValue.js +0 -0
  560. /package/dist/templatesCompiled/{core → client/core}/functions/isSuccess.d.ts +0 -0
  561. /package/dist/templatesCompiled/{core → client/core}/functions/isSuccess.js +0 -0
  562. /package/dist/templatesCompiled/{core → client/core}/functions/resolve.d.ts +0 -0
  563. /package/dist/templatesCompiled/{core → client/core}/functions/resolve.js +0 -0
  564. /package/dist/templatesCompiled/{core → client/core}/node/getHeaders.d.ts +0 -0
  565. /package/dist/templatesCompiled/{core → client/core}/node/getHeaders.js +0 -0
  566. /package/dist/templatesCompiled/{core → client/core}/node/getRequestBody.d.ts +0 -0
  567. /package/dist/templatesCompiled/{core → client/core}/node/getRequestBody.js +0 -0
  568. /package/dist/templatesCompiled/{core → client/core}/node/getResponseBody.d.ts +0 -0
  569. /package/dist/templatesCompiled/{core → client/core}/node/getResponseBody.js +0 -0
  570. /package/dist/templatesCompiled/{core → client/core}/node/getResponseHeader.d.ts +0 -0
  571. /package/dist/templatesCompiled/{core → client/core}/node/getResponseHeader.js +0 -0
  572. /package/dist/templatesCompiled/{core → client/core}/node/request.d.ts +0 -0
  573. /package/dist/templatesCompiled/{core → client/core}/node/request.js +0 -0
  574. /package/dist/templatesCompiled/{core → client/core}/node/sendRequest.d.ts +0 -0
  575. /package/dist/templatesCompiled/{core → client/core}/node/sendRequest.js +0 -0
  576. /package/dist/templatesCompiled/{core → client/core}/request.d.ts +0 -0
  577. /package/dist/templatesCompiled/{core → client/core}/request.js +0 -0
  578. /package/dist/templatesCompiled/{core → client/core}/xhr/getHeaders.d.ts +0 -0
  579. /package/dist/templatesCompiled/{core → client/core}/xhr/getHeaders.js +0 -0
  580. /package/dist/templatesCompiled/{core → client/core}/xhr/getRequestBody.d.ts +0 -0
  581. /package/dist/templatesCompiled/{core → client/core}/xhr/getRequestBody.js +0 -0
  582. /package/dist/templatesCompiled/{core → client/core}/xhr/getResponseBody.d.ts +0 -0
  583. /package/dist/templatesCompiled/{core → client/core}/xhr/getResponseBody.js +0 -0
  584. /package/dist/templatesCompiled/{core → client/core}/xhr/getResponseHeader.d.ts +0 -0
  585. /package/dist/templatesCompiled/{core → client/core}/xhr/getResponseHeader.js +0 -0
  586. /package/dist/templatesCompiled/{core → client/core}/xhr/request.d.ts +0 -0
  587. /package/dist/templatesCompiled/{core → client/core}/xhr/request.js +0 -0
  588. /package/dist/templatesCompiled/{core → client/core}/xhr/sendRequest.d.ts +0 -0
  589. /package/dist/templatesCompiled/{core → client/core}/xhr/sendRequest.js +0 -0
  590. /package/dist/templatesCompiled/{exportModel.d.ts → client/exportModel.d.ts} +0 -0
  591. /package/dist/templatesCompiled/{exportSchema.d.ts → client/exportSchema.d.ts} +0 -0
  592. /package/dist/templatesCompiled/{exportSchema.js → client/exportSchema.js} +0 -0
  593. /package/dist/templatesCompiled/{exportService.d.ts → client/exportService.d.ts} +0 -0
  594. /package/dist/templatesCompiled/{indexCore.d.ts → client/indexCore.d.ts} +0 -0
  595. /package/dist/templatesCompiled/{indexCore.js → client/indexCore.js} +0 -0
  596. /package/dist/templatesCompiled/{indexFull.d.ts → client/indexFull.d.ts} +0 -0
  597. /package/dist/templatesCompiled/{indexModels.d.ts → client/indexModels.d.ts} +0 -0
  598. /package/dist/templatesCompiled/{indexModels.js → client/indexModels.js} +0 -0
  599. /package/dist/templatesCompiled/{indexServices.d.ts → client/indexServices.d.ts} +0 -0
  600. /package/dist/templatesCompiled/{indexServices.js → client/indexServices.js} +0 -0
  601. /package/dist/templatesCompiled/{indexShemas.d.ts → client/indexShemas.d.ts} +0 -0
  602. /package/dist/templatesCompiled/{indexShemas.js → client/indexShemas.js} +0 -0
  603. /package/dist/templatesCompiled/{indexSimple.d.ts → client/indexSimple.d.ts} +0 -0
  604. /package/dist/templatesCompiled/{indexSimple.js → client/indexSimple.js} +0 -0
  605. /package/dist/templatesCompiled/{partials → client/partials}/base.d.ts +0 -0
  606. /package/dist/templatesCompiled/{partials → client/partials}/base.js +0 -0
  607. /package/dist/templatesCompiled/{partials → client/partials}/exportComposition.d.ts +0 -0
  608. /package/dist/templatesCompiled/{partials → client/partials}/exportComposition.js +0 -0
  609. /package/dist/templatesCompiled/{partials → client/partials}/exportEnum.d.ts +0 -0
  610. /package/dist/templatesCompiled/{partials → client/partials}/exportEnum.js +0 -0
  611. /package/dist/templatesCompiled/{partials → client/partials}/exportInterface.d.ts +0 -0
  612. /package/dist/templatesCompiled/{partials → client/partials}/exportInterface.js +0 -0
  613. /package/dist/templatesCompiled/{partials → client/partials}/exportType.d.ts +0 -0
  614. /package/dist/templatesCompiled/{partials → client/partials}/exportType.js +0 -0
  615. /package/dist/templatesCompiled/{partials → client/partials}/header.d.ts +0 -0
  616. /package/dist/templatesCompiled/{partials → client/partials}/header.js +0 -0
  617. /package/dist/templatesCompiled/{partials → client/partials}/isNullable.d.ts +0 -0
  618. /package/dist/templatesCompiled/{partials → client/partials}/isNullable.js +0 -0
  619. /package/dist/templatesCompiled/{partials → client/partials}/isReadOnly.d.ts +0 -0
  620. /package/dist/templatesCompiled/{partials → client/partials}/isReadOnly.js +0 -0
  621. /package/dist/templatesCompiled/{partials → client/partials}/isRequired.d.ts +0 -0
  622. /package/dist/templatesCompiled/{partials → client/partials}/isRequired.js +0 -0
  623. /package/dist/templatesCompiled/{partials → client/partials}/isRequiredDefinition.d.ts +0 -0
  624. /package/dist/templatesCompiled/{partials → client/partials}/isRequiredDefinition.js +0 -0
  625. /package/dist/templatesCompiled/{partials → client/partials}/parameterValues.d.ts +0 -0
  626. /package/dist/templatesCompiled/{partials → client/partials}/parameterValues.js +0 -0
  627. /package/dist/templatesCompiled/{partials → client/partials}/result.d.ts +0 -0
  628. /package/dist/templatesCompiled/{partials → client/partials}/result.js +0 -0
  629. /package/dist/templatesCompiled/{partials → client/partials}/schema.d.ts +0 -0
  630. /package/dist/templatesCompiled/{partials → client/partials}/schema.js +0 -0
  631. /package/dist/templatesCompiled/{partials → client/partials}/schemaArray.d.ts +0 -0
  632. /package/dist/templatesCompiled/{partials → client/partials}/schemaArray.js +0 -0
  633. /package/dist/templatesCompiled/{partials → client/partials}/schemaComposition.d.ts +0 -0
  634. /package/dist/templatesCompiled/{partials → client/partials}/schemaComposition.js +0 -0
  635. /package/dist/templatesCompiled/{partials → client/partials}/schemaDictionary.d.ts +0 -0
  636. /package/dist/templatesCompiled/{partials → client/partials}/schemaDictionary.js +0 -0
  637. /package/dist/templatesCompiled/{partials → client/partials}/schemaEnum.d.ts +0 -0
  638. /package/dist/templatesCompiled/{partials → client/partials}/schemaEnum.js +0 -0
  639. /package/dist/templatesCompiled/{partials → client/partials}/schemaGeneric.d.ts +0 -0
  640. /package/dist/templatesCompiled/{partials → client/partials}/schemaGeneric.js +0 -0
  641. /package/dist/templatesCompiled/{partials → client/partials}/schemaInterface.d.ts +0 -0
  642. /package/dist/templatesCompiled/{partials → client/partials}/schemaInterface.js +0 -0
  643. /package/dist/templatesCompiled/{partials → client/partials}/serviceOption.d.ts +0 -0
  644. /package/dist/templatesCompiled/{partials → client/partials}/serviceOption.js +0 -0
  645. /package/dist/templatesCompiled/{partials → client/partials}/type.d.ts +0 -0
  646. /package/dist/templatesCompiled/{partials → client/partials}/type.js +0 -0
  647. /package/dist/templatesCompiled/{partials → client/partials}/typeArray.d.ts +0 -0
  648. /package/dist/templatesCompiled/{partials → client/partials}/typeArray.js +0 -0
  649. /package/dist/templatesCompiled/{partials → client/partials}/typeDictionary.d.ts +0 -0
  650. /package/dist/templatesCompiled/{partials → client/partials}/typeDictionary.js +0 -0
  651. /package/dist/templatesCompiled/{partials → client/partials}/typeEnum.d.ts +0 -0
  652. /package/dist/templatesCompiled/{partials → client/partials}/typeEnum.js +0 -0
  653. /package/dist/templatesCompiled/{partials → client/partials}/typeGeneric.d.ts +0 -0
  654. /package/dist/templatesCompiled/{partials → client/partials}/typeGeneric.js +0 -0
  655. /package/dist/templatesCompiled/{partials → client/partials}/typeInterface.d.ts +0 -0
  656. /package/dist/templatesCompiled/{partials → client/partials}/typeInterface.js +0 -0
  657. /package/dist/templatesCompiled/{partials → client/partials}/typeIntersection.d.ts +0 -0
  658. /package/dist/templatesCompiled/{partials → client/partials}/typeIntersection.js +0 -0
  659. /package/dist/templatesCompiled/{partials → client/partials}/typeReference.d.ts +0 -0
  660. /package/dist/templatesCompiled/{partials → client/partials}/typeReference.js +0 -0
  661. /package/dist/templatesCompiled/{partials → client/partials}/typeUnion.d.ts +0 -0
  662. /package/dist/templatesCompiled/{partials → client/partials}/typeUnion.js +0 -0
@@ -1,13 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.appendUniqueLinesToFile = appendUniqueLinesToFile;
4
- const fileSystem_1 = require("./fileSystem");
4
+ const fileSystemHelpers_1 = require("../../common/utils/fileSystemHelpers");
5
5
  async function appendUniqueLinesToFile(filePath, data) {
6
6
  try {
7
7
  let existingContent = '';
8
- const fileExists = await fileSystem_1.fileSystem.exists(filePath);
8
+ const fileExists = await fileSystemHelpers_1.fileSystemHelpers.exists(filePath);
9
9
  if (fileExists) {
10
- existingContent = await fileSystem_1.fileSystem.readFile(filePath, "utf8");
10
+ existingContent = await fileSystemHelpers_1.fileSystemHelpers.readFile(filePath, "utf8");
11
11
  }
12
12
  const existingLines = existingContent.split(/\r?\n/).filter(Boolean);
13
13
  const dataLines = data.split(/\r?\n/).filter(Boolean);
@@ -16,7 +16,7 @@ async function appendUniqueLinesToFile(filePath, data) {
16
16
  return;
17
17
  }
18
18
  const updatedContent = existingContent + linesToAdd.join('\n') + '\n';
19
- await fileSystem_1.fileSystem.writeFile(filePath, updatedContent);
19
+ await fileSystemHelpers_1.fileSystemHelpers.writeFile(filePath, updatedContent);
20
20
  }
21
21
  catch (error) {
22
22
  throw new Error(`Error when writing to a file: ${error?.message}`);
@@ -9,11 +9,11 @@ const parseRef_1 = require("./parseRef");
9
9
  function createNormalizedRef(parsedRef, resolvedPath) {
10
10
  switch (parsedRef.type) {
11
11
  case parseRef_1.RefType.LOCAL_FRAGMENT:
12
- return `${resolvedPath}${parsedRef.fragment ?? ''}`;
12
+ return `${resolvedPath}${parsedRef.fragment}`;
13
13
  case parseRef_1.RefType.EXTERNAL_FILE:
14
14
  return resolvedPath;
15
15
  case parseRef_1.RefType.EXTERNAL_FILE_FRAGMENT:
16
- return `${resolvedPath}${parsedRef.fragment ?? ''}`;
16
+ return `${resolvedPath}${parsedRef.fragment}`;
17
17
  case parseRef_1.RefType.ABSOLUTE_PATH:
18
18
  return parsedRef.fragment ? `${resolvedPath}${parsedRef.fragment}` : resolvedPath;
19
19
  case parseRef_1.RefType.HTTP_URL:
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getAbsolutePath = getAbsolutePath;
4
- const pathHelpers_1 = require("../utils/pathHelpers");
4
+ const pathHelpers_1 = require("../../common/utils/pathHelpers");
5
5
  function getAbsolutePath(definitionRef, parentRef) {
6
6
  // If the definition Ref is missing
7
7
  if (!definitionRef) {
@@ -23,9 +23,9 @@ function getAbsolutePath(definitionRef, parentRef) {
23
23
  // If definitionRef already has its own fragment and/or relative path
24
24
  if (definitionRef.includes('#')) {
25
25
  const [defPath, defFrag] = definitionRef.split('#');
26
- const absPath = defPath ? (0, pathHelpers_1.join)((0, pathHelpers_1.dirName)(parentBase), defPath) : parentBase;
26
+ const absPath = defPath ? (0, pathHelpers_1.joinHelper)((0, pathHelpers_1.dirNameHelper)(parentBase), defPath) : parentBase;
27
27
  return defFrag ? `${absPath}#${defFrag}` : absPath;
28
28
  }
29
29
  // Plain relative path → resolve against parent base directory
30
- return (0, pathHelpers_1.join)((0, pathHelpers_1.dirName)(parentBase), definitionRef);
30
+ return (0, pathHelpers_1.joinHelper)((0, pathHelpers_1.dirNameHelper)(parentBase), definitionRef);
31
31
  }
@@ -0,0 +1,3 @@
1
+ import { PrefixArtifacts } from 'core/types/base/PrefixArtifacts.model';
2
+ export declare function getModelNameWithPrefix(originalName: string, definition: any, prefixes: PrefixArtifacts): string;
3
+ //# sourceMappingURL=getModelNameWithPrefix.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getModelNameWithPrefix.d.ts","sourceRoot":"","sources":["../../../src/core/utils/getModelNameWithPrefix.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AAExE,wBAAgB,sBAAsB,CAAC,YAAY,EAAE,MAAM,EAAE,UAAU,EAAE,GAAG,EAAE,QAAQ,EAAE,eAAe,UAUtG"}
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getModelNameWithPrefix = getModelNameWithPrefix;
4
+ function getModelNameWithPrefix(originalName, definition, prefixes) {
5
+ if (definition.enum && definition !== 'boolean') {
6
+ return `${prefixes.enum}${originalName}`;
7
+ }
8
+ else if (definition.oneOf || definition.anyOf || definition.allOf || ['string', 'number', 'integer', 'boolean', 'array'].includes(definition.type)) {
9
+ return `${prefixes.type}${originalName}`;
10
+ }
11
+ else if (definition.type === 'object') {
12
+ return `${prefixes.interface}${originalName}`;
13
+ }
14
+ return originalName;
15
+ }
@@ -1 +1 @@
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"}
1
+ {"version":3,"file":"getOpenApiSpec.d.ts","sourceRoot":"","sources":["../../../src/core/utils/getOpenApiSpec.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AAIpE;;;;;GAKG;AACH,wBAAsB,cAAc,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC,CA6B5F"}
@@ -5,8 +5,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.getOpenApiSpec = getOpenApiSpec;
7
7
  const swagger_parser_1 = __importDefault(require("@apidevtools/swagger-parser"));
8
- const pathHelpers_1 = require("../utils/pathHelpers");
9
- const fileSystem_1 = require("./fileSystem");
8
+ const fileSystemHelpers_1 = require("../../common/utils/fileSystemHelpers");
9
+ const pathHelpers_1 = require("../../common/utils/pathHelpers");
10
10
  const normalizeAllRefs_1 = require("./normalizeAllRefs");
11
11
  /**
12
12
  * Load and parse te open api spec. If the file extension is ".yml" or ".yaml"
@@ -15,11 +15,11 @@ const normalizeAllRefs_1 = require("./normalizeAllRefs");
15
15
  * @param input
16
16
  */
17
17
  async function getOpenApiSpec(context, input) {
18
- const absoluteInput = (0, pathHelpers_1.resolve)(process.cwd(), input);
18
+ const absoluteInput = (0, pathHelpers_1.resolveHelper)(process.cwd(), input);
19
19
  if (!input) {
20
20
  throw new Error(`Could not find OpenApi spec: "${absoluteInput}"`);
21
21
  }
22
- const fileExists = await fileSystem_1.fileSystem.exists(absoluteInput);
22
+ const fileExists = await fileSystemHelpers_1.fileSystemHelpers.exists(absoluteInput);
23
23
  if (!fileExists) {
24
24
  throw new Error(`Could not read OpenApi spec: "${absoluteInput}"`);
25
25
  }
@@ -1 +1 @@
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
+ {"version":3,"file":"getOutputPaths.d.ts","sourceRoot":"","sources":["../../../src/core/utils/getOutputPaths.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAG9D,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,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getOutputPaths = void 0;
4
+ const pathHelpers_1 = require("../../common/utils/pathHelpers");
4
5
  const isSubdirectory_1 = require("../utils/isSubdirectory");
5
- const pathHelpers_1 = require("./pathHelpers");
6
6
  const getOutputPaths = ({ output, outputCore, outputModels, outputSchemas, outputServices, }) => {
7
7
  const rootPath = process.cwd();
8
8
  if (!(0, isSubdirectory_1.isSubDirectory)(rootPath, output)) {
@@ -20,11 +20,11 @@ const getOutputPaths = ({ output, outputCore, outputModels, outputSchemas, outpu
20
20
  if (outputServices && !(0, isSubdirectory_1.isSubDirectory)(rootPath, outputServices)) {
21
21
  throw new Error(`Output folder(services) is not a subdirectory of the current working directory`);
22
22
  }
23
- const outputPath = (0, pathHelpers_1.resolve)(rootPath, output);
24
- const outputPathCore = outputCore ? (0, pathHelpers_1.resolve)(rootPath, outputCore) : (0, pathHelpers_1.resolve)(outputPath, 'core');
25
- const outputPathModels = outputModels ? (0, pathHelpers_1.resolve)(rootPath, outputModels) : (0, pathHelpers_1.resolve)(outputPath, 'models');
26
- const outputPathSchemas = outputSchemas ? (0, pathHelpers_1.resolve)(rootPath, outputSchemas) : (0, pathHelpers_1.resolve)(outputPath, 'schemas');
27
- const outputPathServices = outputServices ? (0, pathHelpers_1.resolve)(rootPath, outputServices) : (0, pathHelpers_1.resolve)(outputPath, 'services');
23
+ const outputPath = (0, pathHelpers_1.resolveHelper)(rootPath, output);
24
+ const outputPathCore = outputCore ? (0, pathHelpers_1.resolveHelper)(rootPath, outputCore) : (0, pathHelpers_1.resolveHelper)(outputPath, 'core');
25
+ const outputPathModels = outputModels ? (0, pathHelpers_1.resolveHelper)(rootPath, outputModels) : (0, pathHelpers_1.resolveHelper)(outputPath, 'models');
26
+ const outputPathSchemas = outputSchemas ? (0, pathHelpers_1.resolveHelper)(rootPath, outputSchemas) : (0, pathHelpers_1.resolveHelper)(outputPath, 'schemas');
27
+ const outputPathServices = outputServices ? (0, pathHelpers_1.resolveHelper)(rootPath, outputServices) : (0, pathHelpers_1.resolveHelper)(outputPath, 'services');
28
28
  return {
29
29
  output: outputPath,
30
30
  outputCore: outputPathCore,
@@ -1 +1 @@
1
- {"version":3,"file":"getPattern.d.ts","sourceRoot":"","sources":["../../../src/core/utils/getPattern.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAE/D"}
1
+ {"version":3,"file":"getPattern.d.ts","sourceRoot":"","sources":["../../../src/core/utils/getPattern.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAE/D"}
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getPattern = getPattern;
4
+ const Consts_1 = require("../types/Consts");
4
5
  /**
5
6
  * The spec generates a pattern like this '^\d{3}-\d{2}-\d{4}$'
6
7
  * However, to use it in HTML or inside new RegExp() we need to
@@ -9,5 +10,5 @@ exports.getPattern = getPattern;
9
10
  * @param pattern
10
11
  */
11
12
  function getPattern(pattern) {
12
- return pattern?.replace(/\\/g, '\\\\');
13
+ return pattern?.replace(Consts_1.REGEX_BACKSLASH, '\\\\');
13
14
  }
@@ -1 +1 @@
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
+ {"version":3,"file":"getRelativeModelPath.d.ts","sourceRoot":"","sources":["../../../src/core/utils/getRelativeModelPath.ts"],"names":[],"mappings":"AAIA;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,UAAU,EAAE,MAAM,GAAG,SAAS,EAAE,iBAAiB,EAAE,MAAM,UA2B7F"}
@@ -1,11 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getRelativeModelPath = getRelativeModelPath;
4
+ const pathHelpers_1 = require("../../common/utils/pathHelpers");
4
5
  const getTypeName_1 = require("./getTypeName");
5
6
  const isInsideDirectory_1 = require("./isInsideDirectory");
6
- const pathHelpers_1 = require("./pathHelpers");
7
- const replaceString_1 = require("./replaceString");
8
- const stripNamespace_1 = require("./stripNamespace");
9
7
  /**
10
8
  * The function calculates the relative path to the model.
11
9
  * Removes the transition to the directory with a level above.
@@ -31,11 +29,9 @@ function getRelativeModelPath(folderPath, relativeModelPath) {
31
29
  }
32
30
  modelPath = pathArray.join(pathSep);
33
31
  }
34
- const resolvedPath = (0, pathHelpers_1.resolve)(folderPath, modelPath);
32
+ const resolvedPath = (0, pathHelpers_1.resolveHelper)(folderPath, modelPath);
35
33
  if ((0, isInsideDirectory_1.isInsideDirectory)(resolvedPath, folderPath)) {
36
34
  mappedPaths = modelPath;
37
35
  }
38
- const normalizedValue = (0, replaceString_1.replaceString)(mappedPaths);
39
- mappedPaths = (0, stripNamespace_1.stripNamespace)(normalizedValue || '');
40
36
  return mappedPaths;
41
37
  }
@@ -1 +1 @@
1
- {"version":3,"file":"isSubdirectory.d.ts","sourceRoot":"","sources":["../../../src/core/utils/isSubdirectory.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,WAK3D"}
1
+ {"version":3,"file":"isSubdirectory.d.ts","sourceRoot":"","sources":["../../../src/core/utils/isSubdirectory.ts"],"names":[],"mappings":"AAKA;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,WAK3D"}
@@ -5,14 +5,15 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.isSubDirectory = isSubDirectory;
7
7
  const path_1 = __importDefault(require("path"));
8
+ const pathHelpers_1 = require("../../common/utils/pathHelpers");
8
9
  /**
9
10
  * Checks whether `child` is a subdirectory of `parent`
10
11
  * @param parent Parent directory (absolute path)
11
12
  * @param child Child directory (absolute or relative path)
12
13
  */
13
14
  function isSubDirectory(parent, child) {
14
- const parentNormalized = path_1.default.resolve(parent);
15
- const childNormalized = path_1.default.resolve(parentNormalized, child);
16
- const relative = path_1.default.relative(parentNormalized, childNormalized);
15
+ const parentNormalized = (0, pathHelpers_1.resolveHelper)(parent);
16
+ const childNormalized = (0, pathHelpers_1.resolveHelper)(parentNormalized, child);
17
+ const relative = (0, pathHelpers_1.relativeHelper)(parentNormalized, childNormalized);
17
18
  return relative !== '' && !relative.startsWith('..') && !path_1.default.isAbsolute(relative);
18
19
  }
@@ -1 +1 @@
1
- {"version":3,"file":"mapPathToTargetDirSafe.d.ts","sourceRoot":"","sources":["../../../src/core/utils/mapPathToTargetDirSafe.ts"],"names":[],"mappings":"AAMA;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CA0CrG"}
1
+ {"version":3,"file":"mapPathToTargetDirSafe.d.ts","sourceRoot":"","sources":["../../../src/core/utils/mapPathToTargetDirSafe.ts"],"names":[],"mappings":"AAIA;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CA0CrG"}
@@ -1,10 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.mapPathToTargetDirSafe = mapPathToTargetDirSafe;
4
- const path_1 = require("path");
4
+ const pathHelpers_1 = require("../../common/utils/pathHelpers");
5
5
  const findCommonParent_1 = require("./findCommonParent");
6
6
  const getRelativeModelPath_1 = require("./getRelativeModelPath");
7
- const pathHelpers_1 = require("./pathHelpers");
8
7
  /**
9
8
  * Safely muppit the path from SourceDir → targetDir
10
9
  * Works even if the file is outside SourceDir, but in a common parent
@@ -15,34 +14,34 @@ const pathHelpers_1 = require("./pathHelpers");
15
14
  */
16
15
  function mapPathToTargetDirSafe(filePath, sourceDir, targetDir) {
17
16
  const pathSep = '/';
18
- const absFile = (0, pathHelpers_1.resolve)(filePath);
19
- const absSource = (0, pathHelpers_1.resolve)(sourceDir);
20
- const absTarget = (0, pathHelpers_1.resolve)(targetDir);
17
+ const absFile = (0, pathHelpers_1.resolveHelper)(filePath);
18
+ const absSource = (0, pathHelpers_1.resolveHelper)(sourceDir);
19
+ const absTarget = (0, pathHelpers_1.resolveHelper)(targetDir);
21
20
  const sourceWithSep = absSource.endsWith(pathSep) ? absSource : absSource + pathSep;
22
21
  // 1. The file inside SourceDir → mapim as usual
23
22
  if (absFile.startsWith(sourceWithSep)) {
24
- const rel = (0, path_1.relative)(absSource, absFile);
25
- return (0, pathHelpers_1.resolve)(absTarget, rel);
23
+ const rel = (0, pathHelpers_1.relativeHelper)(absSource, absFile);
24
+ return (0, pathHelpers_1.resolveHelper)(absTarget, rel);
26
25
  }
27
26
  // 2. The file is outside SourceDir, but in a common parent
28
27
  const commonParent = (0, findCommonParent_1.findCommonParent)(absSource, absFile);
29
28
  if (commonParent) {
30
29
  // Path from commonParent → file
31
- const fileRelToCommon = (0, path_1.relative)(commonParent, absFile);
30
+ const fileRelToCommon = (0, pathHelpers_1.relativeHelper)(commonParent, absFile);
32
31
  // Path from targetDir → commonParent
33
- const targetToCommon = (0, path_1.relative)(absTarget, commonParent);
32
+ const targetToCommon = (0, pathHelpers_1.relativeHelper)(absTarget, commonParent);
34
33
  if (targetToCommon.includes('..')) {
35
34
  // targetDir is higher than commonParent → we can't map
36
35
  if (filePath) {
37
- const relativePath = (0, path_1.relative)(absSource, absFile);
36
+ const relativePath = (0, pathHelpers_1.relativeHelper)(absSource, absFile);
38
37
  return (0, getRelativeModelPath_1.getRelativeModelPath)(targetDir, relativePath);
39
38
  }
40
39
  return filePath;
41
40
  }
42
41
  // Collecting: targetDir → commonParent → file
43
- const pathFromTargetToCommon = (0, path_1.relative)(absTarget, commonParent);
42
+ const pathFromTargetToCommon = (0, pathHelpers_1.relativeHelper)(absTarget, commonParent);
44
43
  const pathFromCommonToFile = fileRelToCommon;
45
- return (0, pathHelpers_1.resolve)(absTarget, pathFromTargetToCommon, pathFromCommonToFile);
44
+ return (0, pathHelpers_1.resolveHelper)(absTarget, pathFromTargetToCommon, pathFromCommonToFile);
46
45
  }
47
46
  // 3. There is no common parent → return as is
48
47
  return filePath;
@@ -1 +1 @@
1
- {"version":3,"file":"modelHelpers.d.ts","sourceRoot":"","sources":["../../../src/core/utils/modelHelpers.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAEzD;;;;;;;;;;GAUG;AACH,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,CAkBjE;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE,eAAe,EAAE,MAAM,GAAG,KAAK,EAAE,CAyBrF"}
1
+ {"version":3,"file":"modelHelpers.d.ts","sourceRoot":"","sources":["../../../src/core/utils/modelHelpers.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAEzD;;;;;;;;;;GAUG;AACH,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,CAkBjE;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE,eAAe,EAAE,MAAM,GAAG,KAAK,EAAE,CA+BrF"}
@@ -1,8 +1,12 @@
1
1
  "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
2
5
  Object.defineProperty(exports, "__esModule", { value: true });
3
6
  exports.setDuplicateModelAliases = setDuplicateModelAliases;
4
7
  exports.resolveModelImports = resolveModelImports;
5
- const path_1 = require("path");
8
+ const path_1 = __importDefault(require("path"));
9
+ const pathHelpers_1 = require("../../common/utils/pathHelpers");
6
10
  /**
7
11
  * Assigns alias to models with the same name.
8
12
  * Modifies objects of in-place models and returns an array.
@@ -57,11 +61,19 @@ function resolveModelImports(models, outputModelsDir) {
57
61
  const importAlias = importModel?.alias ?? imprt.alias;
58
62
  let importPath = imprt.path;
59
63
  if (importModel) {
60
- const fromDir = (0, path_1.dirname)((0, path_1.resolve)(outputModelsDir, model.path));
61
- const toDir = (0, path_1.dirname)((0, path_1.resolve)(outputModelsDir, importModel.path));
62
- const file = (0, path_1.basename)(importModel.name);
63
- const relativePath = (0, path_1.relative)(fromDir, toDir);
64
- importPath = relativePath === '' ? `./${file}` : `${relativePath.replace(/\\/g, '/')}/${file}`;
64
+ const fromDir = (0, pathHelpers_1.dirNameHelper)((0, pathHelpers_1.resolveHelper)(outputModelsDir, model.path));
65
+ const toDir = (0, pathHelpers_1.dirNameHelper)((0, pathHelpers_1.resolveHelper)(outputModelsDir, importModel.path));
66
+ const file = path_1.default.basename(importModel.path);
67
+ const relativePath = (0, pathHelpers_1.relativeHelper)(fromDir, toDir);
68
+ if (relativePath === '') {
69
+ importPath = `./${file}`;
70
+ }
71
+ else if (relativePath.startsWith('./')) {
72
+ importPath = `${relativePath}${file}`;
73
+ }
74
+ else {
75
+ importPath = `${relativePath}/${file}`;
76
+ }
65
77
  }
66
78
  return Object.assign(imprt, {
67
79
  alias: importAlias,
@@ -0,0 +1,2 @@
1
+ export declare function normalizeString(value?: string): string | null | undefined;
2
+ //# sourceMappingURL=normalizeString.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"normalizeString.d.ts","sourceRoot":"","sources":["../../../src/core/utils/normalizeString.ts"],"names":[],"mappings":"AAEA,wBAAgB,eAAe,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,CAUzE"}
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.normalizeString = normalizeString;
4
+ const Consts_1 = require("../types/Consts");
5
+ function normalizeString(value) {
6
+ if (!value) {
7
+ return value;
8
+ }
9
+ return value
10
+ .replace(Consts_1.REGEX_BACKSLASH, '/')
11
+ .replace(Consts_1.REGEX_MULTIPLE_SLASHES, '/')
12
+ .replace(Consts_1.REGEX_DOT_SLASH, '/')
13
+ .replace(Consts_1.REGEX_LEADING_DOT_SLASH, './');
14
+ }
@@ -1,12 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.normalizedAbsolutePath = normalizedAbsolutePath;
4
- const pathHelpers_1 = require("../utils/pathHelpers");
4
+ const pathHelpers_1 = require("../../common/utils/pathHelpers");
5
5
  /**
6
6
  * Converts the path to an absolute one and normalizes it.
7
7
  * @* @param path Value is the value of the path to convert.
8
8
  */
9
9
  function normalizedAbsolutePath(pathValue) {
10
- const absolute = (0, pathHelpers_1.resolve)(pathValue);
11
- return (0, pathHelpers_1.normalize)(absolute);
10
+ const absolute = (0, pathHelpers_1.resolveHelper)(pathValue);
11
+ return (0, pathHelpers_1.normalizeHelper)(absolute);
12
12
  }
@@ -1 +1 @@
1
- {"version":3,"file":"parseRef.d.ts","sourceRoot":"","sources":["../../../src/core/utils/parseRef.ts"],"names":[],"mappings":"AAEA,oBAAY,OAAO;IACf,cAAc,mBAAmB;IACjC,aAAa,kBAAkB;IAC/B,sBAAsB,2BAA2B;IACjD,QAAQ,aAAa;IACrB,aAAa,kBAAkB;CAClC;AAED,MAAM,WAAW,SAAS;IACtB,IAAI,EAAE,OAAO,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;CACvB;AAED;;GAEG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,CAiD/C"}
1
+ {"version":3,"file":"parseRef.d.ts","sourceRoot":"","sources":["../../../src/core/utils/parseRef.ts"],"names":[],"mappings":"AAEA,oBAAY,OAAO;IACf,cAAc,mBAAmB;IACjC,aAAa,kBAAkB;IAC/B,sBAAsB,2BAA2B;IACjD,QAAQ,aAAa;IACrB,aAAa,kBAAkB;CAClC;AAED,MAAM,WAAW,SAAS;IACtB,IAAI,EAAE,OAAO,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;CACvB;AAED;;GAEG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,CAgD/C"}
@@ -1,11 +1,8 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
3
  exports.RefType = void 0;
7
4
  exports.parseRef = parseRef;
8
- const path_1 = __importDefault(require("path"));
5
+ const path_1 = require("path");
9
6
  var RefType;
10
7
  (function (RefType) {
11
8
  RefType["LOCAL_FRAGMENT"] = "local_fragment";
@@ -25,17 +22,17 @@ function parseRef(ref) {
25
22
  if (ref.startsWith('http://') || ref.startsWith('https://')) {
26
23
  return {
27
24
  type: RefType.HTTP_URL,
28
- originalRef: ref
25
+ originalRef: ref,
29
26
  };
30
27
  }
31
28
  // Absolute paths (POSIX/Windows handled by path.isAbsolute)
32
- if (path_1.default.isAbsolute(ref)) {
29
+ if ((0, path_1.isAbsolute)(ref)) {
33
30
  const [filePath, fragment] = ref.split('#');
34
31
  return {
35
32
  type: RefType.ABSOLUTE_PATH,
36
33
  filePath,
37
34
  fragment: fragment ? `#${fragment}` : undefined,
38
- originalRef: ref
35
+ originalRef: ref,
39
36
  };
40
37
  }
41
38
  // Local fragment
@@ -43,7 +40,7 @@ function parseRef(ref) {
43
40
  return {
44
41
  type: RefType.LOCAL_FRAGMENT,
45
42
  fragment: ref,
46
- originalRef: ref
43
+ originalRef: ref,
47
44
  };
48
45
  }
49
46
  // External file references (may include fragment)
@@ -53,12 +50,12 @@ function parseRef(ref) {
53
50
  type: RefType.EXTERNAL_FILE_FRAGMENT,
54
51
  filePath,
55
52
  fragment: `#${fragment}`,
56
- originalRef: ref
53
+ originalRef: ref,
57
54
  };
58
55
  }
59
56
  return {
60
57
  type: RefType.EXTERNAL_FILE,
61
58
  filePath,
62
- originalRef: ref
59
+ originalRef: ref,
63
60
  };
64
61
  }
@@ -5,11 +5,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const fs_1 = __importDefault(require("fs"));
7
7
  const handlebars_1 = __importDefault(require("handlebars"));
8
- const path_1 = __importDefault(require("path"));
8
+ const path_1 = require("path");
9
9
  const Enums_1 = require("../../common/Enums");
10
10
  const Logger_1 = require("../../common/Logger");
11
- const templatesDir = path_1.default.resolve(__dirname, '../../templates');
12
- const compiledDir = path_1.default.resolve(__dirname, '../../templatesCompiled');
11
+ const pathHelpers_1 = require("../../common/utils/pathHelpers");
12
+ const Consts_1 = require("../../core/types/Consts");
13
+ const templatesDir = (0, pathHelpers_1.resolveHelper)(__dirname, '../../templates');
14
+ const compiledDir = (0, pathHelpers_1.resolveHelper)(__dirname, '../../templatesCompiled');
13
15
  const header = `// This is an automatically generated file for the hbs template.
14
16
  // You don't need to change it, run npm run build:hbs to update it.
15
17
  /* istanbul ignore file */
@@ -36,15 +38,14 @@ const precompileTemplates = () => {
36
38
  if (file.name === '__mocks__') {
37
39
  return;
38
40
  }
39
- const filePath = path_1.default.join(dir, file.name);
41
+ const filePath = (0, pathHelpers_1.joinHelper)(dir, file.name);
40
42
  if (file.isDirectory()) {
41
43
  walk(filePath);
42
44
  }
43
- else if (file.isFile() && path_1.default.extname(file.name) === '.hbs') {
44
- const templateName = path_1.default
45
- .relative(templatesDir, filePath)
45
+ else if (file.isFile() && (0, path_1.extname)(file.name) === '.hbs') {
46
+ const templateName = (0, pathHelpers_1.relativeHelper)(templatesDir, filePath)
46
47
  .replace(/\.hbs$/, '')
47
- .replace(/\\/g, '/');
48
+ .replace(Consts_1.REGEX_BACKSLASH, '/');
48
49
  const templateContent = fs_1.default.readFileSync(filePath, 'utf8');
49
50
  const precompiled = handlebars_1.default.precompile(templateContent, {
50
51
  strict: true,
@@ -58,11 +59,14 @@ const precompileTemplates = () => {
58
59
  union: true,
59
60
  intersection: true,
60
61
  enumerator: true,
62
+ containsSystemName: true,
63
+ normalizePath: true,
64
+ joinPath: true,
61
65
  },
62
66
  });
63
67
  const tsContent = header + precompiled;
64
- const outputFilePath = path_1.default.join(compiledDir, `${templateName}.ts`);
65
- const outputDir = path_1.default.dirname(outputFilePath);
68
+ const outputFilePath = (0, pathHelpers_1.joinHelper)(compiledDir, `${templateName}.ts`);
69
+ const outputDir = (0, pathHelpers_1.dirNameHelper)(outputFilePath);
66
70
  if (!fs_1.default.existsSync(outputDir)) {
67
71
  fs_1.default.mkdirSync(outputDir, { recursive: true });
68
72
  }
@@ -1 +1 @@
1
- {"version":3,"file":"registerHandlebarHelpers.d.ts","sourceRoot":"","sources":["../../../src/core/utils/registerHandlebarHelpers.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAK5D,wBAAgB,wBAAwB,CAAC,IAAI,EAAE;IAAE,UAAU,EAAE,UAAU,CAAC;IAAC,UAAU,EAAE,OAAO,CAAC;IAAC,aAAa,EAAE,OAAO,CAAA;CAAE,GAAG,IAAI,CAgD5H"}
1
+ {"version":3,"file":"registerHandlebarHelpers.d.ts","sourceRoot":"","sources":["../../../src/core/utils/registerHandlebarHelpers.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAK5D,wBAAgB,wBAAwB,CAAC,IAAI,EAAE;IAAE,UAAU,EAAE,UAAU,CAAC;IAAC,UAAU,EAAE,OAAO,CAAC;IAAC,aAAa,EAAE,OAAO,CAAA;CAAE,GAAG,IAAI,CA+E5H"}
@@ -35,6 +35,7 @@ var __importStar = (this && this.__importStar) || (function () {
35
35
  Object.defineProperty(exports, "__esModule", { value: true });
36
36
  exports.registerHandlebarHelpers = registerHandlebarHelpers;
37
37
  const Handlebars = __importStar(require("handlebars/runtime"));
38
+ const Consts_1 = require("../types/Consts");
38
39
  const unique_1 = require("./unique");
39
40
  function registerHandlebarHelpers(root) {
40
41
  Handlebars.registerHelper('equals', function (a, b, options) {
@@ -80,4 +81,27 @@ function registerHandlebarHelpers(root) {
80
81
  const hasReservedWords = RESERVED_WORDS.test(value);
81
82
  return hasReservedWords ? options.fn(this) : options.inverse(this);
82
83
  });
84
+ Handlebars.registerHelper('normalizePath', function (path) {
85
+ if (!path || typeof path !== 'string') {
86
+ return './';
87
+ }
88
+ let normalizedPath = path
89
+ .replace(Consts_1.REGEX_BACKSLASH, '/')
90
+ .replace(Consts_1.REGEX_MULTIPLE_SLASHES, '/')
91
+ .replace(Consts_1.REGEX_DOT_SLASH, '/')
92
+ .replace(Consts_1.REGEX_LEADING_DOT_SLASH, './')
93
+ .replace(Consts_1.REGEX_TRAILING_SLASH, '');
94
+ if (!normalizedPath.startsWith('./')) {
95
+ normalizedPath = `./${normalizedPath}`;
96
+ }
97
+ if (normalizedPath === '.') {
98
+ return './';
99
+ }
100
+ return normalizedPath;
101
+ });
102
+ Handlebars.registerHelper('joinPath', function (firstPath, secondPath) {
103
+ const cleanedFirstPath = firstPath.endsWith('./') ? firstPath.slice(0, -2) : firstPath;
104
+ const cleanedSecondPath = secondPath.startsWith('./') ? secondPath.slice(2) : secondPath;
105
+ return `${cleanedFirstPath}/${cleanedSecondPath}`.replace(Consts_1.REGEX_BACKSLASH, '/').replace(Consts_1.REGEX_MULTIPLE_SLASHES, '/');
106
+ });
83
107
  }