@nestia/sdk 14.0.0 → 14.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (391) hide show
  1. package/README.md +1 -1
  2. package/assets/bundle/distribute/build-sdk.cjs +28 -0
  3. package/assets/bundle/distribute/package.json +7 -3
  4. package/assets/bundle/distribute/tsconfig.json +15 -105
  5. package/lib/INestiaConfig.d.ts +74 -34
  6. package/lib/NestiaSdkApplication.d.ts +60 -0
  7. package/lib/NestiaSdkApplication.js +121 -32
  8. package/lib/NestiaSdkApplication.js.map +1 -1
  9. package/lib/NestiaSwaggerComposer.d.ts +21 -0
  10. package/lib/NestiaSwaggerComposer.js +32 -13
  11. package/lib/NestiaSwaggerComposer.js.map +1 -1
  12. package/lib/analyses/AccessorAnalyzer.d.ts +26 -0
  13. package/lib/analyses/AccessorAnalyzer.js +26 -0
  14. package/lib/analyses/AccessorAnalyzer.js.map +1 -1
  15. package/lib/analyses/ConfigAnalyzer.d.ts +41 -0
  16. package/lib/analyses/ConfigAnalyzer.js +52 -77
  17. package/lib/analyses/ConfigAnalyzer.js.map +1 -1
  18. package/lib/analyses/ImportAnalyzer.d.ts +25 -0
  19. package/lib/analyses/ImportAnalyzer.js +25 -0
  20. package/lib/analyses/ImportAnalyzer.js.map +1 -1
  21. package/lib/analyses/ParameterNameAnalyzer.d.ts +44 -0
  22. package/lib/analyses/ParameterNameAnalyzer.js +63 -0
  23. package/lib/analyses/ParameterNameAnalyzer.js.map +1 -0
  24. package/lib/analyses/PathAnalyzer.d.ts +93 -1
  25. package/lib/analyses/PathAnalyzer.js +160 -23
  26. package/lib/analyses/PathAnalyzer.js.map +1 -1
  27. package/lib/analyses/ReflectControllerAnalyzer.d.ts +32 -0
  28. package/lib/analyses/ReflectControllerAnalyzer.js +24 -1
  29. package/lib/analyses/ReflectControllerAnalyzer.js.map +1 -1
  30. package/lib/analyses/ReflectHttpOperationAnalyzer.d.ts +29 -0
  31. package/lib/analyses/ReflectHttpOperationAnalyzer.js +35 -24
  32. package/lib/analyses/ReflectHttpOperationAnalyzer.js.map +1 -1
  33. package/lib/analyses/ReflectHttpOperationExceptionAnalyzer.d.ts +31 -0
  34. package/lib/analyses/ReflectHttpOperationExceptionAnalyzer.js +21 -0
  35. package/lib/analyses/ReflectHttpOperationExceptionAnalyzer.js.map +1 -1
  36. package/lib/analyses/ReflectHttpOperationParameterAnalyzer.d.ts +31 -0
  37. package/lib/analyses/ReflectHttpOperationParameterAnalyzer.js +143 -23
  38. package/lib/analyses/ReflectHttpOperationParameterAnalyzer.js.map +1 -1
  39. package/lib/analyses/ReflectHttpOperationResponseAnalyzer.d.ts +32 -0
  40. package/lib/analyses/ReflectHttpOperationResponseAnalyzer.js +27 -2
  41. package/lib/analyses/ReflectHttpOperationResponseAnalyzer.js.map +1 -1
  42. package/lib/analyses/ReflectMcpOperationAnalyzer.d.ts +29 -0
  43. package/lib/analyses/ReflectMcpOperationAnalyzer.js +35 -11
  44. package/lib/analyses/ReflectMcpOperationAnalyzer.js.map +1 -1
  45. package/lib/analyses/ReflectMetadataAnalyzer.d.ts +47 -0
  46. package/lib/analyses/ReflectMetadataAnalyzer.js +47 -0
  47. package/lib/analyses/ReflectMetadataAnalyzer.js.map +1 -1
  48. package/lib/analyses/ReflectWebSocketOperationAnalyzer.d.ts +29 -0
  49. package/lib/analyses/ReflectWebSocketOperationAnalyzer.js +27 -5
  50. package/lib/analyses/ReflectWebSocketOperationAnalyzer.js.map +1 -1
  51. package/lib/analyses/SecurityAnalyzer.d.ts +25 -0
  52. package/lib/analyses/SecurityAnalyzer.js +39 -19
  53. package/lib/analyses/SecurityAnalyzer.js.map +1 -1
  54. package/lib/analyses/SwaggerExampleAnalyzer.d.ts +31 -0
  55. package/lib/analyses/SwaggerExampleAnalyzer.js +36 -0
  56. package/lib/analyses/SwaggerExampleAnalyzer.js.map +1 -0
  57. package/lib/analyses/TypedHttpRouteAnalyzer.d.ts +41 -3
  58. package/lib/analyses/TypedHttpRouteAnalyzer.js +196 -172
  59. package/lib/analyses/TypedHttpRouteAnalyzer.js.map +1 -1
  60. package/lib/analyses/TypedMcpRouteAnalyzer.d.ts +29 -0
  61. package/lib/analyses/TypedMcpRouteAnalyzer.js +152 -20
  62. package/lib/analyses/TypedMcpRouteAnalyzer.js.map +1 -1
  63. package/lib/analyses/TypedWebSocketRouteAnalyzer.d.ts +19 -0
  64. package/lib/analyses/TypedWebSocketRouteAnalyzer.js +20 -1
  65. package/lib/analyses/TypedWebSocketRouteAnalyzer.js.map +1 -1
  66. package/lib/decorators/OperationMetadata.d.ts +6 -0
  67. package/lib/decorators/OperationMetadata.js +6 -0
  68. package/lib/decorators/OperationMetadata.js.map +1 -1
  69. package/lib/executable/internal/CommandParser.d.ts +19 -0
  70. package/lib/executable/internal/CommandParser.js +19 -0
  71. package/lib/executable/internal/CommandParser.js.map +1 -1
  72. package/lib/executable/internal/NestiaConfigLoader.d.ts +56 -0
  73. package/lib/executable/internal/NestiaConfigLoader.js +48 -42
  74. package/lib/executable/internal/NestiaConfigLoader.js.map +1 -1
  75. package/lib/executable/internal/NestiaSdkCommand.d.ts +60 -0
  76. package/lib/executable/internal/NestiaSdkCommand.js +95 -3
  77. package/lib/executable/internal/NestiaSdkCommand.js.map +1 -1
  78. package/lib/executable/internal/NestiaSdkWatcher.d.ts +81 -0
  79. package/lib/executable/internal/NestiaSdkWatcher.js +125 -41
  80. package/lib/executable/internal/NestiaSdkWatcher.js.map +1 -1
  81. package/lib/executable/internal/NestiaSwaggerWatch.d.ts +80 -0
  82. package/lib/executable/internal/NestiaSwaggerWatch.js +308 -0
  83. package/lib/executable/internal/NestiaSwaggerWatch.js.map +1 -0
  84. package/lib/executable/sdk.js +16 -1
  85. package/lib/executable/sdk.js.map +1 -1
  86. package/lib/factories/ExpressionFactory.d.ts +18 -0
  87. package/lib/factories/ExpressionFactory.js +21 -2
  88. package/lib/factories/ExpressionFactory.js.map +1 -1
  89. package/lib/factories/IdentifierFactory.d.ts +24 -0
  90. package/lib/factories/IdentifierFactory.js +24 -0
  91. package/lib/factories/IdentifierFactory.js.map +1 -1
  92. package/lib/factories/LiteralFactory.d.ts +22 -4
  93. package/lib/factories/LiteralFactory.js +33 -11
  94. package/lib/factories/LiteralFactory.js.map +1 -1
  95. package/lib/factories/StatementFactory.d.ts +28 -1
  96. package/lib/factories/StatementFactory.js +28 -1
  97. package/lib/factories/StatementFactory.js.map +1 -1
  98. package/lib/factories/TypeFactory.d.ts +24 -0
  99. package/lib/factories/TypeFactory.js +15 -0
  100. package/lib/factories/TypeFactory.js.map +1 -1
  101. package/lib/generates/CloneGenerator.d.ts +22 -0
  102. package/lib/generates/CloneGenerator.js +26 -5
  103. package/lib/generates/CloneGenerator.js.map +1 -1
  104. package/lib/generates/E2eGenerator.d.ts +19 -0
  105. package/lib/generates/E2eGenerator.js +19 -0
  106. package/lib/generates/E2eGenerator.js.map +1 -1
  107. package/lib/generates/SdkGenerator.d.ts +38 -0
  108. package/lib/generates/SdkGenerator.js +43 -5
  109. package/lib/generates/SdkGenerator.js.map +1 -1
  110. package/lib/generates/SwaggerGenerator.d.ts +36 -6
  111. package/lib/generates/SwaggerGenerator.js +190 -40
  112. package/lib/generates/SwaggerGenerator.js.map +1 -1
  113. package/lib/generates/internal/E2eFileProgrammer.d.ts +19 -0
  114. package/lib/generates/internal/E2eFileProgrammer.js +20 -1
  115. package/lib/generates/internal/E2eFileProgrammer.js.map +1 -1
  116. package/lib/generates/internal/FilePrinter.d.ts +57 -0
  117. package/lib/generates/internal/FilePrinter.js +74 -0
  118. package/lib/generates/internal/FilePrinter.js.map +1 -1
  119. package/lib/generates/internal/ImportDictionary.d.ts +93 -1
  120. package/lib/generates/internal/ImportDictionary.js +103 -2
  121. package/lib/generates/internal/ImportDictionary.js.map +1 -1
  122. package/lib/generates/internal/SdkAliasCollection.d.ts +121 -1
  123. package/lib/generates/internal/SdkAliasCollection.js +132 -11
  124. package/lib/generates/internal/SdkAliasCollection.js.map +1 -1
  125. package/lib/generates/internal/SdkDistributionComposer.d.ts +19 -0
  126. package/lib/generates/internal/SdkDistributionComposer.js +149 -52
  127. package/lib/generates/internal/SdkDistributionComposer.js.map +1 -1
  128. package/lib/generates/internal/SdkFileProgrammer.d.ts +18 -0
  129. package/lib/generates/internal/SdkFileProgrammer.js +101 -12
  130. package/lib/generates/internal/SdkFileProgrammer.js.map +1 -1
  131. package/lib/generates/internal/SdkHttpCloneProgrammer.d.ts +29 -0
  132. package/lib/generates/internal/SdkHttpCloneProgrammer.js +33 -0
  133. package/lib/generates/internal/SdkHttpCloneProgrammer.js.map +1 -1
  134. package/lib/generates/internal/SdkHttpCloneReferencer.d.ts +19 -0
  135. package/lib/generates/internal/SdkHttpCloneReferencer.js +78 -25
  136. package/lib/generates/internal/SdkHttpCloneReferencer.js.map +1 -1
  137. package/lib/generates/internal/SdkHttpFunctionProgrammer.d.ts +19 -0
  138. package/lib/generates/internal/SdkHttpFunctionProgrammer.js +40 -23
  139. package/lib/generates/internal/SdkHttpFunctionProgrammer.js.map +1 -1
  140. package/lib/generates/internal/SdkHttpNamespaceProgrammer.d.ts +19 -0
  141. package/lib/generates/internal/SdkHttpNamespaceProgrammer.js +46 -34
  142. package/lib/generates/internal/SdkHttpNamespaceProgrammer.js.map +1 -1
  143. package/lib/generates/internal/SdkHttpParameterProgrammer.d.ts +142 -1
  144. package/lib/generates/internal/SdkHttpParameterProgrammer.js +175 -6
  145. package/lib/generates/internal/SdkHttpParameterProgrammer.js.map +1 -1
  146. package/lib/generates/internal/SdkHttpRouteProgrammer.d.ts +20 -0
  147. package/lib/generates/internal/SdkHttpRouteProgrammer.js +36 -32
  148. package/lib/generates/internal/SdkHttpRouteProgrammer.js.map +1 -1
  149. package/lib/generates/internal/SdkHttpSimulationProgrammer.d.ts +38 -0
  150. package/lib/generates/internal/SdkHttpSimulationProgrammer.js +66 -18
  151. package/lib/generates/internal/SdkHttpSimulationProgrammer.js.map +1 -1
  152. package/lib/generates/internal/SdkImportWizard.d.ts +63 -0
  153. package/lib/generates/internal/SdkImportWizard.js +63 -0
  154. package/lib/generates/internal/SdkImportWizard.js.map +1 -1
  155. package/lib/generates/internal/SdkMcpRouteProgrammer.d.ts +17 -2
  156. package/lib/generates/internal/SdkMcpRouteProgrammer.js +72 -24
  157. package/lib/generates/internal/SdkMcpRouteProgrammer.js.map +1 -1
  158. package/lib/generates/internal/SdkPathTemplate.d.ts +36 -0
  159. package/lib/generates/internal/SdkPathTemplate.js +65 -0
  160. package/lib/generates/internal/SdkPathTemplate.js.map +1 -0
  161. package/lib/generates/internal/SdkRouteDirectory.d.ts +10 -0
  162. package/lib/generates/internal/SdkRouteDirectory.js +10 -0
  163. package/lib/generates/internal/SdkRouteDirectory.js.map +1 -1
  164. package/lib/generates/internal/SdkTypeProgrammer.d.ts +54 -1
  165. package/lib/generates/internal/SdkTypeProgrammer.js +111 -27
  166. package/lib/generates/internal/SdkTypeProgrammer.js.map +1 -1
  167. package/lib/generates/internal/SdkTypeTagProgrammer.d.ts +53 -1
  168. package/lib/generates/internal/SdkTypeTagProgrammer.js +407 -67
  169. package/lib/generates/internal/SdkTypeTagProgrammer.js.map +1 -1
  170. package/lib/generates/internal/SdkWebSocketCloneProgrammer.d.ts +40 -0
  171. package/lib/generates/internal/SdkWebSocketCloneProgrammer.js +149 -142
  172. package/lib/generates/internal/SdkWebSocketCloneProgrammer.js.map +1 -1
  173. package/lib/generates/internal/SdkWebSocketNamespaceProgrammer.d.ts +19 -0
  174. package/lib/generates/internal/SdkWebSocketNamespaceProgrammer.js +46 -36
  175. package/lib/generates/internal/SdkWebSocketNamespaceProgrammer.js.map +1 -1
  176. package/lib/generates/internal/SdkWebSocketParameterProgrammer.d.ts +114 -1
  177. package/lib/generates/internal/SdkWebSocketParameterProgrammer.js +120 -5
  178. package/lib/generates/internal/SdkWebSocketParameterProgrammer.js.map +1 -1
  179. package/lib/generates/internal/SdkWebSocketRouteProgrammer.d.ts +18 -0
  180. package/lib/generates/internal/SdkWebSocketRouteProgrammer.js +75 -33
  181. package/lib/generates/internal/SdkWebSocketRouteProgrammer.js.map +1 -1
  182. package/lib/generates/internal/SwaggerDescriptionComposer.d.ts +42 -0
  183. package/lib/generates/internal/SwaggerDescriptionComposer.js +44 -1
  184. package/lib/generates/internal/SwaggerDescriptionComposer.js.map +1 -1
  185. package/lib/generates/internal/SwaggerOperationComposer.d.ts +18 -0
  186. package/lib/generates/internal/SwaggerOperationComposer.js +37 -8
  187. package/lib/generates/internal/SwaggerOperationComposer.js.map +1 -1
  188. package/lib/generates/internal/SwaggerOperationParameterComposer.d.ts +40 -1
  189. package/lib/generates/internal/SwaggerOperationParameterComposer.js +230 -25
  190. package/lib/generates/internal/SwaggerOperationParameterComposer.js.map +1 -1
  191. package/lib/generates/internal/SwaggerOperationResponseComposer.d.ts +21 -0
  192. package/lib/generates/internal/SwaggerOperationResponseComposer.js +58 -7
  193. package/lib/generates/internal/SwaggerOperationResponseComposer.js.map +1 -1
  194. package/lib/internal/legacy.d.ts +342 -31
  195. package/lib/internal/legacy.js +207 -31
  196. package/lib/internal/legacy.js.map +1 -1
  197. package/lib/structures/INestiaProject.d.ts +10 -0
  198. package/lib/structures/INestiaSdkInput.d.ts +30 -0
  199. package/lib/structures/IOperationMetadata.d.ts +77 -0
  200. package/lib/structures/IReflectController.d.ts +10 -0
  201. package/lib/structures/IReflectHttpOperation.d.ts +10 -0
  202. package/lib/structures/IReflectHttpOperationException.d.ts +13 -2
  203. package/lib/structures/IReflectHttpOperationParameter.d.ts +55 -3
  204. package/lib/structures/IReflectHttpOperationSuccess.d.ts +15 -3
  205. package/lib/structures/IReflectImport.d.ts +10 -0
  206. package/lib/structures/IReflectMcpOperation.d.ts +19 -0
  207. package/lib/structures/IReflectMcpOperationParameter.d.ts +9 -0
  208. package/lib/structures/IReflectOperationError.d.ts +28 -0
  209. package/lib/structures/IReflectOperationError.js +22 -2
  210. package/lib/structures/IReflectOperationError.js.map +1 -1
  211. package/lib/structures/IReflectType.d.ts +9 -0
  212. package/lib/structures/IReflectWebSocketOperation.d.ts +10 -0
  213. package/lib/structures/IReflectWebSocketOperationParameter.d.ts +55 -0
  214. package/lib/structures/ITypedApplication.d.ts +10 -0
  215. package/lib/structures/ITypedHttpRoute.d.ts +18 -0
  216. package/lib/structures/ITypedHttpRouteException.d.ts +13 -1
  217. package/lib/structures/ITypedHttpRouteParameter.d.ts +48 -1
  218. package/lib/structures/ITypedHttpRouteSuccess.d.ts +13 -1
  219. package/lib/structures/ITypedMcpRoute.d.ts +11 -0
  220. package/lib/structures/ITypedWebSocketRoute.d.ts +18 -0
  221. package/lib/transform.d.ts +6 -0
  222. package/lib/transform.js +6 -0
  223. package/lib/transform.js.map +1 -1
  224. package/lib/utils/ArrayUtil.d.ts +31 -1
  225. package/lib/utils/ArrayUtil.js +32 -11
  226. package/lib/utils/ArrayUtil.js.map +1 -1
  227. package/lib/utils/EmittedJavaScriptPatcher.d.ts +20 -0
  228. package/lib/utils/EmittedJavaScriptPatcher.js +65 -46
  229. package/lib/utils/EmittedJavaScriptPatcher.js.map +1 -1
  230. package/lib/utils/FileRetriever.d.ts +29 -0
  231. package/lib/utils/FileRetriever.js +29 -0
  232. package/lib/utils/FileRetriever.js.map +1 -1
  233. package/lib/utils/HttpResponseContentTypeUtil.d.ts +41 -0
  234. package/lib/utils/HttpResponseContentTypeUtil.js +31 -0
  235. package/lib/utils/HttpResponseContentTypeUtil.js.map +1 -1
  236. package/lib/utils/MapUtil.d.ts +64 -1
  237. package/lib/utils/MapUtil.js +24 -3
  238. package/lib/utils/MapUtil.js.map +1 -1
  239. package/lib/utils/PathUtil.d.ts +31 -0
  240. package/lib/utils/PathUtil.js +38 -0
  241. package/lib/utils/PathUtil.js.map +1 -1
  242. package/lib/utils/SdkBundlePath.d.ts +2 -0
  243. package/lib/utils/SdkBundlePath.js +10 -0
  244. package/lib/utils/SdkBundlePath.js.map +1 -0
  245. package/lib/utils/SdkInputFilter.d.ts +31 -0
  246. package/lib/utils/SdkInputFilter.js +115 -0
  247. package/lib/utils/SdkInputFilter.js.map +1 -0
  248. package/lib/utils/SourceFinder.d.ts +45 -0
  249. package/lib/utils/SourceFinder.js +74 -16
  250. package/lib/utils/SourceFinder.js.map +1 -1
  251. package/lib/utils/StringUtil.d.ts +77 -2
  252. package/lib/utils/StringUtil.js +166 -4
  253. package/lib/utils/StringUtil.js.map +1 -1
  254. package/lib/utils/TemporaryDirectory.d.ts +60 -0
  255. package/lib/utils/TemporaryDirectory.js +112 -0
  256. package/lib/utils/TemporaryDirectory.js.map +1 -0
  257. package/lib/utils/TsConfigReader.d.ts +42 -0
  258. package/lib/utils/TsConfigReader.js +98 -14
  259. package/lib/utils/TsConfigReader.js.map +1 -1
  260. package/lib/utils/TtscExecutor.d.ts +23 -1
  261. package/lib/utils/TtscExecutor.js +22 -0
  262. package/lib/utils/TtscExecutor.js.map +1 -1
  263. package/lib/utils/VersioningStrategy.d.ts +39 -2
  264. package/lib/utils/VersioningStrategy.js +46 -13
  265. package/lib/utils/VersioningStrategy.js.map +1 -1
  266. package/lib/validators/TextPlainValidator.d.ts +19 -0
  267. package/lib/validators/TextPlainValidator.js +19 -0
  268. package/lib/validators/TextPlainValidator.js.map +1 -1
  269. package/native/go.mod +1 -1
  270. package/native/go.sum +2 -2
  271. package/native/sdk/register.go +12 -2
  272. package/native/sdk/sdk_http_rules.go +210 -0
  273. package/native/sdk/sdk_metadata_json.go +79 -4
  274. package/native/sdk/sdk_transform.go +1157 -414
  275. package/package.json +8 -6
  276. package/src/INestiaConfig.ts +74 -34
  277. package/src/NestiaSdkApplication.ts +129 -41
  278. package/src/NestiaSwaggerComposer.ts +32 -14
  279. package/src/analyses/AccessorAnalyzer.ts +26 -0
  280. package/src/analyses/ConfigAnalyzer.ts +52 -90
  281. package/src/analyses/ImportAnalyzer.ts +25 -0
  282. package/src/analyses/ParameterNameAnalyzer.ts +75 -0
  283. package/src/analyses/PathAnalyzer.ts +167 -23
  284. package/src/analyses/ReflectControllerAnalyzer.ts +34 -1
  285. package/src/analyses/ReflectHttpOperationAnalyzer.ts +36 -14
  286. package/src/analyses/ReflectHttpOperationExceptionAnalyzer.ts +31 -0
  287. package/src/analyses/ReflectHttpOperationParameterAnalyzer.ts +153 -39
  288. package/src/analyses/ReflectHttpOperationResponseAnalyzer.ts +38 -7
  289. package/src/analyses/ReflectMcpOperationAnalyzer.ts +38 -3
  290. package/src/analyses/ReflectMetadataAnalyzer.ts +47 -0
  291. package/src/analyses/ReflectWebSocketOperationAnalyzer.ts +40 -7
  292. package/src/analyses/SecurityAnalyzer.ts +45 -20
  293. package/src/analyses/SwaggerExampleAnalyzer.ts +39 -0
  294. package/src/analyses/TypedHttpRouteAnalyzer.ts +263 -198
  295. package/src/analyses/TypedMcpRouteAnalyzer.ts +180 -20
  296. package/src/analyses/TypedWebSocketRouteAnalyzer.ts +20 -0
  297. package/src/decorators/OperationMetadata.ts +6 -0
  298. package/src/executable/internal/CommandParser.ts +19 -0
  299. package/src/executable/internal/NestiaConfigLoader.ts +66 -50
  300. package/src/executable/internal/NestiaSdkCommand.ts +96 -3
  301. package/src/executable/internal/NestiaSdkWatcher.ts +172 -44
  302. package/src/executable/internal/NestiaSwaggerWatch.ts +359 -0
  303. package/src/executable/sdk.ts +24 -1
  304. package/src/factories/ExpressionFactory.ts +23 -2
  305. package/src/factories/IdentifierFactory.ts +24 -0
  306. package/src/factories/LiteralFactory.ts +51 -13
  307. package/src/factories/StatementFactory.ts +28 -1
  308. package/src/factories/TypeFactory.ts +24 -0
  309. package/src/generates/CloneGenerator.ts +26 -5
  310. package/src/generates/E2eGenerator.ts +19 -0
  311. package/src/generates/SdkGenerator.ts +43 -12
  312. package/src/generates/SwaggerGenerator.ts +229 -46
  313. package/src/generates/internal/E2eFileProgrammer.ts +20 -0
  314. package/src/generates/internal/FilePrinter.ts +71 -0
  315. package/src/generates/internal/ImportDictionary.ts +120 -2
  316. package/src/generates/internal/SdkAliasCollection.ts +144 -15
  317. package/src/generates/internal/SdkDistributionComposer.ts +181 -56
  318. package/src/generates/internal/SdkFileProgrammer.ts +126 -16
  319. package/src/generates/internal/SdkHttpCloneProgrammer.ts +55 -0
  320. package/src/generates/internal/SdkHttpCloneReferencer.ts +97 -23
  321. package/src/generates/internal/SdkHttpFunctionProgrammer.ts +47 -30
  322. package/src/generates/internal/SdkHttpNamespaceProgrammer.ts +53 -64
  323. package/src/generates/internal/SdkHttpParameterProgrammer.ts +295 -13
  324. package/src/generates/internal/SdkHttpRouteProgrammer.ts +37 -31
  325. package/src/generates/internal/SdkHttpSimulationProgrammer.ts +122 -18
  326. package/src/generates/internal/SdkImportWizard.ts +63 -0
  327. package/src/generates/internal/SdkMcpRouteProgrammer.ts +150 -33
  328. package/src/generates/internal/SdkPathTemplate.ts +88 -0
  329. package/src/generates/internal/SdkRouteDirectory.ts +10 -0
  330. package/src/generates/internal/SdkTypeProgrammer.ts +137 -36
  331. package/src/generates/internal/SdkTypeTagProgrammer.ts +536 -78
  332. package/src/generates/internal/SdkWebSocketCloneProgrammer.ts +185 -142
  333. package/src/generates/internal/SdkWebSocketNamespaceProgrammer.ts +62 -68
  334. package/src/generates/internal/SdkWebSocketParameterProgrammer.ts +205 -5
  335. package/src/generates/internal/SdkWebSocketRouteProgrammer.ts +89 -48
  336. package/src/generates/internal/SwaggerDescriptionComposer.ts +47 -1
  337. package/src/generates/internal/SwaggerOperationComposer.ts +38 -6
  338. package/src/generates/internal/SwaggerOperationParameterComposer.ts +318 -36
  339. package/src/generates/internal/SwaggerOperationResponseComposer.ts +74 -11
  340. package/src/internal/legacy-augmentation.d.ts +16 -0
  341. package/src/internal/legacy.ts +407 -49
  342. package/src/structures/INestiaProject.ts +10 -0
  343. package/src/structures/INestiaSdkInput.ts +30 -0
  344. package/src/structures/IOperationMetadata.ts +83 -0
  345. package/src/structures/IReflectController.ts +10 -0
  346. package/src/structures/IReflectHttpOperation.ts +10 -0
  347. package/src/structures/IReflectHttpOperationException.ts +17 -2
  348. package/src/structures/IReflectHttpOperationParameter.ts +56 -2
  349. package/src/structures/IReflectHttpOperationSuccess.ts +19 -3
  350. package/src/structures/IReflectImport.ts +10 -0
  351. package/src/structures/IReflectMcpOperation.ts +19 -0
  352. package/src/structures/IReflectMcpOperationParameter.ts +9 -0
  353. package/src/structures/IReflectOperationError.ts +31 -2
  354. package/src/structures/IReflectType.ts +9 -0
  355. package/src/structures/IReflectWebSocketOperation.ts +10 -0
  356. package/src/structures/IReflectWebSocketOperationParameter.ts +55 -0
  357. package/src/structures/ITypedApplication.ts +10 -0
  358. package/src/structures/ITypedHttpRoute.ts +18 -0
  359. package/src/structures/ITypedHttpRouteException.ts +14 -1
  360. package/src/structures/ITypedHttpRouteParameter.ts +48 -1
  361. package/src/structures/ITypedHttpRouteSuccess.ts +14 -1
  362. package/src/structures/ITypedMcpRoute.ts +12 -0
  363. package/src/structures/ITypedWebSocketRoute.ts +18 -0
  364. package/src/transform.ts +6 -0
  365. package/src/utils/ArrayUtil.ts +32 -13
  366. package/src/utils/EmittedJavaScriptPatcher.ts +70 -47
  367. package/src/utils/FileRetriever.ts +29 -0
  368. package/src/utils/HttpResponseContentTypeUtil.ts +41 -0
  369. package/src/utils/MapUtil.ts +68 -3
  370. package/src/utils/PathUtil.ts +38 -0
  371. package/src/utils/SdkBundlePath.ts +11 -0
  372. package/src/utils/SdkInputFilter.ts +108 -0
  373. package/src/utils/SourceFinder.ts +76 -18
  374. package/src/utils/StringUtil.ts +182 -5
  375. package/src/utils/TemporaryDirectory.ts +108 -0
  376. package/src/utils/TsConfigReader.ts +124 -26
  377. package/src/utils/TtscExecutor.ts +23 -1
  378. package/src/utils/VersioningStrategy.ts +51 -16
  379. package/src/validators/TextPlainValidator.ts +19 -0
  380. package/lib/generates/internal/SwaggerReadonlyArrayEmender.d.ts +0 -9
  381. package/lib/generates/internal/SwaggerReadonlyArrayEmender.js +0 -178
  382. package/lib/generates/internal/SwaggerReadonlyArrayEmender.js.map +0 -1
  383. package/lib/validators/HttpHeadersValidator.d.ts +0 -11
  384. package/lib/validators/HttpHeadersValidator.js +0 -15
  385. package/lib/validators/HttpHeadersValidator.js.map +0 -1
  386. package/lib/validators/HttpQueryValidator.d.ts +0 -10
  387. package/lib/validators/HttpQueryValidator.js +0 -14
  388. package/lib/validators/HttpQueryValidator.js.map +0 -1
  389. package/src/generates/internal/SwaggerReadonlyArrayEmender.ts +0 -264
  390. package/src/validators/HttpHeadersValidator.ts +0 -12
  391. package/src/validators/HttpQueryValidator.ts +0 -11
