@nestia/sdk 14.0.1 → 14.0.3

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 (377) hide show
  1. package/assets/bundle/distribute/build-sdk.cjs +28 -0
  2. package/assets/bundle/distribute/package.json +6 -2
  3. package/lib/INestiaConfig.d.ts +55 -24
  4. package/lib/NestiaSdkApplication.d.ts +60 -0
  5. package/lib/NestiaSdkApplication.js +63 -5
  6. package/lib/NestiaSdkApplication.js.map +1 -1
  7. package/lib/NestiaSwaggerComposer.d.ts +21 -0
  8. package/lib/NestiaSwaggerComposer.js +21 -3
  9. package/lib/NestiaSwaggerComposer.js.map +1 -1
  10. package/lib/analyses/AccessorAnalyzer.d.ts +26 -0
  11. package/lib/analyses/AccessorAnalyzer.js +26 -0
  12. package/lib/analyses/AccessorAnalyzer.js.map +1 -1
  13. package/lib/analyses/ConfigAnalyzer.d.ts +41 -0
  14. package/lib/analyses/ConfigAnalyzer.js +57 -80
  15. package/lib/analyses/ConfigAnalyzer.js.map +1 -1
  16. package/lib/analyses/ImportAnalyzer.d.ts +25 -0
  17. package/lib/analyses/ImportAnalyzer.js +25 -0
  18. package/lib/analyses/ImportAnalyzer.js.map +1 -1
  19. package/lib/analyses/ParameterNameAnalyzer.d.ts +24 -0
  20. package/lib/analyses/ParameterNameAnalyzer.js +15 -0
  21. package/lib/analyses/ParameterNameAnalyzer.js.map +1 -1
  22. package/lib/analyses/PathAnalyzer.d.ts +63 -1
  23. package/lib/analyses/PathAnalyzer.js +54 -9
  24. package/lib/analyses/PathAnalyzer.js.map +1 -1
  25. package/lib/analyses/ReflectControllerAnalyzer.d.ts +32 -0
  26. package/lib/analyses/ReflectControllerAnalyzer.js +22 -0
  27. package/lib/analyses/ReflectControllerAnalyzer.js.map +1 -1
  28. package/lib/analyses/ReflectHttpOperationAnalyzer.d.ts +29 -0
  29. package/lib/analyses/ReflectHttpOperationAnalyzer.js +28 -17
  30. package/lib/analyses/ReflectHttpOperationAnalyzer.js.map +1 -1
  31. package/lib/analyses/ReflectHttpOperationExceptionAnalyzer.d.ts +31 -0
  32. package/lib/analyses/ReflectHttpOperationExceptionAnalyzer.js +21 -0
  33. package/lib/analyses/ReflectHttpOperationExceptionAnalyzer.js.map +1 -1
  34. package/lib/analyses/ReflectHttpOperationParameterAnalyzer.d.ts +31 -0
  35. package/lib/analyses/ReflectHttpOperationParameterAnalyzer.js +21 -0
  36. package/lib/analyses/ReflectHttpOperationParameterAnalyzer.js.map +1 -1
  37. package/lib/analyses/ReflectHttpOperationResponseAnalyzer.d.ts +32 -0
  38. package/lib/analyses/ReflectHttpOperationResponseAnalyzer.js +22 -0
  39. package/lib/analyses/ReflectHttpOperationResponseAnalyzer.js.map +1 -1
  40. package/lib/analyses/ReflectMcpOperationAnalyzer.d.ts +29 -0
  41. package/lib/analyses/ReflectMcpOperationAnalyzer.js +30 -9
  42. package/lib/analyses/ReflectMcpOperationAnalyzer.js.map +1 -1
  43. package/lib/analyses/ReflectMetadataAnalyzer.d.ts +47 -0
  44. package/lib/analyses/ReflectMetadataAnalyzer.js +47 -0
  45. package/lib/analyses/ReflectMetadataAnalyzer.js.map +1 -1
  46. package/lib/analyses/ReflectWebSocketOperationAnalyzer.d.ts +29 -0
  47. package/lib/analyses/ReflectWebSocketOperationAnalyzer.js +22 -5
  48. package/lib/analyses/ReflectWebSocketOperationAnalyzer.js.map +1 -1
  49. package/lib/analyses/SecurityAnalyzer.d.ts +15 -0
  50. package/lib/analyses/SecurityAnalyzer.js +15 -0
  51. package/lib/analyses/SecurityAnalyzer.js.map +1 -1
  52. package/lib/analyses/SwaggerExampleAnalyzer.d.ts +16 -0
  53. package/lib/analyses/SwaggerExampleAnalyzer.js +16 -0
  54. package/lib/analyses/SwaggerExampleAnalyzer.js.map +1 -1
  55. package/lib/analyses/TypedHttpRouteAnalyzer.d.ts +41 -3
  56. package/lib/analyses/TypedHttpRouteAnalyzer.js +172 -157
  57. package/lib/analyses/TypedHttpRouteAnalyzer.js.map +1 -1
  58. package/lib/analyses/TypedMcpRouteAnalyzer.d.ts +29 -0
  59. package/lib/analyses/TypedMcpRouteAnalyzer.js +152 -20
  60. package/lib/analyses/TypedMcpRouteAnalyzer.js.map +1 -1
  61. package/lib/analyses/TypedWebSocketRouteAnalyzer.d.ts +19 -0
  62. package/lib/analyses/TypedWebSocketRouteAnalyzer.js +19 -0
  63. package/lib/analyses/TypedWebSocketRouteAnalyzer.js.map +1 -1
  64. package/lib/decorators/OperationMetadata.d.ts +6 -0
  65. package/lib/decorators/OperationMetadata.js +6 -0
  66. package/lib/decorators/OperationMetadata.js.map +1 -1
  67. package/lib/executable/internal/CommandParser.d.ts +19 -0
  68. package/lib/executable/internal/CommandParser.js +19 -0
  69. package/lib/executable/internal/CommandParser.js.map +1 -1
  70. package/lib/executable/internal/NestiaConfigLoader.d.ts +56 -0
  71. package/lib/executable/internal/NestiaConfigLoader.js +48 -42
  72. package/lib/executable/internal/NestiaConfigLoader.js.map +1 -1
  73. package/lib/executable/internal/NestiaSdkCommand.d.ts +60 -0
  74. package/lib/executable/internal/NestiaSdkCommand.js +95 -3
  75. package/lib/executable/internal/NestiaSdkCommand.js.map +1 -1
  76. package/lib/executable/internal/NestiaSdkWatcher.d.ts +81 -0
  77. package/lib/executable/internal/NestiaSdkWatcher.js +122 -38
  78. package/lib/executable/internal/NestiaSdkWatcher.js.map +1 -1
  79. package/lib/executable/internal/NestiaSwaggerWatch.d.ts +80 -0
  80. package/lib/executable/internal/NestiaSwaggerWatch.js +308 -0
  81. package/lib/executable/internal/NestiaSwaggerWatch.js.map +1 -0
  82. package/lib/factories/ExpressionFactory.d.ts +17 -2
  83. package/lib/factories/ExpressionFactory.js +17 -2
  84. package/lib/factories/ExpressionFactory.js.map +1 -1
  85. package/lib/factories/IdentifierFactory.d.ts +24 -0
  86. package/lib/factories/IdentifierFactory.js +24 -0
  87. package/lib/factories/IdentifierFactory.js.map +1 -1
  88. package/lib/factories/LiteralFactory.d.ts +22 -4
  89. package/lib/factories/LiteralFactory.js +30 -10
  90. package/lib/factories/LiteralFactory.js.map +1 -1
  91. package/lib/factories/StatementFactory.d.ts +28 -1
  92. package/lib/factories/StatementFactory.js +28 -1
  93. package/lib/factories/StatementFactory.js.map +1 -1
  94. package/lib/factories/TypeFactory.d.ts +24 -0
  95. package/lib/factories/TypeFactory.js +15 -0
  96. package/lib/factories/TypeFactory.js.map +1 -1
  97. package/lib/generates/CloneGenerator.d.ts +22 -0
  98. package/lib/generates/CloneGenerator.js +26 -5
  99. package/lib/generates/CloneGenerator.js.map +1 -1
  100. package/lib/generates/E2eGenerator.d.ts +19 -0
  101. package/lib/generates/E2eGenerator.js +19 -0
  102. package/lib/generates/E2eGenerator.js.map +1 -1
  103. package/lib/generates/SdkGenerator.d.ts +38 -0
  104. package/lib/generates/SdkGenerator.js +40 -2
  105. package/lib/generates/SdkGenerator.js.map +1 -1
  106. package/lib/generates/SwaggerGenerator.d.ts +36 -6
  107. package/lib/generates/SwaggerGenerator.js +55 -13
  108. package/lib/generates/SwaggerGenerator.js.map +1 -1
  109. package/lib/generates/internal/E2eFileProgrammer.d.ts +19 -0
  110. package/lib/generates/internal/E2eFileProgrammer.js +20 -1
  111. package/lib/generates/internal/E2eFileProgrammer.js.map +1 -1
  112. package/lib/generates/internal/FilePrinter.d.ts +43 -0
  113. package/lib/generates/internal/FilePrinter.js +43 -0
  114. package/lib/generates/internal/FilePrinter.js.map +1 -1
  115. package/lib/generates/internal/ImportDictionary.d.ts +92 -2
  116. package/lib/generates/internal/ImportDictionary.js +91 -3
  117. package/lib/generates/internal/ImportDictionary.js.map +1 -1
  118. package/lib/generates/internal/SdkAliasCollection.d.ts +119 -0
  119. package/lib/generates/internal/SdkAliasCollection.js +124 -7
  120. package/lib/generates/internal/SdkAliasCollection.js.map +1 -1
  121. package/lib/generates/internal/SdkDistributionComposer.d.ts +19 -0
  122. package/lib/generates/internal/SdkDistributionComposer.js +98 -59
  123. package/lib/generates/internal/SdkDistributionComposer.js.map +1 -1
  124. package/lib/generates/internal/SdkFileProgrammer.d.ts +18 -0
  125. package/lib/generates/internal/SdkFileProgrammer.js +18 -0
  126. package/lib/generates/internal/SdkFileProgrammer.js.map +1 -1
  127. package/lib/generates/internal/SdkHttpCloneProgrammer.d.ts +29 -0
  128. package/lib/generates/internal/SdkHttpCloneProgrammer.js +33 -0
  129. package/lib/generates/internal/SdkHttpCloneProgrammer.js.map +1 -1
  130. package/lib/generates/internal/SdkHttpCloneReferencer.d.ts +19 -0
  131. package/lib/generates/internal/SdkHttpCloneReferencer.js +78 -25
  132. package/lib/generates/internal/SdkHttpCloneReferencer.js.map +1 -1
  133. package/lib/generates/internal/SdkHttpFunctionProgrammer.d.ts +19 -0
  134. package/lib/generates/internal/SdkHttpFunctionProgrammer.js +19 -0
  135. package/lib/generates/internal/SdkHttpFunctionProgrammer.js.map +1 -1
  136. package/lib/generates/internal/SdkHttpNamespaceProgrammer.d.ts +19 -0
  137. package/lib/generates/internal/SdkHttpNamespaceProgrammer.js +19 -0
  138. package/lib/generates/internal/SdkHttpNamespaceProgrammer.js.map +1 -1
  139. package/lib/generates/internal/SdkHttpParameterProgrammer.d.ts +104 -2
  140. package/lib/generates/internal/SdkHttpParameterProgrammer.js +70 -0
  141. package/lib/generates/internal/SdkHttpParameterProgrammer.js.map +1 -1
  142. package/lib/generates/internal/SdkHttpRouteProgrammer.d.ts +20 -0
  143. package/lib/generates/internal/SdkHttpRouteProgrammer.js +20 -0
  144. package/lib/generates/internal/SdkHttpRouteProgrammer.js.map +1 -1
  145. package/lib/generates/internal/SdkHttpSimulationProgrammer.d.ts +38 -0
  146. package/lib/generates/internal/SdkHttpSimulationProgrammer.js +49 -5
  147. package/lib/generates/internal/SdkHttpSimulationProgrammer.js.map +1 -1
  148. package/lib/generates/internal/SdkImportWizard.d.ts +63 -0
  149. package/lib/generates/internal/SdkImportWizard.js +63 -0
  150. package/lib/generates/internal/SdkImportWizard.js.map +1 -1
  151. package/lib/generates/internal/SdkMcpRouteProgrammer.d.ts +17 -2
  152. package/lib/generates/internal/SdkMcpRouteProgrammer.js +33 -13
  153. package/lib/generates/internal/SdkMcpRouteProgrammer.js.map +1 -1
  154. package/lib/generates/internal/SdkPathTemplate.d.ts +15 -0
  155. package/lib/generates/internal/SdkPathTemplate.js +15 -0
  156. package/lib/generates/internal/SdkPathTemplate.js.map +1 -1
  157. package/lib/generates/internal/SdkRouteDirectory.d.ts +10 -0
  158. package/lib/generates/internal/SdkRouteDirectory.js +10 -0
  159. package/lib/generates/internal/SdkRouteDirectory.js.map +1 -1
  160. package/lib/generates/internal/SdkTypeProgrammer.d.ts +54 -1
  161. package/lib/generates/internal/SdkTypeProgrammer.js +96 -12
  162. package/lib/generates/internal/SdkTypeProgrammer.js.map +1 -1
  163. package/lib/generates/internal/SdkTypeTagProgrammer.d.ts +36 -3
  164. package/lib/generates/internal/SdkTypeTagProgrammer.js +28 -7
  165. package/lib/generates/internal/SdkTypeTagProgrammer.js.map +1 -1
  166. package/lib/generates/internal/SdkWebSocketCloneProgrammer.d.ts +40 -0
  167. package/lib/generates/internal/SdkWebSocketCloneProgrammer.js +149 -142
  168. package/lib/generates/internal/SdkWebSocketCloneProgrammer.js.map +1 -1
  169. package/lib/generates/internal/SdkWebSocketNamespaceProgrammer.d.ts +19 -0
  170. package/lib/generates/internal/SdkWebSocketNamespaceProgrammer.js +19 -0
  171. package/lib/generates/internal/SdkWebSocketNamespaceProgrammer.js.map +1 -1
  172. package/lib/generates/internal/SdkWebSocketParameterProgrammer.d.ts +81 -2
  173. package/lib/generates/internal/SdkWebSocketParameterProgrammer.js +48 -0
  174. package/lib/generates/internal/SdkWebSocketParameterProgrammer.js.map +1 -1
  175. package/lib/generates/internal/SdkWebSocketRouteProgrammer.d.ts +18 -0
  176. package/lib/generates/internal/SdkWebSocketRouteProgrammer.js +18 -0
  177. package/lib/generates/internal/SdkWebSocketRouteProgrammer.js.map +1 -1
  178. package/lib/generates/internal/SwaggerDescriptionComposer.d.ts +42 -0
  179. package/lib/generates/internal/SwaggerDescriptionComposer.js +44 -1
  180. package/lib/generates/internal/SwaggerDescriptionComposer.js.map +1 -1
  181. package/lib/generates/internal/SwaggerOperationComposer.d.ts +18 -0
  182. package/lib/generates/internal/SwaggerOperationComposer.js +18 -0
  183. package/lib/generates/internal/SwaggerOperationComposer.js.map +1 -1
  184. package/lib/generates/internal/SwaggerOperationParameterComposer.d.ts +39 -0
  185. package/lib/generates/internal/SwaggerOperationParameterComposer.js +31 -8
  186. package/lib/generates/internal/SwaggerOperationParameterComposer.js.map +1 -1
  187. package/lib/generates/internal/SwaggerOperationResponseComposer.d.ts +19 -0
  188. package/lib/generates/internal/SwaggerOperationResponseComposer.js +19 -0
  189. package/lib/generates/internal/SwaggerOperationResponseComposer.js.map +1 -1
  190. package/lib/internal/legacy.d.ts +296 -16
  191. package/lib/internal/legacy.js +127 -10
  192. package/lib/internal/legacy.js.map +1 -1
  193. package/lib/structures/INestiaProject.d.ts +10 -0
  194. package/lib/structures/INestiaSdkInput.d.ts +31 -1
  195. package/lib/structures/IOperationMetadata.d.ts +55 -0
  196. package/lib/structures/IReflectController.d.ts +11 -1
  197. package/lib/structures/IReflectHttpOperation.d.ts +11 -1
  198. package/lib/structures/IReflectHttpOperationException.d.ts +10 -0
  199. package/lib/structures/IReflectHttpOperationParameter.d.ts +47 -0
  200. package/lib/structures/IReflectHttpOperationSuccess.d.ts +11 -0
  201. package/lib/structures/IReflectImport.d.ts +10 -0
  202. package/lib/structures/IReflectMcpOperation.d.ts +19 -0
  203. package/lib/structures/IReflectMcpOperationParameter.d.ts +9 -0
  204. package/lib/structures/IReflectOperationError.d.ts +28 -0
  205. package/lib/structures/IReflectOperationError.js +22 -2
  206. package/lib/structures/IReflectOperationError.js.map +1 -1
  207. package/lib/structures/IReflectType.d.ts +9 -0
  208. package/lib/structures/IReflectWebSocketOperation.d.ts +10 -0
  209. package/lib/structures/IReflectWebSocketOperationParameter.d.ts +55 -0
  210. package/lib/structures/ITypedApplication.d.ts +10 -0
  211. package/lib/structures/ITypedHttpRoute.d.ts +10 -0
  212. package/lib/structures/ITypedHttpRouteException.d.ts +10 -0
  213. package/lib/structures/ITypedHttpRouteParameter.d.ts +45 -0
  214. package/lib/structures/ITypedHttpRouteSuccess.d.ts +10 -0
  215. package/lib/structures/ITypedMcpRoute.d.ts +11 -0
  216. package/lib/structures/ITypedWebSocketRoute.d.ts +10 -0
  217. package/lib/transform.d.ts +6 -0
  218. package/lib/transform.js +6 -0
  219. package/lib/transform.js.map +1 -1
  220. package/lib/utils/ArrayUtil.d.ts +31 -1
  221. package/lib/utils/ArrayUtil.js +32 -11
  222. package/lib/utils/ArrayUtil.js.map +1 -1
  223. package/lib/utils/EmittedJavaScriptPatcher.d.ts +20 -0
  224. package/lib/utils/EmittedJavaScriptPatcher.js +65 -46
  225. package/lib/utils/EmittedJavaScriptPatcher.js.map +1 -1
  226. package/lib/utils/FileRetriever.d.ts +29 -0
  227. package/lib/utils/FileRetriever.js +29 -0
  228. package/lib/utils/FileRetriever.js.map +1 -1
  229. package/lib/utils/HttpResponseContentTypeUtil.d.ts +41 -0
  230. package/lib/utils/HttpResponseContentTypeUtil.js +31 -0
  231. package/lib/utils/HttpResponseContentTypeUtil.js.map +1 -1
  232. package/lib/utils/MapUtil.d.ts +64 -1
  233. package/lib/utils/MapUtil.js +24 -3
  234. package/lib/utils/MapUtil.js.map +1 -1
  235. package/lib/utils/PathUtil.d.ts +31 -0
  236. package/lib/utils/PathUtil.js +38 -0
  237. package/lib/utils/PathUtil.js.map +1 -1
  238. package/lib/utils/SdkBundlePath.d.ts +2 -0
  239. package/lib/utils/SdkBundlePath.js +10 -0
  240. package/lib/utils/SdkBundlePath.js.map +1 -0
  241. package/lib/utils/SdkInputFilter.d.ts +31 -0
  242. package/lib/utils/SdkInputFilter.js +115 -0
  243. package/lib/utils/SdkInputFilter.js.map +1 -0
  244. package/lib/utils/SourceFinder.d.ts +35 -0
  245. package/lib/utils/SourceFinder.js +47 -12
  246. package/lib/utils/SourceFinder.js.map +1 -1
  247. package/lib/utils/StringUtil.d.ts +77 -2
  248. package/lib/utils/StringUtil.js +166 -4
  249. package/lib/utils/StringUtil.js.map +1 -1
  250. package/lib/utils/TemporaryDirectory.d.ts +60 -0
  251. package/lib/utils/TemporaryDirectory.js +112 -0
  252. package/lib/utils/TemporaryDirectory.js.map +1 -0
  253. package/lib/utils/TsConfigReader.d.ts +42 -0
  254. package/lib/utils/TsConfigReader.js +98 -14
  255. package/lib/utils/TsConfigReader.js.map +1 -1
  256. package/lib/utils/TtscExecutor.d.ts +23 -1
  257. package/lib/utils/TtscExecutor.js +22 -0
  258. package/lib/utils/TtscExecutor.js.map +1 -1
  259. package/lib/utils/VersioningStrategy.d.ts +27 -2
  260. package/lib/utils/VersioningStrategy.js +30 -9
  261. package/lib/utils/VersioningStrategy.js.map +1 -1
  262. package/lib/validators/TextPlainValidator.d.ts +19 -0
  263. package/lib/validators/TextPlainValidator.js +19 -0
  264. package/lib/validators/TextPlainValidator.js.map +1 -1
  265. package/native/go.mod +1 -1
  266. package/native/go.sum +2 -2
  267. package/native/sdk/register.go +12 -2
  268. package/native/sdk/sdk_metadata_json.go +6 -1
  269. package/native/sdk/sdk_transform.go +393 -403
  270. package/package.json +9 -7
  271. package/src/INestiaConfig.ts +55 -24
  272. package/src/NestiaSdkApplication.ts +66 -7
  273. package/src/NestiaSwaggerComposer.ts +21 -6
  274. package/src/analyses/AccessorAnalyzer.ts +26 -0
  275. package/src/analyses/ConfigAnalyzer.ts +59 -96
  276. package/src/analyses/ImportAnalyzer.ts +25 -0
  277. package/src/analyses/ParameterNameAnalyzer.ts +24 -0
  278. package/src/analyses/PathAnalyzer.ts +63 -11
  279. package/src/analyses/ReflectControllerAnalyzer.ts +32 -0
  280. package/src/analyses/ReflectHttpOperationAnalyzer.ts +32 -10
  281. package/src/analyses/ReflectHttpOperationExceptionAnalyzer.ts +31 -0
  282. package/src/analyses/ReflectHttpOperationParameterAnalyzer.ts +31 -0
  283. package/src/analyses/ReflectHttpOperationResponseAnalyzer.ts +32 -0
  284. package/src/analyses/ReflectMcpOperationAnalyzer.ts +32 -1
  285. package/src/analyses/ReflectMetadataAnalyzer.ts +48 -1
  286. package/src/analyses/ReflectWebSocketOperationAnalyzer.ts +34 -14
  287. package/src/analyses/SecurityAnalyzer.ts +15 -0
  288. package/src/analyses/SwaggerExampleAnalyzer.ts +16 -0
  289. package/src/analyses/TypedHttpRouteAnalyzer.ts +240 -184
  290. package/src/analyses/TypedMcpRouteAnalyzer.ts +180 -20
  291. package/src/analyses/TypedWebSocketRouteAnalyzer.ts +19 -0
  292. package/src/decorators/OperationMetadata.ts +6 -0
  293. package/src/executable/internal/CommandParser.ts +19 -0
  294. package/src/executable/internal/NestiaConfigLoader.ts +66 -50
  295. package/src/executable/internal/NestiaSdkCommand.ts +96 -3
  296. package/src/executable/internal/NestiaSdkWatcher.ts +169 -41
  297. package/src/executable/internal/NestiaSwaggerWatch.ts +359 -0
  298. package/src/factories/ExpressionFactory.ts +17 -2
  299. package/src/factories/IdentifierFactory.ts +24 -0
  300. package/src/factories/LiteralFactory.ts +44 -11
  301. package/src/factories/StatementFactory.ts +28 -1
  302. package/src/factories/TypeFactory.ts +24 -0
  303. package/src/generates/CloneGenerator.ts +26 -5
  304. package/src/generates/E2eGenerator.ts +19 -0
  305. package/src/generates/SdkGenerator.ts +40 -9
  306. package/src/generates/SwaggerGenerator.ts +56 -14
  307. package/src/generates/internal/E2eFileProgrammer.ts +20 -0
  308. package/src/generates/internal/FilePrinter.ts +43 -0
  309. package/src/generates/internal/ImportDictionary.ts +110 -3
  310. package/src/generates/internal/SdkAliasCollection.ts +133 -11
  311. package/src/generates/internal/SdkDistributionComposer.ts +117 -66
  312. package/src/generates/internal/SdkFileProgrammer.ts +18 -0
  313. package/src/generates/internal/SdkHttpCloneProgrammer.ts +55 -0
  314. package/src/generates/internal/SdkHttpCloneReferencer.ts +97 -23
  315. package/src/generates/internal/SdkHttpFunctionProgrammer.ts +19 -0
  316. package/src/generates/internal/SdkHttpNamespaceProgrammer.ts +19 -0
  317. package/src/generates/internal/SdkHttpParameterProgrammer.ts +104 -2
  318. package/src/generates/internal/SdkHttpRouteProgrammer.ts +20 -0
  319. package/src/generates/internal/SdkHttpSimulationProgrammer.ts +72 -5
  320. package/src/generates/internal/SdkImportWizard.ts +63 -0
  321. package/src/generates/internal/SdkMcpRouteProgrammer.ts +38 -18
  322. package/src/generates/internal/SdkPathTemplate.ts +15 -0
  323. package/src/generates/internal/SdkRouteDirectory.ts +10 -0
  324. package/src/generates/internal/SdkTypeProgrammer.ts +118 -14
  325. package/src/generates/internal/SdkTypeTagProgrammer.ts +37 -7
  326. package/src/generates/internal/SdkWebSocketCloneProgrammer.ts +185 -142
  327. package/src/generates/internal/SdkWebSocketNamespaceProgrammer.ts +19 -0
  328. package/src/generates/internal/SdkWebSocketParameterProgrammer.ts +81 -2
  329. package/src/generates/internal/SdkWebSocketRouteProgrammer.ts +18 -0
  330. package/src/generates/internal/SwaggerDescriptionComposer.ts +47 -1
  331. package/src/generates/internal/SwaggerOperationComposer.ts +18 -0
  332. package/src/generates/internal/SwaggerOperationParameterComposer.ts +41 -8
  333. package/src/generates/internal/SwaggerOperationResponseComposer.ts +19 -0
  334. package/src/internal/legacy-augmentation.d.ts +16 -0
  335. package/src/internal/legacy.ts +296 -26
  336. package/src/structures/INestiaProject.ts +10 -0
  337. package/src/structures/INestiaSdkInput.ts +31 -1
  338. package/src/structures/IOperationMetadata.ts +55 -0
  339. package/src/structures/IReflectController.ts +11 -1
  340. package/src/structures/IReflectHttpOperation.ts +11 -1
  341. package/src/structures/IReflectHttpOperationException.ts +10 -0
  342. package/src/structures/IReflectHttpOperationParameter.ts +47 -0
  343. package/src/structures/IReflectHttpOperationSuccess.ts +11 -0
  344. package/src/structures/IReflectImport.ts +10 -0
  345. package/src/structures/IReflectMcpOperation.ts +19 -0
  346. package/src/structures/IReflectMcpOperationParameter.ts +9 -0
  347. package/src/structures/IReflectOperationError.ts +31 -2
  348. package/src/structures/IReflectType.ts +9 -0
  349. package/src/structures/IReflectWebSocketOperation.ts +10 -0
  350. package/src/structures/IReflectWebSocketOperationParameter.ts +55 -0
  351. package/src/structures/ITypedApplication.ts +10 -0
  352. package/src/structures/ITypedHttpRoute.ts +10 -0
  353. package/src/structures/ITypedHttpRouteException.ts +10 -0
  354. package/src/structures/ITypedHttpRouteParameter.ts +45 -0
  355. package/src/structures/ITypedHttpRouteSuccess.ts +10 -0
  356. package/src/structures/ITypedMcpRoute.ts +12 -0
  357. package/src/structures/ITypedWebSocketRoute.ts +10 -0
  358. package/src/transform.ts +6 -0
  359. package/src/utils/ArrayUtil.ts +32 -13
  360. package/src/utils/EmittedJavaScriptPatcher.ts +70 -47
  361. package/src/utils/FileRetriever.ts +29 -0
  362. package/src/utils/HttpResponseContentTypeUtil.ts +41 -0
  363. package/src/utils/MapUtil.ts +68 -3
  364. package/src/utils/PathUtil.ts +38 -0
  365. package/src/utils/SdkBundlePath.ts +11 -0
  366. package/src/utils/SdkInputFilter.ts +108 -0
  367. package/src/utils/SourceFinder.ts +51 -14
  368. package/src/utils/StringUtil.ts +182 -5
  369. package/src/utils/TemporaryDirectory.ts +108 -0
  370. package/src/utils/TsConfigReader.ts +124 -26
  371. package/src/utils/TtscExecutor.ts +23 -1
  372. package/src/utils/VersioningStrategy.ts +37 -14
  373. package/src/validators/TextPlainValidator.ts +19 -0
  374. package/lib/generates/internal/SwaggerReadonlyArrayEmender.d.ts +0 -9
  375. package/lib/generates/internal/SwaggerReadonlyArrayEmender.js +0 -178
  376. package/lib/generates/internal/SwaggerReadonlyArrayEmender.js.map +0 -1
  377. package/src/generates/internal/SwaggerReadonlyArrayEmender.ts +0 -264