@@ -1 +1 @@
1
- {"version":3,"file":"NestiaConfigLoader.js","sourceRoot":"","sources":["../../../src/executable/internal/NestiaConfigLoader.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,uCAAwD;AACxD,4CAAoB;AACpB,gDAAwB;AACxB,6BAAoC;AAGpC,mFAAgF;AAChF,+DAA4D;AAC5D,2DAAwD;AAExD,IAAiB,kBAAkB,CAwblC;AAxbD,WAAiB,kBAAkB;IAOpB,kCAAe,GAAG,CAC7B,OAAe,EACY,EAAE;QAC7B,MAAM,cAAc,GAAG,cAAc,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,OAAO,CAAC,CAAC;QAC9D,IAAI,CAAC,cAAc;YAAE,MAAM,IAAI,KAAK,CAAC,mBAAmB,OAAO,SAAS,CAAC,CAAC;QAC1E,MAAM,QAAQ,GAAG,MAAM,+BAAc,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;QAC3D,OAAO;YACL,GAAG,EAAE;gBACH,eAAe,EACb,QAAO,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,eAAe,CAAA,KAAK,QAAQ;oBAC3C,CAAC,CAAE,QAAQ,CAAC,eAAuC;oBACnD,CAAC,CAAC,EAAE;aACT;SACF,CAAC;IACJ,CAAC,CAAA,CAAC;IAEW,iCAAc,GAAG,CAC5B,IAAY,EACZ,eAAoC,EACV,EAAE;QAC5B,IAAI,YAAE,CAAC,UAAU,CAAC,cAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,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,QAAQ;QACzB,KAAK,KAAK,IAAI;QACd,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,KAAK,CAAC;IAEjC,MAAM,aAAa,GAAG,CAAC,KAAc,EAAqB,EAAE,CAC1D,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC;IAE1E,MAAM,eAAe,GAAG,CACtB,KAAc,EACd,GAAwB,EAChB,EAAE;QACV,IAAI,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,CAAC,GAAG,IAAI,KAAK,CAAC;YAAE,OAAO,EAAE,CAAC;QACtE,MAAM,KAAK,GAAI,KAAiC,CAAC,GAAG,CAAC,CAAC;QACtD,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS;YAAE,OAAO,EAAE,CAAC;QACrD,IAAI,OAAO,KAAK,KAAK,QAAQ;YAAE,OAAO,KAAK,CAAC,IAAI,EAAE,CAAC;QACnD,IAAI,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC;YAAE,OAAO,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,CAAC;QACjE,OAAO,EAAE,CAAC;IACZ,CAAC,CAAC;AACJ,CAAC,EA3bgB,kBAAkB,aAAlB,kBAAkB,GAAlB,kBAAkB,QA2blC"}
@@ -1,6 +1,66 @@
1
+ /**
2
+ * The commands of the `nestia` CLI that run the generators: `sdk`, `swagger`,
3
+ * `e2e`, and `all`.
4
+ *
5
+ * @evidence contracts/common.md#principled-implementation Each command loads the configurations, keeps the ones that can generate what it needs, and runs the application; `swagger` can watch.
6
+ * @evidence contracts/common.md#clear-and-simple-design Four commands over one private runner and two argument readers.
7
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The commands differ only by title, validation, and generator.
8
+ * @evidence contracts/common.md#meaningful-documentation The comment states its purpose.
9
+ * @evidence contracts/portability.md#os-neutral-implementation Project and config arguments remain native pathname strings supplied to NestiaConfigLoader and NestiaSdkWatcher. Those owners resolve files and launch compiler processes; dispatch does not rewrite path case or separators.
10
+ */
1
11
  export declare namespace NestiaSdkCommand {
12
+ /**
13
+ * Runs the generator of the SDK library for every valid configuration.
14
+ *
15
+ * With several configurations, those that cannot generate this output are
16
+ * skipped, and it is an error when none can.
17
+ *
18
+ * @evidence contracts/common.md#principled-implementation The project and configuration files come from the `--project` and `--config` flags with defaults, each flag's value is checked, and the shared runner applies the configurations in order.
19
+ * @evidence contracts/common.md#clear-and-simple-design One binding of the shared runner.
20
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The behavior follows the flags and the configuration.
21
+ * @evidence contracts/common.md#meaningful-documentation The comment states what is generated and the skipping rule.
22
+ * @evidence contracts/portability.md#os-neutral-implementation Project and config arguments remain native pathname strings supplied to NestiaConfigLoader and NestiaSdkWatcher. Those owners resolve files and launch compiler processes; dispatch does not rewrite path case or separators.
23
+ */
2
24
  const sdk: () => Promise<void>;
25
+ /**
26
+ * Runs the generator of the Swagger document, optionally in watch mode for
27
+ * every valid configuration.
28
+ *
29
+ * With several configurations, those that cannot generate this output are
30
+ * skipped, and it is an error when none can.
31
+ *
32
+ * @evidence contracts/common.md#principled-implementation The project and configuration files come from the `--project` and `--config` flags with defaults, each flag's value is checked, and the shared runner applies the configurations in order.
33
+ * @evidence contracts/common.md#clear-and-simple-design One binding of the shared runner.
34
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The behavior follows the flags and the configuration.
35
+ * @evidence contracts/common.md#meaningful-documentation The comment states what is generated and the skipping rule.
36
+ * @evidence contracts/portability.md#os-neutral-implementation Project and config arguments remain native pathname strings supplied to NestiaConfigLoader and NestiaSdkWatcher. Those owners resolve files and launch compiler processes; dispatch does not rewrite path case or separators.
37
+ */
3
38
  const swagger: () => Promise<void>;
39
+ /**
40
+ * Runs the generator of the e2e test functions for every valid configuration.
41
+ *
42
+ * With several configurations, those that cannot generate this output are
43
+ * skipped, and it is an error when none can.
44
+ *
45
+ * @evidence contracts/common.md#principled-implementation The project and configuration files come from the `--project` and `--config` flags with defaults, each flag's value is checked, and the shared runner applies the configurations in order.
46
+ * @evidence contracts/common.md#clear-and-simple-design One binding of the shared runner.
47
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The behavior follows the flags and the configuration.
48
+ * @evidence contracts/common.md#meaningful-documentation The comment states what is generated and the skipping rule.
49
+ * @evidence contracts/portability.md#os-neutral-implementation Project and config arguments remain native pathname strings supplied to NestiaConfigLoader and NestiaSdkWatcher. Those owners resolve files and launch compiler processes; dispatch does not rewrite path case or separators.
50
+ */
4
51
  const e2e: () => Promise<void>;
52
+ /**
53
+ * Runs the generator of everything the configurations ask for for every valid
54
+ * configuration.
55
+ *
56
+ * With several configurations, those that cannot generate this output are
57
+ * skipped, and it is an error when none can.
58
+ *
59
+ * @evidence contracts/common.md#principled-implementation The project and configuration files come from the `--project` and `--config` flags with defaults, each flag's value is checked, and the shared runner applies the configurations in order.
60
+ * @evidence contracts/common.md#clear-and-simple-design One binding of the shared runner.
61
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The behavior follows the flags and the configuration.
62
+ * @evidence contracts/common.md#meaningful-documentation The comment states what is generated and the skipping rule.
63
+ * @evidence contracts/portability.md#os-neutral-implementation Project and config arguments remain native pathname strings supplied to NestiaConfigLoader and NestiaSdkWatcher. Those owners resolve files and launch compiler processes; dispatch does not rewrite path case or separators.
64
+ */
5
65
  const all: () => Promise<void>;
6
66
  }
@@ -13,14 +13,50 @@ exports.NestiaSdkCommand = void 0;
13
13
  const NestiaSdkApplication_1 = require("../../NestiaSdkApplication");
14
14
  const NestiaConfigLoader_1 = require("./NestiaConfigLoader");
15
15
  const NestiaSdkWatcher_1 = require("./NestiaSdkWatcher");
16
+ const NestiaSwaggerWatch_1 = require("./NestiaSwaggerWatch");
17
+ /**
18
+ * The commands of the `nestia` CLI that run the generators: `sdk`, `swagger`,
19
+ * `e2e`, and `all`.
20
+ *
21
+ * @evidence contracts/common.md#principled-implementation Each command loads the configurations, keeps the ones that can generate what it needs, and runs the application; `swagger` can watch.
22
+ * @evidence contracts/common.md#clear-and-simple-design Four commands over one private runner and two argument readers.
23
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The commands differ only by title, validation, and generator.
24
+ * @evidence contracts/common.md#meaningful-documentation The comment states its purpose.
25
+ * @evidence contracts/portability.md#os-neutral-implementation Project and config arguments remain native pathname strings supplied to NestiaConfigLoader and NestiaSdkWatcher. Those owners resolve files and launch compiler processes; dispatch does not rewrite path case or separators.
26
+ */
16
27
  var NestiaSdkCommand;
17
28
  (function (NestiaSdkCommand) {
29
+ /**
30
+ * Runs the generator of the SDK library for every valid configuration.
31
+ *
32
+ * With several configurations, those that cannot generate this output are
33
+ * skipped, and it is an error when none can.
34
+ *
35
+ * @evidence contracts/common.md#principled-implementation The project and configuration files come from the `--project` and `--config` flags with defaults, each flag's value is checked, and the shared runner applies the configurations in order.
36
+ * @evidence contracts/common.md#clear-and-simple-design One binding of the shared runner.
37
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The behavior follows the flags and the configuration.
38
+ * @evidence contracts/common.md#meaningful-documentation The comment states what is generated and the skipping rule.
39
+ * @evidence contracts/portability.md#os-neutral-implementation Project and config arguments remain native pathname strings supplied to NestiaConfigLoader and NestiaSdkWatcher. Those owners resolve files and launch compiler processes; dispatch does not rewrite path case or separators.
40
+ */
18
41
  NestiaSdkCommand.sdk = () => main({
19
42
  title: "SDK library",
20
43
  generate: (app) => app.sdk(),
21
44
  validate: (config) => !!config.output,
22
45
  solution: "configure INestiaConfig.output property.",
23
46
  });
47
+ /**
48
+ * Runs the generator of the Swagger document, optionally in watch mode for
49
+ * every valid configuration.
50
+ *
51
+ * With several configurations, those that cannot generate this output are
52
+ * skipped, and it is an error when none can.
53
+ *
54
+ * @evidence contracts/common.md#principled-implementation The project and configuration files come from the `--project` and `--config` flags with defaults, each flag's value is checked, and the shared runner applies the configurations in order.
55
+ * @evidence contracts/common.md#clear-and-simple-design One binding of the shared runner.
56
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The behavior follows the flags and the configuration.
57
+ * @evidence contracts/common.md#meaningful-documentation The comment states what is generated and the skipping rule.
58
+ * @evidence contracts/portability.md#os-neutral-implementation Project and config arguments remain native pathname strings supplied to NestiaConfigLoader and NestiaSdkWatcher. Those owners resolve files and launch compiler processes; dispatch does not rewrite path case or separators.
59
+ */
24
60
  NestiaSdkCommand.swagger = () => main({
25
61
  title: "Swagger Document",
26
62
  generate: (app) => app.swagger(),
@@ -28,6 +64,18 @@ var NestiaSdkCommand;
28
64
  solution: "configure INestiaConfig.swagger property.",
29
65
  watch: hasFlagArgument("watch"),
30
66
  });
67
+ /**
68
+ * Runs the generator of the e2e test functions for every valid configuration.
69
+ *
70
+ * With several configurations, those that cannot generate this output are
71
+ * skipped, and it is an error when none can.
72
+ *
73
+ * @evidence contracts/common.md#principled-implementation The project and configuration files come from the `--project` and `--config` flags with defaults, each flag's value is checked, and the shared runner applies the configurations in order.
74
+ * @evidence contracts/common.md#clear-and-simple-design One binding of the shared runner.
75
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The behavior follows the flags and the configuration.
76
+ * @evidence contracts/common.md#meaningful-documentation The comment states what is generated and the skipping rule.
77
+ * @evidence contracts/portability.md#os-neutral-implementation Project and config arguments remain native pathname strings supplied to NestiaConfigLoader and NestiaSdkWatcher. Those owners resolve files and launch compiler processes; dispatch does not rewrite path case or separators.
78
+ */
31
79
  NestiaSdkCommand.e2e = () => main({
32
80
  title: "E2E Functions",
33
81
  generate: (app) => app.e2e(),
@@ -39,6 +87,19 @@ var NestiaSdkCommand;
39
87
  " - INestiaConfig.e2e",
40
88
  ].join("\n"),
41
89
  });
90
+ /**
91
+ * Runs the generator of everything the configurations ask for for every valid
92
+ * configuration.
93
+ *
94
+ * With several configurations, those that cannot generate this output are
95
+ * skipped, and it is an error when none can.
96
+ *
97
+ * @evidence contracts/common.md#principled-implementation The project and configuration files come from the `--project` and `--config` flags with defaults, each flag's value is checked, and the shared runner applies the configurations in order.
98
+ * @evidence contracts/common.md#clear-and-simple-design One binding of the shared runner.
99
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The behavior follows the flags and the configuration.
100
+ * @evidence contracts/common.md#meaningful-documentation The comment states what is generated and the skipping rule.
101
+ * @evidence contracts/portability.md#os-neutral-implementation Project and config arguments remain native pathname strings supplied to NestiaConfigLoader and NestiaSdkWatcher. Those owners resolve files and launch compiler processes; dispatch does not rewrite path case or separators.
102
+ */
42
103
  NestiaSdkCommand.all = () => main({
43
104
  title: "everything",
44
105
  generate: (app) => app.all(),
@@ -78,13 +139,44 @@ var NestiaSdkCommand;
78
139
  yield props.generate(app);
79
140
  }
80
141
  });
81
- if (props.watch === true)
142
+ if (props.watch === true) {
143
+ let generation;
144
+ let opening;
145
+ let cancellation;
82
146
  return NestiaSdkWatcher_1.NestiaSdkWatcher.watch({
83
147
  configFile,
84
- configurations,
85
- generate,
148
+ configurations: () => __awaiter(this, void 0, void 0, function* () {
149
+ cancellation = new AbortController();
150
+ opening = NestiaSwaggerWatch_1.NestiaSwaggerWatch.open({
151
+ configFile,
152
+ projectFile: project,
153
+ signal: cancellation.signal,
154
+ });
155
+ generation = yield opening;
156
+ return generation.configurations;
157
+ }),
158
+ generate: () => __awaiter(this, void 0, void 0, function* () {
159
+ if (!generation)
160
+ throw new Error("Swagger watch generation was not prepared.");
161
+ yield generation.generate();
162
+ }),
163
+ finalize: () => __awaiter(this, void 0, void 0, function* () {
164
+ cancellation === null || cancellation === void 0 ? void 0 : cancellation.abort();
165
+ try {
166
+ yield opening === null || opening === void 0 ? void 0 : opening.then((prepared) => prepared.close(), (error) => {
167
+ if (error.name !== "AbortError")
168
+ throw error;
169
+ });
170
+ }
171
+ finally {
172
+ generation = undefined;
173
+ opening = undefined;
174
+ cancellation = undefined;
175
+ }
176
+ }),
86
177
  projectFile: project,
87
178
  });
179
+ }
88
180
  yield generate(yield configurations());
89
181
  });