@@ -1,11 +1,37 @@
1
1
  import { RequestMethod } from "@nestjs/common";
2
+ /**
3
+ * Helpers for route paths: joining, prefixing, and reading their parameters the
4
+ * way the router does.
5
+ *
6
+ * @evidence contracts/common.md#principled-implementation Paths are parsed by `path-to-regexp` after Fastify colon escapes are converted, so the parameters and literals are those the server reads.
7
+ * @evidence contracts/common.md#clear-and-simple-design Several small functions over one tokenizer and one parser.
8
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The router's own grammar decides, and no path is special-cased.
9
+ * @evidence contracts/common.md#meaningful-documentation The comment states its purpose.
10
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation PathAnalyzer interprets router protocol paths; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
11
+ */
2
12
  export declare namespace PathAnalyzer {
3
13
  /**
4
14
  * The route paths joined as the router joins them: one `/` between them, and
5
15
  * none doubled. A route path is router syntax, never a file path, so a
6
16
  * backslash stays the escape of the character after it (`items\\:batchGet`).
17
+ *
18
+ * @evidence contracts/common.md#principled-implementation The parts are joined, split on slashes, and empty segments are dropped, so any number of slashes at the boundaries collapses.
19
+ * @evidence contracts/common.md#clear-and-simple-design One expression.
20
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts It applies to every input.
21
+ * @evidence contracts/common.md#meaningful-documentation The comment states the result form.
22
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation PathAnalyzer.join interprets router protocol paths; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
7
23
  */
8
24
  export const join: (...args: string[]) => string;
25
+ /**
26
+ * Joins a path with the global prefix, unless the route is excluded from the
27
+ * prefix.
28
+ *
29
+ * @evidence contracts/common.md#principled-implementation The exclusion list is matched by method and by exact path or pattern, as NestJS does, and an excluded route is joined with an empty prefix.
30
+ * @evidence contracts/common.md#clear-and-simple-design One function delegating the exclusion test to a private helper.
31
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The exclusion rule is NestJS's.
32
+ * @evidence contracts/common.md#meaningful-documentation The comment states the exclusion.
33
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation PathAnalyzer.joinWithGlobalPrefix interprets router protocol paths; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
34
+ */
9
35
  export const joinWithGlobalPrefix: (props: {
10
36
  globalPrefix: string;
11
37
  exclude: IGlobalPrefixExclude[] | undefined;
@@ -13,10 +39,15 @@ export declare namespace PathAnalyzer {
13
39
  method: string;
14
40
  path: string;
15
41
  }) => string;
16
- export const escape: (str: string) => string | null;
17
42
  /**
18
43
  * Whether a route path holds a wildcard: a `*` not escaped as the literal
19
44
  * character (`\\*`), which a route path may hold since #1713.
45
+ *
46
+ * @evidence contracts/common.md#principled-implementation A star preceded by a backslash is a literal, so the test looks for a star at the start or after a non-backslash character.
47
+ * @evidence contracts/common.md#clear-and-simple-design One regular expression.
48
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts It follows the router's escaping rule.
49
+ * @evidence contracts/common.md#meaningful-documentation The comment states the escaped case.
50
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation PathAnalyzer.wildcard interprets router protocol paths; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
20
51
  */
21
52
  export const wildcard: (str: string) => boolean;
22
53
  /**
@@ -25,13 +56,34 @@ export declare namespace PathAnalyzer {
25
56
  * and `/range/:from-:to` holds two parameters parted by `-`. Every generator
26
57
  * that writes a path with its parameters filled in reads it from here, never
27
58
  * by splitting the text at `:` or `/`. `null` for a path it cannot parse.
59
+ *
60
+ * @evidence contracts/common.md#principled-implementation Tokens come from `path-to-regexp`, so text next to a parameter in one segment, such as `/files/:id.json`, is kept in place, adjacent literals merge, and an unnamed parameter makes the path unreadable.
61
+ * @evidence contracts/common.md#clear-and-simple-design One function over the tokenizer.
62
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The grammar is the router's.
63
+ * @evidence contracts/common.md#meaningful-documentation The comment states the result and why generators use it.
64
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation PathAnalyzer.segments interprets router protocol paths; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
28
65
  */
29
66
  export const segments: (str: string) => ISegment[] | null;
30
67
  /**
31
68
  * The path in OpenAPI's template syntax, each parameter written `{name}`:
32
69
  * `/files/:id.json` is `/files/{id}.json`.
70
+ *
71
+ * @evidence contracts/common.md#principled-implementation The segments are joined with literals verbatim and parameters in braces.
72
+ * @evidence contracts/common.md#clear-and-simple-design One expression over `segments`.
73
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts It uses the same segmenter as the SDK generator.
74
+ * @evidence contracts/common.md#meaningful-documentation The comment states the fallback.
75
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation PathAnalyzer.toOpenApi interprets router protocol paths; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
33
76
  */
34
77
  export const toOpenApi: (str: string) => string;
78
+ /**
79
+ * A segment of a path: literal text or a named parameter.
80
+ *
81
+ * @evidence contracts/common.md#principled-implementation The union is discriminated by `type`, so a consumer handles each case once.
82
+ * @evidence contracts/common.md#clear-and-simple-design A two-member union.
83
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.
84
+ * @evidence contracts/common.md#meaningful-documentation The comment names the two cases.
85
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation PathAnalyzer.ISegment interprets router protocol paths; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
86
+ */
35
87
  export type ISegment = {
36
88
  type: "literal";
37
89
  value: string;
@@ -39,6 +91,16 @@ export declare namespace PathAnalyzer {
39
91
  type: "param";
40
92
  name: string;
41
93
  };
94
+ /**
95
+ * Returns the names of the parameters of a path, or `null` when the path
96
+ * cannot be parsed.
97
+ *
98
+ * @evidence contracts/common.md#principled-implementation The parsed arguments are filtered to the parameters, and an empty parameter name makes the path unreadable.
99
+ * @evidence contracts/common.md#clear-and-simple-design One filter over the private parser.
100
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The grammar is the router's.
101
+ * @evidence contracts/common.md#meaningful-documentation The comment states the result.
102
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation PathAnalyzer.parameters interprets router protocol paths; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
103
+ */
42
104
  export const parameters: (str: string) => string[] | null;
43
105
  interface IGlobalPrefixExclude {
44
106
  path: string;
@@ -3,12 +3,28 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PathAnalyzer = void 0;
4
4
  const common_1 = require("@nestjs/common");
5
5
  const path_to_regexp_1 = require("path-to-regexp");
6
+ /**
7
+ * Helpers for route paths: joining, prefixing, and reading their parameters the
8
+ * way the router does.
9
+ *
10
+ * @evidence contracts/common.md#principled-implementation Paths are parsed by `path-to-regexp` after Fastify colon escapes are converted, so the parameters and literals are those the server reads.
11
+ * @evidence contracts/common.md#clear-and-simple-design Several small functions over one tokenizer and one parser.
12
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The router's own grammar decides, and no path is special-cased.
13
+ * @evidence contracts/common.md#meaningful-documentation The comment states its purpose.
14
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation PathAnalyzer interprets router protocol paths; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
15
+ */
6
16
  var PathAnalyzer;
7
17
  (function (PathAnalyzer) {
8
18
  /**
9
19
  * The route paths joined as the router joins them: one `/` between them, and
10
20
  * none doubled. A route path is router syntax, never a file path, so a
11
21
  * backslash stays the escape of the character after it (`items\\:batchGet`).
22
+ *
23
+ * @evidence contracts/common.md#principled-implementation The parts are joined, split on slashes, and empty segments are dropped, so any number of slashes at the boundaries collapses.
24
+ * @evidence contracts/common.md#clear-and-simple-design One expression.
25
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts It applies to every input.
26
+ * @evidence contracts/common.md#meaningful-documentation The comment states the result form.
27
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation PathAnalyzer.join interprets router protocol paths; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
12
28
  */
13
29
  PathAnalyzer.join = (...args) => "/" +
14
30
  args
@@ -16,21 +32,28 @@ var PathAnalyzer;
16
32
  .split("/")
17
33
  .filter((str) => str.length !== 0)
18
34
  .join("/");
35
+ /**
36
+ * Joins a path with the global prefix, unless the route is excluded from the
37
+ * prefix.
38
+ *
39
+ * @evidence contracts/common.md#principled-implementation The exclusion list is matched by method and by exact path or pattern, as NestJS does, and an excluded route is joined with an empty prefix.
40
+ * @evidence contracts/common.md#clear-and-simple-design One function delegating the exclusion test to a private helper.
41
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The exclusion rule is NestJS's.
42
+ * @evidence contracts/common.md#meaningful-documentation The comment states the exclusion.
43
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation PathAnalyzer.joinWithGlobalPrefix interprets router protocol paths; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
44
+ */
19
45
  PathAnalyzer.joinWithGlobalPrefix = (props) => { var _a; return PathAnalyzer.join(isGlobalPrefixExcluded(props.exclude, (_a = props.excludePath) !== null && _a !== void 0 ? _a : props.path, props.method)
20
46
  ? ""
21
47
  : props.globalPrefix, props.path); };
22
- PathAnalyzer.escape = (str) => {
23
- const args = _Parse(str);
24
- if (args === null)
25
- return null;
26
- return ("/" +
27
- args
28
- .map((arg) => (arg.type === "param" ? `:${arg.value}` : arg.value))
29
- .join("/"));
30
- };
31
48
  /**
32
49
  * Whether a route path holds a wildcard: a `*` not escaped as the literal
33
50
  * character (`\\*`), which a route path may hold since #1713.
51
+ *
52
+ * @evidence contracts/common.md#principled-implementation A star preceded by a backslash is a literal, so the test looks for a star at the start or after a non-backslash character.
53
+ * @evidence contracts/common.md#clear-and-simple-design One regular expression.
54
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts It follows the router's escaping rule.
55
+ * @evidence contracts/common.md#meaningful-documentation The comment states the escaped case.
56
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation PathAnalyzer.wildcard interprets router protocol paths; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
34
57
  */
35
58
  PathAnalyzer.wildcard = (str) => /(^|[^\\])\*/.test(str);
36
59
  /**
@@ -39,6 +62,12 @@ var PathAnalyzer;
39
62
  * and `/range/:from-:to` holds two parameters parted by `-`. Every generator
40
63
  * that writes a path with its parameters filled in reads it from here, never
41
64
  * by splitting the text at `:` or `/`. `null` for a path it cannot parse.
65
+ *
66
+ * @evidence contracts/common.md#principled-implementation Tokens come from `path-to-regexp`, so text next to a parameter in one segment, such as `/files/:id.json`, is kept in place, adjacent literals merge, and an unnamed parameter makes the path unreadable.
67
+ * @evidence contracts/common.md#clear-and-simple-design One function over the tokenizer.
68
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The grammar is the router's.
69
+ * @evidence contracts/common.md#meaningful-documentation The comment states the result and why generators use it.
70
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation PathAnalyzer.segments interprets router protocol paths; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
42
71
  */
43
72
  PathAnalyzer.segments = (str) => {
44
73
  const tokens = _Tokenize(str);
@@ -69,6 +98,12 @@ var PathAnalyzer;
69
98
  /**
70
99
  * The path in OpenAPI's template syntax, each parameter written `{name}`:
71
100
  * `/files/:id.json` is `/files/{id}.json`.
101
+ *
102
+ * @evidence contracts/common.md#principled-implementation The segments are joined with literals verbatim and parameters in braces.
103
+ * @evidence contracts/common.md#clear-and-simple-design One expression over `segments`.
104
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts It uses the same segmenter as the SDK generator.
105
+ * @evidence contracts/common.md#meaningful-documentation The comment states the fallback.
106
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation PathAnalyzer.toOpenApi interprets router protocol paths; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
72
107
  */
73
108
  PathAnalyzer.toOpenApi = (str) => {
74
109
  const list = PathAnalyzer.segments(str);
@@ -78,6 +113,16 @@ var PathAnalyzer;
78
113
  .map((s) => (s.type === "literal" ? s.value : `{${s.name}}`))
79
114
  .join("");
80
115
  };
116
+ /**
117
+ * Returns the names of the parameters of a path, or `null` when the path
118
+ * cannot be parsed.
119
+ *
120
+ * @evidence contracts/common.md#principled-implementation The parsed arguments are filtered to the parameters, and an empty parameter name makes the path unreadable.
121
+ * @evidence contracts/common.md#clear-and-simple-design One filter over the private parser.
122
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The grammar is the router's.
123
+ * @evidence contracts/common.md#meaningful-documentation The comment states the result.
124
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation PathAnalyzer.parameters interprets router protocol paths; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
125
+ */
81
126
  PathAnalyzer.parameters = (str) => {
82
127
  const args = _Parse(str);
83
128
  if (args === null)
@@ -1 +1 @@
1
- {"version":3,"file":"PathAnalyzer.js","sourceRoot":"","sources":["../../src/analyses/PathAnalyzer.ts"],"names":[],"mappings":";;;AAAA,2CAA+C;AAC/C,mDAA8C;AAE9C,IAAiB,YAAY,CAiL5B;AAjLD,WAAiB,YAAY;IAC3B;;;;OAIG;IACU,iBAAI,GAAG,CAAC,GAAG,IAAc,EAAE,EAAE,CACxC,GAAG;QACH,IAAI;aACD,IAAI,CAAC,GAAG,CAAC;aACT,KAAK,CAAC,GAAG,CAAC;aACV,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,MAAM,KAAK,CAAC,CAAC;aACjC,IAAI,CAAC,GAAG,CAAC,CAAC;IAEF,iCAAoB,GAAG,CAAC,KAMpC,EAAU,EAAE,kBACX,iBAAI,CACF,sBAAsB,CACpB,KAAK,CAAC,OAAO,QACb,KAAK,CAAC,WAAW,mCAAI,KAAK,CAAC,IAAI,EAC/B,KAAK,CAAC,MAAM,CACb;QACC,CAAC,CAAC,EAAE;QACJ,CAAC,CAAC,KAAK,CAAC,YAAY,EACtB,KAAK,CAAC,IAAI,CACX,GAAA,CAAC;IAES,mBAAM,GAAG,CAAC,GAAW,EAAiB,EAAE;QACnD,MAAM,IAAI,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;QACzB,IAAI,IAAI,KAAK,IAAI;YAAE,OA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tB,MAAM,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;YAChC,CAAC,IAAI,CAAC,CAAC;QACT,CAAC;aAAM,IAAI,KAAK,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC;YACrC,MAAM,IAAI,KAAK,CAAC;YAChB,CAAC,IAAI,CAAC,CAAC;QACT,CAAC;aAAM,IAAI,KAAK,CAAC,CAAC,CAAC,KAAK,GAAG,EAAE,CAAC;YAC5B,MAAM,IAAI,GAAW,kBAAkB,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAE,CAAC,CAAC,CAAC,CAAC;YACjE,MAAM,IAAI,IAAI,CAAC;YACf,CAAC,IAAI,IAAI,CAAC,MAAM,CAAC;YACjB,IAAI,KAAK,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC;gBAC9B,MAAM,IAAI,IAAI,CAAC;gBACf,CAAC,IAAI,CAAC,CAAC;YACT,CAAC;QACH,CAAC;;YAAM,MAAM,IAAI,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC;IAC9B,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC"}
@@ -1,11 +1,43 @@
1
1
  import { INestiaProject } from "../structures/INestiaProject";
2
2
  import { INestiaSdkInput } from "../structures/INestiaSdkInput";
3
3
  import { IReflectController } from "../structures/IReflectController";
4
+ /**
5
+ * Reflects a NestJS controller class into an operation list.
6
+ *
7
+ * @evidence contracts/common.md#principled-implementation A controller is recognized by Nest's own path, host, and scope metadata, its methods are visited along the prototype chain with a subclass method hiding an inherited one, and each method is classified as MCP, WebSocket, or HTTP.
8
+ * @evidence contracts/common.md#clear-and-simple-design One public function and one prototype walker.
9
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The recognition uses the metadata Nest writes, and no class name is special-cased.
10
+ * @evidence contracts/common.md#meaningful-documentation The comment states its purpose.
11
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation ReflectControllerAnalyzer analyzes reflected route metadata; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
12
+ */
4
13
  export declare namespace ReflectControllerAnalyzer {
14
+ /**
15
+ * The input of the controller analysis: the project, the controller, and a
16
+ * set of visited functions.
17
+ *
18
+ * @evidence contracts/common.md#principled-implementation The record holds what one analysis needs and the shared error lists live in the project.
19
+ * @evidence contracts/common.md#clear-and-simple-design A flat record with no behavior.
20
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.
21
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the type describes and the meaning of its members.
22
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation ReflectControllerAnalyzer.IProps analyzes reflected route metadata; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
23
+ */
5
24
  interface IProps {
6
25
  project: Omit<INestiaProject, "config">;
7
26
  controller: INestiaSdkInput.IController;
8
27
  unique: WeakSet<Function>;
9
28
  }
29
+ /**
30
+ * Returns the reflected controller with its operations, or `null` for a class
31
+ * that is not a controller.
32
+ *
33
+ * Wildcard controller paths are dropped with a warning, and methods marked
34
+ * `@ignore` are skipped.
35
+ *
36
+ * @evidence contracts/common.md#principled-implementation The metadata keys of the class decide whether it is a controller, every own and inherited method with operation metadata is offered to the MCP, WebSocket, and HTTP analyzers in that order, and the first analyzer that accepts it owns it.
37
+ * @evidence contracts/common.md#clear-and-simple-design One function.
38
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The order of the analyzers is fixed by the mutual exclusion of the decorators.
39
+ * @evidence contracts/common.md#meaningful-documentation The comment states the null result, the warning, and the ignore tag.
40
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation ReflectControllerAnalyzer.analyze analyzes reflected route metadata; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
41
+ */
10
42
  const analyze: (props: IProps) => IReflectController | null;
11
43
  }
@@ -8,11 +8,33 @@ const ReflectHttpOperationAnalyzer_1 = require("./ReflectHttpOperationAnalyzer")
8
8
  const ReflectMcpOperationAnalyzer_1 = require("./ReflectMcpOperationAnalyzer");
9
9
  const ReflectMetadataAnalyzer_1 = require("./ReflectMetadataAnalyzer");
10
10
  const ReflectWebSocketOperationAnalyzer_1 = require("./ReflectWebSocketOperationAnalyzer");
11
+ /**
12
+ * Reflects a NestJS controller class into an operation list.
13
+ *
14
+ * @evidence contracts/common.md#principled-implementation A controller is recognized by Nest's own path, host, and scope metadata, its methods are visited along the prototype chain with a subclass method hiding an inherited one, and each method is classified as MCP, WebSocket, or HTTP.
15
+ * @evidence contracts/common.md#clear-and-simple-design One public function and one prototype walker.
16
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The recognition uses the metadata Nest writes, and no class name is special-cased.
17
+ * @evidence contracts/common.md#meaningful-documentation The comment states its purpose.
18
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation ReflectControllerAnalyzer analyzes reflected route metadata; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
19
+ */
11
20
  var ReflectControllerAnalyzer;
12
21
  (function (ReflectControllerAnalyzer) {
13
22
  /* ---------------------------------------------------------
14
23
  CONTROLLER
15
24
  --------------------------------------------------------- */
25
+ /**
26
+ * Returns the reflected controller with its operations, or `null` for a class
27
+ * that is not a controller.
28
+ *
29
+ * Wildcard controller paths are dropped with a warning, and methods marked
30
+ * `@ignore` are skipped.
31
+ *
32
+ * @evidence contracts/common.md#principled-implementation The metadata keys of the class decide whether it is a controller, every own and inherited method with operation metadata is offered to the MCP, WebSocket, and HTTP analyzers in that order, and the first analyzer that accepts it owns it.
33
+ * @evidence contracts/common.md#clear-and-simple-design One function.
34
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The order of the analyzers is fixed by the mutual exclusion of the decorators.
35
+ * @evidence contracts/common.md#meaningful-documentation The comment states the null result, the warning, and the ignore tag.
36
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation ReflectControllerAnalyzer.analyze analyzes reflected route metadata; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
37
+ */
16
38
  ReflectControllerAnalyzer.analyze = (props) => {
17
39
  var _a, _b, _c;
18
40
  // MUST BE TYPE OF A CREATOR WHO HAS THE CONSTRUCTOR
@@ -1 +1 @@
1
- {"version":3,"file":"ReflectControllerAnalyzer.js","sourceRoot":"","sources":["../../src/analyses/ReflectControllerAnalyzer.ts"],"names":[],"mappings":";;;AAAA,wDAIkC;AASlC,kDAA+C;AAC/C,iDAA8C;AAC9C,iFAA8E;AAC9E,+EAA4E;AAC5E,uEAAoE;AACpE,2FAAwF;AAExF,IAAiB,yBAAyB,CAqGzC;AArGD,WAAiB,yBAAyB;IAMxC;;gEAE4D;IAC/C,iCAAO,GAAG,CAAC,KAAa,EAA6B,EAAE;;QAClE,oDAAoD;QACpD,IACE,qBAAS,CAAC,GAAG,CACX,OAAO,CAAC,eAAe,CAAC,KAAK,CAAC,UAAU,CAAC,KAAK,CAAC,EAC/C,yBAAa,EACb,yBAAa,EACb,kCAAsB,CACvB,KAAK,KAAK;YAEX,OAAO,IAAI,CAAC;QAEd,aAAa;QACb,MAAM,UAAU,GAAuB;YACrC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,KAAK;YAC7B,IAAI,EAAE,KAAK,CAAC,UAAU,CAAC,QAAQ;YAC/B,UAAU,EAAE,EAAE;YACd,QAAQ,EAAE,KAAK,CAAC,UAAU,CAAC,QAAQ;YACnC,KAAK,EAAE,iDAAuB,CAAC,KAAK,CAAC,KAAK,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,MAAM,CACjE,CAAC,GAAG,EAAE,EAAE;gBACN,IAAI,2BAAY,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;oBAC/B,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC;wBAC1B,IAAI,EAAE,KAAK,CAAC,UAAU,CAAC,QAAQ;wBAC/B,KAAK,EAA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CAAC,OAAY;QAC1C,MAAM,OAAO,GAAgB,IAAI,GAAG,EAAE,CAAC;QACvC,OAAO,OAAO,CAAC,OAAO,CAAC,CAAC;QAExB,SAAS,OAAO,CAAC,MAAW;YAC1B,MAAM,OAAO,GAAa,MAAM,CAAC,mBAAmB,CAClD,MAAM,CAAC,SAAS,CACjB,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE;gBACf,IAAI,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC;oBAAE,OAAO,KAAK,CAAC;gBACnC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;gBACjB,OAAO,IAAI,CAAC;YACd,CAAC,CAAC,CAAC;YACH,MAAM,OAAO,GAA6B,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC;gBAC7D,GAAG;gBACH,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC;aACtB,CAAC,CAAC;YAEH,MAAM,MAAM,GAAQ,MAAM,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;YAClD,IAAI,MAAM,CAAC,SAAS,KAAK,SAAS;gBAAE,OAAO,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC;YACrE,OAAO,OAAO,CAAC;QACjB,CAAC;IACH,CAAC;AACH,CAAC,EA5HgB,yBAAyB,aAAzB,yBAAyB,GAAzB,yBAAyB,QA4HzC"}
@@ -2,7 +2,26 @@ import { INestiaProject } from "../structures/INestiaProject";
2
2
  import { IOperationMetadata } from "../structures/IOperationMetadata";
3
3
  import { IReflectController } from "../structures/IReflectController";
4
4
  import { IReflectHttpOperation } from "../structures/IReflectHttpOperation";
5
+ /**
6
+ * Reflects an HTTP route method into an operation.
7
+ *
8
+ * @evidence contracts/common.md#principled-implementation The method, the path list, the parameters, the success response, the exceptions, the imports, the security, and the extensions are composed from Nest's metadata and the compile-time metadata, and the path parameters of the decorator are checked against the parameter decorators.
9
+ * @evidence contracts/common.md#clear-and-simple-design One public function over the parameter, response, and exception analyzers.
10
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The checks follow the decorators and no route is special-cased.
11
+ * @evidence contracts/common.md#meaningful-documentation The comment states its purpose.
12
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation ReflectHttpOperationAnalyzer analyzes reflected route metadata; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
13
+ */
5
14
  export declare namespace ReflectHttpOperationAnalyzer {
15
+ /**
16
+ * The input of the HTTP operation analysis: the project, the controller, the
17
+ * method, and its compile-time metadata.
18
+ *
19
+ * @evidence contracts/common.md#principled-implementation The record holds the reflected function and the metadata the transform attached to it.
20
+ * @evidence contracts/common.md#clear-and-simple-design A flat record with no behavior.
21
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.
22
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the type describes and the meaning of its members.
23
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation ReflectHttpOperationAnalyzer.IProps analyzes reflected route metadata; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
24
+ */
6
25
  interface IProps {
7
26
  project: Omit<INestiaProject, "config"> & Partial<Pick<INestiaProject, "config">>;
8
27
  controller: IReflectController;
@@ -10,5 +29,15 @@ export declare namespace ReflectHttpOperationAnalyzer {
10
29
  name: string;
11
30
  metadata: IOperationMetadata;
12
31
  }
32
+ /**
33
+ * Returns the reflected HTTP operation, or `null` when the method is not a
34
+ * route or has errors, which are pushed to the project.
35
+ *
36
+ * @evidence contracts/common.md#principled-implementation A method is a route when it has Nest's path and method metadata; `ALL` is treated as POST and OPTIONS is skipped; a mismatch between the path parameters and the parameter decorators is an error.
37
+ * @evidence contracts/common.md#clear-and-simple-design One function that collects errors and returns nothing when there is one.
38
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The rules follow the HTTP semantics of the decorators.
39
+ * @evidence contracts/common.md#meaningful-documentation The comment states the null result and the collected errors.
40
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation ReflectHttpOperationAnalyzer.analyze analyzes reflected route metadata; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
41
+ */
13
42
  const analyze: (props: IProps) => IReflectHttpOperation | null;
14
43
  }
@@ -10,8 +10,27 @@ const ReflectHttpOperationExceptionAnalyzer_1 = require("./ReflectHttpOperationE
10
10
  const ReflectHttpOperationParameterAnalyzer_1 = require("./ReflectHttpOperationParameterAnalyzer");
11
11
  const ReflectHttpOperationResponseAnalyzer_1 = require("./ReflectHttpOperationResponseAnalyzer");
12
12
  const ReflectMetadataAnalyzer_1 = require("./ReflectMetadataAnalyzer");
13
+ /**
14
+ * Reflects an HTTP route method into an operation.
15
+ *
16
+ * @evidence contracts/common.md#principled-implementation The method, the path list, the parameters, the success response, the exceptions, the imports, the security, and the extensions are composed from Nest's metadata and the compile-time metadata, and the path parameters of the decorator are checked against the parameter decorators.
17
+ * @evidence contracts/common.md#clear-and-simple-design One public function over the parameter, response, and exception analyzers.
18
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The checks follow the decorators and no route is special-cased.
19
+ * @evidence contracts/common.md#meaningful-documentation The comment states its purpose.
20
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation ReflectHttpOperationAnalyzer analyzes reflected route metadata; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
21
+ */
13
22
  var ReflectHttpOperationAnalyzer;
14
23
  (function (ReflectHttpOperationAnalyzer) {
24
+ /**
25
+ * Returns the reflected HTTP operation, or `null` when the method is not a
26
+ * route or has errors, which are pushed to the project.
27
+ *
28
+ * @evidence contracts/common.md#principled-implementation A method is a route when it has Nest's path and method metadata; `ALL` is treated as POST and OPTIONS is skipped; a mismatch between the path parameters and the parameter decorators is an error.
29
+ * @evidence contracts/common.md#clear-and-simple-design One function that collects errors and returns nothing when there is one.
30
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The rules follow the HTTP semantics of the decorators.
31
+ * @evidence contracts/common.md#meaningful-documentation The comment states the null result and the collected errors.
32
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation ReflectHttpOperationAnalyzer.analyze analyzes reflected route metadata; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
33
+ */
15
34
  ReflectHttpOperationAnalyzer.analyze = (props) => {
16
35
  var _a, _b, _c, _d;
17
36
  var _e;
@@ -29,22 +48,14 @@ var ReflectHttpOperationAnalyzer;
29
48
  functionName: props.name,
30
49
  errors,
31
50
  });
32
- const success = (() => {
33
- const localErrors = [];
34
- const success = ReflectHttpOperationResponseAnalyzer_1.ReflectHttpOperationResponseAnalyzer.analyze({
35
- controller: props.controller,
36
- function: props.function,
37
- functionName: props.name,
38
- httpMethod: method,
39
- metadata: props.metadata,
40
- errors,
41
- });
42
- if (localErrors.length) {
43
- errors.push(...localErrors);
44
- return null;
45
- }
46
- return success;
47
- })();
51
+ const success = ReflectHttpOperationResponseAnalyzer_1.ReflectHttpOperationResponseAnalyzer.analyze({
52
+ controller: props.controller,
53
+ function: props.function,
54
+ functionName: props.name,
55
+ httpMethod: method,
56
+ metadata: props.metadata,
57
+ errors,
58
+ });
48
59
  if (errors.length) {
49
60
  props.project.errors.push(...errors);
50
61
  return null;
@@ -108,7 +119,7 @@ var ReflectHttpOperationAnalyzer;
108
119
  // LIST UP PARAMETERS
109
120
  const binded = PathAnalyzer_1.PathAnalyzer.parameters(location);
110
121
  if (binded === null) {
111
- props.project.errors.push({
122
+ errors.push({
112
123
  file: props.controller.file,
113
124
  class: props.controller.class.name,
114
125
  function: props.name,
@@ -1 +1 @@
1
- {"version":3,"file":"ReflectHttpOperationAnalyzer.js","sourceRoot":"","sources":["../../src/analyses/ReflectHttpOperationAnalyzer.ts"],"names":[],"mappings":";;;AAAA,wDAA0E;AAC1E,+BAA8B;AAS9B,kDAA+C;AAC/C,qDAAkD;AAClD,iDAA8C;AAC9C,mGAAgG;AAChG,mGAAgG;AAChG,iGAA8F;AAC9F,uEAAoE;AAEpE,IAA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C;qBAC5B,IAAI,EAAE,CAAC;gBAEV,cAAc;gBACd,IAAI,aAAM,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,EAAE,UAAU,CAAC,KAAK,KAAK;oBACnD,MAAM,CAAC,IAAI,CAAC;wBACV,IAAI,EAAE,KAAK,CAAC,UAAU,CAAC,IAAI;wBAC3B,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,KAAK,CAAC,IAAI;wBAClC,QAAQ,EAAE,KAAK,CAAC,IAAI;wBACpB,IAAI,EAAE,cAAc;wBACpB,QAAQ,EAAE;4BACR,oHAAoH,MAAM,CAAC,IAAI,CAC7H,IAAI,CACL,mBAAmB,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK;yBAC/C;qBACF,CAAC,CAAC;YACP,CAAC;QAEH,UAAU;QACV,IAAI,MAAM,CAAC,MAAM,EAAE,CAAC;YAClB,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,CAAC;YACrC,OAAO,IAAI,CAAC;QACd,CAAC;QACD,OAAO,SAAS,CAAC;IACnB,CAAC,CAAC;AACJ,CAAC,EA3JgB,4BAA4B,aAA5B,4BAA4B,GAA5B,4BAA4B,QA2J5C;AAED,+DAA+D;AAC/D,MAAM,OAAO,GAAG;IACd,KAAK;IACL,MAAM;IACN,KAAK;IACL,QAAQ;IACR,OAAO;IACP,KAAK;IACL,SAAS;IACT,MAAM;CACP,CAAC"}
1
+ {"version":3,"file":"ReflectHttpOperationAnalyzer.js","sourceRoot":"","sources":["../../src/analyses/ReflectHttpOperationAnalyzer.ts"],"names":[],"mappings":";;;AAAA,wDAA0E;AAC1E,+BAA8B;AAS9B,kDAA+C;AAC/C,qDAAkD;AAClD,iDAA8C;AAC9C,mGAAgG;AAChG,mGAAgG;AAChG,iGAA8F;AAC9F,uEAAoE;AAEpE;;;;;;;;GAQG;AACH,IAAiB,4BAA4B,CAwK5C;AAxKD,WAAiB,4BAA4B;IAmB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AE,cAAc;wBACpB,QAAQ,EAAE;4BACR,oHAAoH,MAAM,CAAC,IAAI,CAC7H,IAAI,CACL,mBAAmB,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK;yBAC/C;qBACF,CAAC,CAAC;YACP,CAAC;QAEH,UAAU;QACV,IAAI,MAAM,CAAC,MAAM,EAAE,CAAC;YAClB,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,CAAC;YACrC,OAAO,IAAI,CAAC;QACd,CAAC;QACD,OAAO,SAAS,CAAC;IACnB,CAAC,CAAC;AACJ,CAAC,EAxKgB,4BAA4B,aAA5B,4BAA4B,GAA5B,4BAA4B,QAwK5C;AAED,+DAA+D;AAC/D,MAAM,OAAO,GAAG;IACd,KAAK;IACL,MAAM;IACN,KAAK;IACL,QAAQ;IACR,OAAO;IACP,KAAK;IACL,SAAS;IACT,MAAM;CACP,CAAC"}
@@ -2,7 +2,26 @@ import { IOperationMetadata } from "../structures/IOperationMetadata";
2
2
  import { IReflectController } from "../structures/IReflectController";
3
3
  import { IReflectHttpOperationException } from "../structures/IReflectHttpOperationException";
4
4
  import { IReflectOperationError } from "../structures/IReflectOperationError";
5
+ /**
6
+ * Reflects the `@TypedException` declarations of a method.
7
+ *
8
+ * @evidence contracts/common.md#principled-implementation The declarations are read in declaration order and matched by position with the exception types the transform recorded.
9
+ * @evidence contracts/common.md#clear-and-simple-design One public function.
10
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The matching is by position because both lists are produced in declaration order.
11
+ * @evidence contracts/common.md#meaningful-documentation The comment states its purpose.
12
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation ReflectHttpOperationExceptionAnalyzer analyzes reflected route metadata; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
13
+ */
5
14
  export declare namespace ReflectHttpOperationExceptionAnalyzer {
15
+ /**
16
+ * The input of the exception analysis: the controller, the method, its name,
17
+ * the HTTP method, the metadata, and the error list.
18
+ *
19
+ * @evidence contracts/common.md#principled-implementation The record holds what the analysis needs.
20
+ * @evidence contracts/common.md#clear-and-simple-design A flat record with no behavior.
21
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.
22
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the type describes and the meaning of its members.
23
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation ReflectHttpOperationExceptionAnalyzer.IContext analyzes reflected route metadata; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
24
+ */
6
25
  interface IContext {
7
26
  controller: IReflectController;
8
27
  function: Function;
@@ -11,5 +30,17 @@ export declare namespace ReflectHttpOperationExceptionAnalyzer {
11
30
  metadata: IOperationMetadata;
12
31
  errors: IReflectOperationError[];
13
32
  }
33
+ /**
34
+ * Returns the exceptions of a method by status.
35
+ *
36
+ * A declaration without a matching type, or with an unreadable one, is an
37
+ * error.
38
+ *
39
+ * @evidence contracts/common.md#principled-implementation Decorators apply bottom-up, so the metadata array is reversed to declaration order before it is paired with the transform's exception list, and the result is keyed by status, so the last declaration of a status wins.
40
+ * @evidence contracts/common.md#clear-and-simple-design One function.
41
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The pairing follows the documented order, and every mismatch is reported.
42
+ * @evidence contracts/common.md#meaningful-documentation The comment states the matching and the errors.
43
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation ReflectHttpOperationExceptionAnalyzer.analyze analyzes reflected route metadata; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
44
+ */
14
45
  const analyze: (ctx: IContext) => Record<string, IReflectHttpOperationException>;
15
46
  }
@@ -2,8 +2,29 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ReflectHttpOperationExceptionAnalyzer = void 0;
4
4
  const legacy_1 = require("../internal/legacy");
5
+ /**
6
+ * Reflects the `@TypedException` declarations of a method.
7
+ *
8
+ * @evidence contracts/common.md#principled-implementation The declarations are read in declaration order and matched by position with the exception types the transform recorded.
9
+ * @evidence contracts/common.md#clear-and-simple-design One public function.
10
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The matching is by position because both lists are produced in declaration order.
11
+ * @evidence contracts/common.md#meaningful-documentation The comment states its purpose.
12
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation ReflectHttpOperationExceptionAnalyzer analyzes reflected route metadata; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
13
+ */
5
14
  var ReflectHttpOperationExceptionAnalyzer;
6
15
  (function (ReflectHttpOperationExceptionAnalyzer) {
16
+ /**
17
+ * Returns the exceptions of a method by status.
18
+ *
19
+ * A declaration without a matching type, or with an unreadable one, is an
20
+ * error.
21
+ *
22
+ * @evidence contracts/common.md#principled-implementation Decorators apply bottom-up, so the metadata array is reversed to declaration order before it is paired with the transform's exception list, and the result is keyed by status, so the last declaration of a status wins.
23
+ * @evidence contracts/common.md#clear-and-simple-design One function.
24
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The pairing follows the documented order, and every mismatch is reported.
25
+ * @evidence contracts/common.md#meaningful-documentation The comment states the matching and the errors.
26
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation ReflectHttpOperationExceptionAnalyzer.analyze analyzes reflected route metadata; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
27
+ */
7
28
  ReflectHttpOperationExceptionAnalyzer.analyze = (ctx) => {
8
29
  // TypeScript applies decorators bottom-up, so Reflect's metadata array
9
30
  // is the reverse of declaration order. Reverse it once here so the
@@ -1 +1 @@
1
- {"version":3,"file":"ReflectHttpOperationExceptionAnalyzer.js","sourceRoot":"","sources":["../../src/analyses/ReflectHttpOperationExceptionAnalyzer.ts"],"names":[],"mappings":";;;AAEA,+CAAyD;AAMzD,IAAiB,qCAAqC,CAiFrD;AAjFD,WAAiB,qCAAqC;IASvC,6CAAO,GAAG,CACrB,GAAa,EACmC,EAAE;QAClD,uEAAuE;QACvE,mEAAmE;QACnE,sEAAsE;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CAAC,CAAC,CAAC,CAAC,CAAC;IAClE,CAAC,CAAC;IAEF,MAAM,oBAAoB,GAAG,CAAC,IAAc,EAAgC,EAAE,wBAC5E,OAAO,CAAC,WAAW,CAAC,uBAAuB,EAAE,IAAI,CAAC,mCAAI,EAAE,GAAA,CAAC;AAC7D,CAAC,EAjFgB,qCAAqC,aAArC,qCAAqC,GAArC,qCAAqC,QAiFrD"}
1
+ {"version":3,"file":"ReflectHttpOperationExceptionAnalyzer.js","sourceRoot":"","sources":["../../src/analyses/ReflectHttpOperationExceptionAnalyzer.ts"],"names":[],"mappings":";;;AAEA,+CAAyD;AAMzD;;;;;;;;GAQG;AACH,IAAiB,qCAAqC,CAuGrD;AAvGD,WAAiB,qCAAqC;IAmBpD;;;;;;;;;;;OAWG;IACU,6CAAO,GAAG,CACrB,GAAa,EACmC,EAAE;QAClD,uEAAuE;QACvE,mEAAmE;QACnE,sEAAsE;QACtE,sEAAsE;QACtE,2CAA2C;QAC3C,0DAA0D;QAC1D,MAAM,aAAa,GAAiC,oBAAoB,CACtE,GAAG,CAAC,QAAQ,CACb;aACE,KAAK,EAAE;aACP,OAAO,EAAE,CAAC;QACb,MAAM,MAAM,GAA6B,EAAE,CAAC;QAC5C,MAAM,UAAU,GAAqC,aAAa;aAC/D,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC,EAAE,EAAE;;YACd,MAAM,OAAO,GACX,GAAG,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;YAC7B,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;gBAC1B,MAAM,CAAC,IAAI,CAAC;oBACV,IAAI,EAAE,GAAG,CAAC,UAAU,CAAC,IAAI;oBACzB,KAAK,EAAE,GAAG,CAAC,UAAU,CAAC,KAAK,CAAC,IAAI;oBAChC,QAAQ,EAAE,GAAG,CAAC,YAAY;oBAC1B,IAAI,EAAE,sBAAsB,GAAG,CAAC,MAAM,GAAG;oBACzC,QAAQ,EAAE,CAAC,gCAAgC,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