90
182
  const getFileArgument = (props) => {
@@ -1 +1 @@
1
- {"version":3,"file":"NestiaSdkCommand.js","sourceRoot":"","sources":["../../../src/executable/internal/NestiaSdkCommand.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,qEAAkE;AAClE,6DAA0D;AAC1D,yDAAsD;AAEtD,IAAiB,gBAAgB,CAyHhC;AAzHD,WAAiB,gBAAgB;IAClB,oBAAG,GAAG,GAAG,EAAE,CACtB,IAAI,CAAC;QACH,KAAK,EAAE,aAAa;QACpB,QAAQ,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,GAAG,EAAE;QAC5B,QAAQ,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM;QACrC,QAAQ,EAAE,0CAA0C;KACrD,CAAC,CAAC;IAEQ,wBAAO,GAAG,GAAG,EAAE,CAC1B,IAAI,CAAC;QACH,KAAK,EAAE,kBAAkB;QACzB,QAAQ,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,OAAO,EAAE;QAChC,QAAQ,EAAE,CAAC,MAAM,EAAE,EAAE,kBAAC,CAAC,EAAC,MAAA,MAAM,CAAC,OAAO,0CAAE,MAAM,CAAA,GAAA;QAC9C,QAAQ,EAAE,2CAA2C;QACrD,KAAK,EAAE,eAAe,CAAC,OAAO,CAAC;KAChC,CAAC,CAAC;IAEQ,oBAAG,GAAG,GAAG,EAAE,CACtB,IAAI,CAAC;QACH,KAAK,EAAE,eAAe;QACtB,QAAQ,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,GAAG,EAAE;QAC5B,QAAQ,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG;QAClC,QAAQ,EAAE;YACR,2BAA2B;YAC3B,EAAE;YACF,0BAA0B;YAC1B,uBAAuB;SACxB,CAAC,IAAI,CAA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CAAC,CAAC,CAAC;QACjD,IAAI,IAAI,KAAK,SAAS,IAAI,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC;YAC7C,MAAM,IAAI,KAAK,CAAC,GAAG,KAAK,CAAC,IAAI,wBAAwB,CAAC,CAAC;QACzD,IAAI,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,SAAS,CAAC,KAAK,KAAK;YAC1C,MAAM,IAAI,KAAK,CAAC,GAAG,KAAK,CAAC,IAAI,iBAAiB,KAAK,CAAC,SAAS,OAAO,CAAC,CAAC;QACxE,OAAO,IAAI,CAAC;IACd,CAAC,CAAC;IAEF,MAAM,eAAe,GAAG,CAAC,IAAY,EAAW,EAAE,CAChD,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,KAAK,KAAK,IAAI,EAAE,CAAC,CAAC;AAC7D,CAAC,EA3MgB,gBAAgB,aAAhB,gBAAgB,GAAhB,gBAAgB,QA2MhC"}
@@ -1,10 +1,91 @@
1
1
  import { INestiaConfig } from "../../INestiaConfig";
2
+ /**
3
+ * Regenerates the Swagger document when the sources or the configuration
4
+ * change.
5
+ *
6
+ * @evidence contracts/common.md#principled-implementation A session watches the directories of the inputs and the configuration files, ignores the outputs and dependency directories, debounces changes, and queues a change that arrives during a generation.
7
+ * @evidence contracts/common.md#clear-and-simple-design One public function over a session class and private path helpers.
8
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The watchers are installed before each generation so no change between generation and watching is lost, and every watcher is closed on stop.
9
+ * @evidence contracts/common.md#meaningful-documentation The comment states its purpose.
10
+ * @evidence contracts/portability.md#os-neutral-implementation One non-recursive `fs.watch` is installed per directory, which every supported platform provides, in place of the `recursive` option that older Linux releases lack. The event's file name can be missing on some platforms and the directory then stands for the change, and a rename without an extension is read as a possible directory change because platforms report directory creation as a rename. Locations are compared by filesystem identity: every ignored path and every event target is resolved to the real path of its nearest existing ancestor, which carries the case and links the volume keeps, so no operating-system name decides a case policy. Remaining assumptions: `fs.watch` event semantics differ per platform, and only SIGINT and SIGTERM are handled, so an abrupt termination ends the watchers with the process.
11
+ * efficient algorithms: Each regeneration walks the watched trees once, one `readdir` and one real-path resolution per directory, and does so twice, before the generation so no edit is lost and after it to see what it wrote, so the cost grows with the number of watched directories and their entries and repeats for every debounced regeneration. A watched directory can appear at any time, so an incremental plan would still have to rescan, and the full rebuild is kept because regeneration is itself far costlier than a scan.
12
+ * reuse equivalent work: Changes inside the debounce window collapse into one regeneration and a change during a running generation sets one pending reason, so equivalent triggers share a run. Each run reloads the configurations because the configuration file is an input, so no result is reused across runs.
13
+ * bound retention and release resources: The session owns one watcher per planned directory, one debounce timer and one pending reason; sync, errors and stop release those handles. Its optional finalizer releases caller-owned generation resources on success, failure and stop. CLI regeneration loads configurations/controllers inside one disposable child whose temporary outputs and module realm end after that generation. Arbitrary programmatic callbacks retain their own module caches and resources; the scheduler cannot release caller-owned caches or objects retained outside their callbacks.
14
+ */
2
15
  export declare namespace NestiaSdkWatcher {
16
+ /**
17
+ * The input of the watcher: the configuration file, the configuration loader,
18
+ * the generator, and the project file.
19
+ *
20
+ * @evidence contracts/common.md#principled-implementation The record holds the loaders and the generator the session calls.
21
+ * @evidence contracts/common.md#clear-and-simple-design Native configuration/project paths sit beside the configuration, generation and optional finalization callbacks that own their respective phases.
22
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.
23
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the type describes and the meaning of its members.
24
+ * @evidence contracts/portability.md#os-neutral-implementation The two file fields are native paths of the project, resolved with `path.resolve` before any comparison.
25
+ * efficient algorithms: The record has no computation.
26
+ * reuse equivalent work: The record coordinates no work.
27
+ * bound retention and release resources: The record owns no handle or task; the session that holds it owns the resources.
28
+ */
3
29
  interface IProps {
4
30
  configFile: string;
31
+ /**
32
+ * Loads the current configurations; it is called again at every
33
+ * regeneration so a changed file is read.
34
+ *
35
+ * @evidence contracts/common.md#principled-implementation The loader is a function, not a value, because the configuration file itself is watched.
36
+ * @evidence contracts/common.md#clear-and-simple-design One callback.
37
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts It is caller code.
38
+ * @evidence contracts/common.md#meaningful-documentation The comment states when it is called.
39
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation A caller callback owns no filesystem or process access here; the loader it wraps owns those decisions.
40
+ * efficient algorithms: The signature performs no computation.
41
+ * reuse equivalent work: The signature coordinates nothing; the session decides when to call it.
42
+ * bound retention and release resources: The signature retains nothing; the session drops the returned configurations after each run.
43
+ */
5
44
  configurations: () => Promise<INestiaConfig[]>;
45
+ /**
46
+ * Runs the generation for the loaded configurations.
47
+ *
48
+ * @evidence contracts/common.md#principled-implementation The watcher only schedules the call and reports its errors.
49
+ * @evidence contracts/common.md#clear-and-simple-design One callback.
50
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts It is caller code.
51
+ * @evidence contracts/common.md#meaningful-documentation The comment states what it does.
52
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation A caller callback owns no filesystem or process access here; the generator it wraps owns those decisions.
53
+ * efficient algorithms: The signature performs no computation.
54
+ * reuse equivalent work: The signature coordinates nothing; the session serializes its calls.
55
+ * bound retention and release resources: The signature retains nothing.
56
+ */
6
57
  generate: (configurations: INestiaConfig[]) => Promise<void>;
58
+ /**
59
+ * Releases caller-owned per-generation resources after success or failure,
60
+ * and when the session is stopped. It may overlap an in-flight generation
61
+ * during stop, so its implementation must make release idempotent.
62
+ *
63
+ * @evidence contracts/common.md#principled-implementation The hook lets the caller release generation-owned resources on completion, failure and stop, including overlap with an active generation.
64
+ * @evidence contracts/common.md#clear-and-simple-design One optional finalizer avoids making the scheduler depend on a particular generator resource representation.
65
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts Resource release is delegated to its actual owner rather than changing foreign caches or callbacks.
66
+ * @evidence contracts/common.md#meaningful-documentation The comment states call timing and the idempotency required when stop overlaps work.
67
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation This callback signature exposes no native path or process representation; the caller’s finalizer owns that boundary.
68
+ * efficient algorithms: The signature performs no release computation; its caller supplies the implementation.
69
+ * reuse equivalent work: The signature shares no results; the session determines finalization timing.
70
+ * bound retention and release resources: The signature owns no retained state or handle; the session joins the caller’s release operation and the caller owns external resources.
71
+ */
72
+ finalize?: () => Promise<void>;
7
73
  projectFile: string;
8
74
  }
75
+ /**
76
+ * Starts the watch session, generates once, and never resolves until the
77
+ * process ends.
78
+ *
79
+ * The session closes its watchers and exits on SIGINT and SIGTERM.
80
+ *
81
+ * @evidence contracts/common.md#principled-implementation The first generation runs before the promise that never settles, and a failed generation is printed with its causes and does not stop the session.
82
+ * @evidence contracts/common.md#clear-and-simple-design One function that creates the session and blocks.
83
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The watchers are released by the signal handlers.
84
+ * @evidence contracts/common.md#meaningful-documentation The comment states the blocking and the signals.
85
+ * @evidence contracts/portability.md#os-neutral-implementation The signal handlers are registered with `process.once` for SIGINT and SIGTERM and exit with status 0 after closing the watchers; SIGINT is delivered on every platform while Windows never delivers SIGTERM, so a termination request there ends the process without the handler.
86
+ * efficient algorithms: The function creates one session and awaits one generation; its cost is that of the first regeneration described by the namespace.
87
+ * reuse equivalent work: The first generation is the only work the function itself requests, and later regenerations are coordinated by the session, which collapses equivalent triggers.
88
+ * bound retention and release resources: The returned promise never settles by design, so the session lives until the process ends; the handlers release its watchers and timer on SIGINT and SIGTERM, and the process exit releases them otherwise.
89
+ */
9
90
  const watch: (props: IProps) => Promise<void>;
10
91
  }
@@ -14,10 +14,38 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
15
  exports.NestiaSdkWatcher = void 0;
16
16
  const fs_1 = __importDefault(require("fs"));
17
- const glob_1 = require("glob");
18
17
  const path_1 = __importDefault(require("path"));
18
+ const SourceFinder_1 = require("../../utils/SourceFinder");
19
+ /**
20
+ * Regenerates the Swagger document when the sources or the configuration
21
+ * change.
22
+ *
23
+ * @evidence contracts/common.md#principled-implementation A session watches the directories of the inputs and the configuration files, ignores the outputs and dependency directories, debounces changes, and queues a change that arrives during a generation.
24
+ * @evidence contracts/common.md#clear-and-simple-design One public function over a session class and private path helpers.
25
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The watchers are installed before each generation so no change between generation and watching is lost, and every watcher is closed on stop.
26
+ * @evidence contracts/common.md#meaningful-documentation The comment states its purpose.
27
+ * @evidence contracts/portability.md#os-neutral-implementation One non-recursive `fs.watch` is installed per directory, which every supported platform provides, in place of the `recursive` option that older Linux releases lack. The event's file name can be missing on some platforms and the directory then stands for the change, and a rename without an extension is read as a possible directory change because platforms report directory creation as a rename. Locations are compared by filesystem identity: every ignored path and every event target is resolved to the real path of its nearest existing ancestor, which carries the case and links the volume keeps, so no operating-system name decides a case policy. Remaining assumptions: `fs.watch` event semantics differ per platform, and only SIGINT and SIGTERM are handled, so an abrupt termination ends the watchers with the process.
28
+ * efficient algorithms: Each regeneration walks the watched trees once, one `readdir` and one real-path resolution per directory, and does so twice, before the generation so no edit is lost and after it to see what it wrote, so the cost grows with the number of watched directories and their entries and repeats for every debounced regeneration. A watched directory can appear at any time, so an incremental plan would still have to rescan, and the full rebuild is kept because regeneration is itself far costlier than a scan.
29
+ * reuse equivalent work: Changes inside the debounce window collapse into one regeneration and a change during a running generation sets one pending reason, so equivalent triggers share a run. Each run reloads the configurations because the configuration file is an input, so no result is reused across runs.
30
+ * bound retention and release resources: The session owns one watcher per planned directory, one debounce timer and one pending reason; sync, errors and stop release those handles. Its optional finalizer releases caller-owned generation resources on success, failure and stop. CLI regeneration loads configurations/controllers inside one disposable child whose temporary outputs and module realm end after that generation. Arbitrary programmatic callbacks retain their own module caches and resources; the scheduler cannot release caller-owned caches or objects retained outside their callbacks.
31
+ */
19
32
  var NestiaSdkWatcher;
20
33
  (function (NestiaSdkWatcher) {
34
+ /**
35
+ * Starts the watch session, generates once, and never resolves until the
36
+ * process ends.
37
+ *
38
+ * The session closes its watchers and exits on SIGINT and SIGTERM.
39
+ *
40
+ * @evidence contracts/common.md#principled-implementation The first generation runs before the promise that never settles, and a failed generation is printed with its causes and does not stop the session.
41
+ * @evidence contracts/common.md#clear-and-simple-design One function that creates the session and blocks.
42
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The watchers are released by the signal handlers.
43
+ * @evidence contracts/common.md#meaningful-documentation The comment states the blocking and the signals.
44
+ * @evidence contracts/portability.md#os-neutral-implementation The signal handlers are registered with `process.once` for SIGINT and SIGTERM and exit with status 0 after closing the watchers; SIGINT is delivered on every platform while Windows never delivers SIGTERM, so a termination request there ends the process without the handler.
45
+ * efficient algorithms: The function creates one session and awaits one generation; its cost is that of the first regeneration described by the namespace.
46
+ * reuse equivalent work: The first generation is the only work the function itself requests, and later regenerations are coordinated by the session, which collapses equivalent triggers.
47
+ * bound retention and release resources: The returned promise never settles by design, so the session lives until the process ends; the handlers release its watchers and timer on SIGINT and SIGTERM, and the process exit releases them otherwise.
48
+ */
21
49
  NestiaSdkWatcher.watch = (props) => __awaiter(this, void 0, void 0, function* () {
22
50
  const session = new WatchSession(props);
23
51
  session.registerSignals();
@@ -38,13 +66,24 @@ class WatchSession {
38
66
  registerSignals() {
39
67
  const stop = () => {
40
68
  this.dispose();
41
- process.exit(0);
69
+ void (() => __awaiter(this, void 0, void 0, function* () {
70
+ var _a, _b;
71
+ try {
72
+ yield (_b = (_a = this.props).finalize) === null || _b === void 0 ? void 0 : _b.call(_a);
73
+ process.exit(0);
74
+ }
75
+ catch (error) {
76
+ printError(error);
77
+ process.exit(1);
78
+ }
79
+ }))();
42
80
  };
43
81
  process.once("SIGINT", stop);
44
82
  process.once("SIGTERM", stop);
45
83
  }
46
84
  regenerate(reason) {
47
85
  return __awaiter(this, void 0, void 0, function* () {
86
+ var _a, _b;
48
87
  if (this.stopped)
49
88
  return;
50
89
  if (this.running) {
@@ -52,35 +91,60 @@ class WatchSession {
52
91
  return;
53
92
  }
54
93
  this.running = true;
55
- let nextReason = reason;
56
- do {
57
- const current = nextReason;
58
- nextReason = null;
59
- this.pending = null;
60
- let configurations = [];
61
- try {
62
- if (current === "initial generation")
63
- console.log("Starting nestia swagger watch mode");
64
- else
65
- console.log(`Change detected (${current}); regenerating swagger`);
66
- configurations = yield this.props.configurations();
67
- // Watchers must be live before artifacts are written: consumers react
68
- // to the artifact appearing, and an edit arriving between the write
69
- // and a later watcher installation would be lost forever. Changes
70
- // during generation queue through `pending`.
71
- yield this.refresh(configurations);
72
- yield this.props.generate(configurations);
73
- yield this.refresh(configurations);
74
- console.log(`Watching ${this.watchers.size} directories. Press Ctrl+C to stop.`);
75
- }
76
- catch (error) {
77
- yield this.refresh(configurations);
78
- console.error("Nestia swagger watch generation failed:");
79
- printError(error);
80
- }
81
- nextReason = this.pending;
82
- } while (nextReason !== null && !this.stopped);
83
- this.running = false;
94
+ try {
95
+ let nextReason = reason;
96
+ do {
97
+ const current = nextReason;
98
+ nextReason = null;
99
+ this.pending = null;
100
+ let configurations = [];
101
+ let generationError;
102
+ try {
103
+ if (current === "initial generation")
104
+ console.log("Starting nestia swagger watch mode");
105
+ else
106
+ console.log(`Change detected (${current}); regenerating swagger`);
107
+ configurations = yield this.props.configurations();
108
+ // Watchers must be live before artifacts are written: consumers react
109
+ // to the artifact appearing, and an edit arriving between the write
110
+ // and a later watcher installation would be lost forever. Changes
111
+ // during generation queue through `pending`.
112
+ yield this.refresh(configurations);
113
+ yield this.props.generate(configurations);
114
+ yield this.refresh(configurations);
115
+ console.log(`Watching ${this.watchers.size} directories. Press Ctrl+C to stop.`);
116
+ }
117
+ catch (error) {
118
+ generationError = error;
119
+ if (!this.stopped) {
120
+ console.error("Nestia swagger watch generation failed:");
121
+ printError(error);
122
+ try {
123
+ yield this.refresh(configurations);
124
+ }
125
+ catch (refreshError) {
126
+ console.error("Nestia swagger watch refresh failed:");
127
+ printError(refreshError);
128
+ }
129
+ }
130
+ }
131
+ finally {
132
+ try {
133
+ yield (_b = (_a = this.props).finalize) === null || _b === void 0 ? void 0 : _b.call(_a);
134
+ }
135
+ catch (error) {
136
+ if (!this.stopped && error !== generationError) {
137
+ console.error("Nestia swagger watch cleanup failed:");
138
+ printError(error);
139
+ }
140
+ }
141
+ }
142
+ nextReason = this.pending;
143
+ } while (nextReason !== null && !this.stopped);
144
+ }
145
+ finally {
146
+ this.running = false;
147
+ }
84
148
  });
85
149
  }
86
150
  schedule(reason) {
@@ -95,6 +159,8 @@ class WatchSession {
95
159
  }
96
160
  refresh(configurations) {
97
161
  return __awaiter(this, void 0, void 0, function* () {
162
+ if (this.stopped)
163
+ return;
98
164
  const next = yield collectWatchPlan({
99
165
  configurations,
100
166
  configFile: this.props.configFile,
@@ -112,6 +178,8 @@ class WatchSession {
112
178
  });
113
179
  }
114
180
  sync(next) {
181
+ if (this.stopped)
182
+ return;
115
183
  for (const [directory, watcher] of this.watchers)
116
184
  if (next.has(directory) === false) {
117
185
  watcher.close();
@@ -168,7 +236,7 @@ const collectWatchPlan = (props) => __awaiter(void 0, void 0, void 0, function*
168
236
  ignored.add(target);
169
237
  }
170
238
  return {
171
- ignored: [...ignored],
239
+ ignored: [...ignored].map(canonical),
172
240
  targets: [...targets],
173
241
  };
174
242
  });
@@ -198,8 +266,8 @@ const patternTargets = (pattern) => __awaiter(void 0, void 0, void 0, function*
198
266
  const root = staticRoot(pattern);
199
267
  if (fs_1.default.existsSync(root))
200
268
  output.add(root);
201
- for (const match of yield (0, glob_1.glob)(pattern))
202
- output.add(path_1.default.resolve(match));
269
+ for (const match of yield SourceFinder_1.SourceFinder.expand(pattern))
270
+ output.add(match);
203
271
  }
204
272
  return [...output];
205
273
  });
@@ -268,15 +336,31 @@ const shouldReact = (props) => {
268
336
  return true;
269
337
  return props.event === "rename" && ext.length === 0;
270
338
  };
271
- const shouldIgnore = (location, ignored) => ignored.some((elem) => isSameOrInside(location, elem));
272
- const isSameOrInside = (child, parent) => {
273
- const left = comparable(child);
274
- const right = comparable(parent);
275
- return left === right || left.startsWith(`${right}${path_1.default.sep}`);
339
+ // `ignored` holds canonical paths, see `canonical`.
340
+ const shouldIgnore = (location, ignored) => {
341
+ const target = canonical(location);
342
+ return ignored.some((elem) => target === elem || target.startsWith(`${elem}${path_1.default.sep}`));
276
343
  };
277
- const comparable = (location) => {
344
+ // The filesystem decides which spellings name one location, so the nearest
345
+ // existing ancestor is resolved to its real path, which holds the case and the
346
+ // links the filesystem keeps, and the part that does not exist yet is appended
347
+ // as written. An operating-system name says nothing about the case policy of a
348
+ // volume, which a mount or a directory may set apart from its neighbors.
349
+ const canonical = (location) => {
278
350
  const resolved = path_1.default.resolve(location);
279
- return process.platform === "win32" ? resolved.toLowerCase() : resolved;
351
+ const rest = [];
352
+ for (let current = resolved;;) {
353
+ try {
354
+ return path_1.default.join(fs_1.default.realpathSync.native(current), ...[...rest].reverse());
355
+ }
356
+ catch (_a) {
357
+ const parent = path_1.default.dirname(current);
358
+ if (parent === current)
359
+ return resolved;
360
+ rest.push(path_1.default.basename(current));
361
+ current = parent;
362
+ }
363
+ }
280
364
  };
281
365
  const staticRoot = (pattern) => {
282
366
  const absolute = path_1.default.resolve(pattern);