@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
@@ -0,0 +1,28 @@
1
+ const cp = require("node:child_process");
2
+ const fs = require("node:fs");
3
+ const path = require("node:path");
4
+
5
+ // Resolve the generated package's data against its own location, so invoking
6
+ // the build from another directory cannot redirect deletion or generation.
7
+ const { nestia } = require("./package.json");
8
+ const root = path.resolve(__dirname, nestia.root);
9
+ const output = path.resolve(__dirname, nestia.output);
10
+ fs.rmSync(path.join(output, "functional"), { recursive: true, force: true });
11
+
12
+ const args = ["nestia", "sdk"];
13
+ if (process.platform !== "win32")
14
+ cp.execFileSync("npx", args, { cwd: root, stdio: "inherit" });
15
+ else {
16
+ // Node cannot start a .cmd shim directly. The npm installation beside the
17
+ // shim provides the same entry point without interpreting a shell string.
18
+ const directory = (process.env.PATH ?? "")
19
+ .split(path.delimiter)
20
+ .find((entry) => fs.existsSync(path.join(entry, "npx.cmd")));
21
+ const cli = directory === undefined ? undefined : [
22
+ path.join(directory, "node_modules/npm/bin/npx-cli.js"),
23
+ path.resolve(directory, "../npm/bin/npx-cli.js"),
24
+ ].find((entry) => fs.existsSync(entry));
25
+ if (cli === undefined)
26
+ throw new Error("Unable to locate npx's JavaScript entry point beside npx.cmd on PATH.");
27
+ cp.execFileSync(process.execPath, [cli, ...args], { cwd: root, stdio: "inherit" });
28
+ }
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@ORGANIZATION/PROJECT-api",
3
- "version": "14.0.1",
3
+ "version": "14.0.3",
4
4
  "description": "SDK library generated by Nestia",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "scripts": {
8
8
  "build": "npm run build:sdk && npm run compile",
9
- "build:sdk": "rimraf ${output}/functional && cd ${root} && npx nestia sdk && cd ${current}",
9
+ "build:sdk": "node build-sdk.cjs",
10
10
  "compile": "rimraf lib && ttsc",
11
11
  "deploy": "npm run build && npm publish"
12
12
  },
@@ -20,6 +20,10 @@
20
20
  "url": "https://github.com/samchon/nestia/issues"
21
21
  },
22
22
  "homepage": "https://nestia.io",
23
+ "nestia": {
24
+ "root": "${root}",
25
+ "output": "${output}"
26
+ },
23
27
  "files": [
24
28
  "lib",
25
29
  "package.json",
@@ -4,6 +4,11 @@ import type { OpenApi } from "typia";
4
4
  * Definition for the `nestia.config.ts` file.
5
5
  *
6
6
  * @author Jeongho Nam - https://github.com/samchon
7
+ * @evidence contracts/common.md#principled-implementation The input names the controllers to analyze and every optional property enables or refines one output (SDK, distribution, e2e, Swagger), so one configuration file drives every generator.
8
+ * @evidence contracts/common.md#clear-and-simple-design A flat record whose nested types describe the input and the Swagger options.
9
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.
10
+ * @evidence contracts/common.md#meaningful-documentation Every property documents its meaning and default, which are the public contract of the configuration file.
11
+ * @evidence contracts/portability.md#os-neutral-implementation Source inputs and output/distribution/e2e destinations carry native pathname strings interpreted by their owning Node filesystem operations; the application callback bypasses source compilation. Swagger route paths are distinct protocol values, not native file identities.
7
12
  */
8
13
  export interface INestiaConfig {
9
14
  /**
@@ -40,10 +45,15 @@ export interface INestiaConfig {
40
45
  * Recommend to use `"packages/api"` value.
41
46
  */
42
47
  distribute?: string;
43
- /** @default false */
48
+ /**
49
+ * Groups HTTP and WebSocket SDK call arguments in one props object after the
50
+ * connection. MCP wrappers retain their client and arguments parameters.
51
+ *
52
+ * @default false
53
+ */
44
54
  keyword?: boolean;
45
55
  /**
46
- * Allow simulation mode.
56
+ * Allow simulation mode for HTTP SDK calls.
47
57
  *
48
58
  * If you configure this property to be `true`, the SDK library would be
49
59
  * contain simulation mode. In the simulation mode, the SDK library would not
@@ -61,7 +71,8 @@ export interface INestiaConfig {
61
71
  *
62
72
  * If you configure this property and runs `npx nestia e2e` command,
63
73
  * `@nestia/sdk` will analyze your NestJS backend server code, and generates
64
- * e2e test functions for every API endpoints.
74
+ * e2e test functions for the analyzed HTTP endpoints. WebSocket and MCP
75
+ * operations have no generated HTTP test function.
65
76
  *
66
77
  * If not configured, you can't run `npx nestia e2e` command.
67
78
  */
@@ -70,10 +81,10 @@ export interface INestiaConfig {
70
81
  * Whether to use propagation mode or not.
71
82
  *
72
83
  * If being configured, interaction functions of the SDK library would perform
73
- * the propagation mode. The propagation mode means that never throwing
74
- * exception even when status code is not 200 (or 201), but just returning the
84
+ * propagation mode. HTTP failure statuses are returned through the
75
85
  * {@link IPropagation} typed instance, which can specify its body type through
76
- * discriminated union determined by status code.
86
+ * discriminated union determined by status code. Transport, decoding and
87
+ * configured assertion failures can still throw.
77
88
  *
78
89
  * @default false
79
90
  */
@@ -81,9 +92,10 @@ export interface INestiaConfig {
81
92
  /**
82
93
  * Whether to clone DTO structures or not.
83
94
  *
84
- * If being configured, all of DTOs used in the backend server would be cloned
85
- * into the `structures` directory, and the SDK library would be refer to the
86
- * cloned DTOs instead of the original.
95
+ * If enabled, named DTOs reachable from analyzed routes are emitted into
96
+ * `structures`, with anonymous forms written inline. HTTP and MCP DTOs use
97
+ * their wire metadata; supported WebSocket declarations are copied from local
98
+ * sources, while external or unsupported imports retain source links.
87
99
  *
88
100
  * @default false
89
101
  */
@@ -91,8 +103,10 @@ export interface INestiaConfig {
91
103
  /**
92
104
  * Whether to wrap DTO by primitive type.
93
105
  *
94
- * If you don't configure this property as `false`, all of DTOs in the SDK
95
- * library would be automatically wrapped by {@link Primitive} type.
106
+ * Unless false, source DTO aliases use Primitive for JSON bodies and
107
+ * responses, and Resolved for query, headers and other resolved wire forms.
108
+ * Clone mode writes the analyzed metadata directly; multipart bodies use
109
+ * FormDataInput and binary responses use ReadableStream.
96
110
  *
97
111
  * For refenrece, if a DTO type be capsuled by the {@link Primitive} type, all
98
112
  * of methods in the DTO type would be automatically erased. Also, if the DTO
@@ -105,9 +119,10 @@ export interface INestiaConfig {
105
119
  /**
106
120
  * Whether to assert parameter types or not.
107
121
  *
108
- * If you configure this property to be `true`, all of the function parameters
109
- * of SDK library would be checked through [`typia.assert<T>()`
110
- * function](https://typia.io/docs/validators/assert/).
122
+ * If true, HTTP path, query and body arguments are checked through
123
+ * [`typia.assert<T>()` function](https://typia.io/docs/validators/assert/).
124
+ * The connection, connection headers, WebSocket and MCP arguments are outside
125
+ * this option.
111
126
  *
112
127
  * This option would make your SDK library compilation time a little bit
113
128
  * slower, but would enahcne the type safety even in the runtime level.
@@ -116,16 +131,13 @@ export interface INestiaConfig {
116
131
  */
117
132
  assert?: boolean;
118
133
  /**
119
- * Whether to optimize JSON string conversion 10x faster or not.
120
- *
121
- * If you configure this property to be `true`, the SDK library would utilize
122
- * the [`typia.assertStringify<T>()
123
- * function`](https://github.com/samchon/typia#enhanced-json) to boost up JSON
124
- * serialization speed and ensure type safety.
134
+ * Generates specialized JSON serialization for JSON and encrypted request
135
+ * bodies.
125
136
  *
126
- * This option would make your SDK library compilation time a little bit
127
- * slower, but would enhance JSON serialization speed 10x faster. Also, it can
128
- * ensure type safety even in the runtime level.
137
+ * When enabled, the SDK emits a `typia.json.assertStringify` function for the
138
+ * body type. With `assert` enabled, argument validation runs separately and
139
+ * serialization uses `typia.json.stringify` without repeating the assertion.
140
+ * Compilation and runtime costs depend on the body type and workload.
129
141
  *
130
142
  * @default false
131
143
  */
@@ -135,6 +147,12 @@ export declare namespace INestiaConfig {
135
147
  /**
136
148
  * List of files or directories to include or exclude to specifying the NestJS
137
149
  * controllers.
150
+ *
151
+ * @evidence contracts/common.md#principled-implementation Include lists select controller files or directories and exclude lists remove files from that selection.
152
+ * @evidence contracts/common.md#clear-and-simple-design A two-member record.
153
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.
154
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the type describes and the meaning of its members.
155
+ * @evidence contracts/portability.md#os-neutral-implementation Include and exclude strings represent native files, directories or glob patterns. SourceFinder owns resolving them against the current working directory and distinguishing literal existing paths from wildcard suffixes.
138
156
  */
139
157
  interface IInput {
140
158
  /** List of files or directories containing the NestJS controller classes. */
@@ -142,7 +160,15 @@ export declare namespace INestiaConfig {
142
160
  /** List of files or directories to be excluded. */
143
161
  exclude?: string[];
144
162
  }
145
- /** Building `swagger.json` is also possible. */
163
+ /**
164
+ * Building `swagger.json` is also possible.
165
+ *
166
+ * @evidence contracts/common.md#principled-implementation The output path is required and every other option refines the composed OpenAPI document before it is written.
167
+ * @evidence contracts/common.md#clear-and-simple-design A flat record of options with one callback.
168
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.
169
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the type describes and the meaning of its members.
170
+ * @evidence contracts/portability.md#os-neutral-implementation output is a native destination interpreted by path.parse/resolve in SwaggerGenerator; a nonempty extension denotes a file and otherwise the destination is a directory. Server URLs and operation paths retain protocol spelling independently of that filesystem boundary.
171
+ */
146
172
  interface ISwaggerConfig {
147
173
  /**
148
174
  * Response path of the `swagger.json`.
@@ -238,6 +264,11 @@ export declare namespace INestiaConfig {
238
264
  *
239
265
  * @param props Properties of the API endpoint.
240
266
  * @returns Operation ID.
267
+ * @evidence contracts/common.md#principled-implementation An explicit @operationId tag takes precedence; otherwise this callback receives the four identifying facts once for the composed operation and supplies its identifier.
268
+ * @evidence contracts/common.md#clear-and-simple-design One optional callback with a single argument object.
269
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts It is a caller-supplied function and nothing about a particular naming scheme is built in.
270
+ * @evidence contracts/common.md#meaningful-documentation The comment documents the arguments and the result.
271
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation This callback receives HTTP endpoint identity and returns an OpenAPI identifier; it owns no native pathname or process boundary.
241
272
  */
242
273
  operationId?(props: {
243
274
  class: string;
@@ -1,10 +1,70 @@
1
1
  import { INestiaConfig } from "./INestiaConfig";
2
+ /**
3
+ * Runs the generators of `@nestia/sdk` over one configuration.
4
+ *
5
+ * Each method validates the configuration for the output it needs, analyzes the
6
+ * controllers and the TypeScript metadata, reports every error at once, and
7
+ * then generates.
8
+ *
9
+ * @evidence contracts/common.md#principled-implementation The shared pipeline reflects controllers, types routes from transform metadata, assigns accessors and rejects collected analysis errors before writing. SDK-specific representability checks are attached by sdk and SDK-producing all; e2e currently invokes the SDK writer without that additional validation callback.
10
+ * @evidence contracts/common.md#clear-and-simple-design One class with four public generators over one private pipeline; directory assertion, title, and error report are module-private helpers.
11
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts No controller or route name is special-cased; the same pipeline serves the CLI and programmatic callers.
12
+ * @evidence contracts/common.md#meaningful-documentation The comment states the four generators and that the errors of an analysis are reported together.
13
+ * @evidence contracts/portability.md#os-neutral-implementation Output checks and diagnostic locations use Node fs.stat and path operations; controller compilation and output writes remain owned by ConfigAnalyzer and the generators. Filesystem errors distinguish missing/non-directory locations from other native failures.
14
+ */
2
15
  export declare class NestiaSdkApplication {
3
16
  private readonly config;
4
17
  constructor(config: INestiaConfig);
18
+ /**
19
+ * Generates everything the configuration asks for: the SDK and its e2e tests
20
+ * when `output` is set, and the Swagger document when `swagger` is set.
21
+ *
22
+ * It throws when neither `output` nor `swagger.output` is configured.
23
+ *
24
+ * @evidence contracts/common.md#principled-implementation The SDK validation is attached only when an SDK is generated, so a Swagger-only run does not fail on SDK rules, and the e2e tests are generated after the SDK they import.
25
+ * @evidence contracts/common.md#clear-and-simple-design One method that composes the generators inside the shared pipeline.
26
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The error names the properties a caller can configure; none is stale.
27
+ * @evidence contracts/common.md#meaningful-documentation The comment states what is generated and the failure.
28
+ * @evidence contracts/portability.md#os-neutral-implementation all delegates configured output creation to the native writers and does not apply the explicit parent-directory checks used by sdk/e2e/swagger. Diagnostic source paths are rendered relative to the current native working directory.
29
+ */
5
30
  all(): Promise<void>;
31
+ /**
32
+ * Generates the SDK and the automatic e2e test functions.
33
+ *
34
+ * It throws when `output` or `e2e` is missing, or when the parent directory
35
+ * of either does not exist.
36
+ *
37
+ * @evidence contracts/common.md#principled-implementation The e2e functions import the generated SDK, so the SDK is generated first, and both parent directories are asserted before any analysis runs.
38
+ * @evidence contracts/common.md#clear-and-simple-design One method over the shared pipeline.
39
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The directory check follows the configuration and no path is special-cased.
40
+ * @evidence contracts/common.md#meaningful-documentation The comment states the requirements and the failures.
41
+ * @evidence contracts/portability.md#os-neutral-implementation path.resolve obtains each native parent and fs.stat follows symlinks to verify a directory before analysis. ENOENT/ENOTDIR become configuration diagnostics; permission and other filesystem errors propagate without a platform-specific shell fallback.
42
+ */
6
43
  e2e(): Promise<void>;
44
+ /**
45
+ * Generates the SDK library.
46
+ *
47
+ * It throws when `output` is missing or its parent directory does not exist.
48
+ *
49
+ * @evidence contracts/common.md#principled-implementation The SDK validation runs after route typing and before the generator, so a route the SDK cannot express is reported instead of written.
50
+ * @evidence contracts/common.md#clear-and-simple-design One method over the shared pipeline.
51
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The directory check follows the configuration.
52
+ * @evidence contracts/common.md#meaningful-documentation The comment states the requirement and the failures.
53
+ * @evidence contracts/portability.md#os-neutral-implementation The configured output parent is resolved through Node path and verified by fs.stat, including linked directories. Generator writes use their own native boundaries; this entry does not infer case identity from an OS name.
54
+ */
7
55
  sdk(): Promise<void>;
56
+ /**
57
+ * Generates the Swagger document.
58
+ *
59
+ * It throws when `swagger.output` is missing or the directory that will hold
60
+ * the document does not exist; the output may be a file or a directory.
61
+ *
62
+ * @evidence contracts/common.md#principled-implementation The directory to check is the parent of a file path with an extension and the path itself otherwise, which is how the generator decides where to write.
63
+ * @evidence contracts/common.md#clear-and-simple-design One method over the shared pipeline.
64
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The rule is the generator's own output rule.
65
+ * @evidence contracts/common.md#meaningful-documentation The comment states the requirement and the two output forms.
66
+ * @evidence contracts/portability.md#os-neutral-implementation path.parse/resolve decide the native containing directory from whether the output has an extension, matching SwaggerGenerator's destination rule. The common directory check distinguishes missing paths from non-directory entries and propagates other filesystem errors.
67
+ */
8
68
  swagger(): Promise<void>;
9
69
  private generate;
10
70
  }
@@ -29,10 +29,35 @@ const SwaggerGenerator_1 = require("./generates/SwaggerGenerator");
29
29
  const IReflectOperationError_1 = require("./structures/IReflectOperationError");
30
30
  const StringUtil_1 = require("./utils/StringUtil");
31
31
  const VersioningStrategy_1 = require("./utils/VersioningStrategy");
32
+ /**
33
+ * Runs the generators of `@nestia/sdk` over one configuration.
34
+ *
35
+ * Each method validates the configuration for the output it needs, analyzes the
36
+ * controllers and the TypeScript metadata, reports every error at once, and
37
+ * then generates.
38
+ *
39
+ * @evidence contracts/common.md#principled-implementation The shared pipeline reflects controllers, types routes from transform metadata, assigns accessors and rejects collected analysis errors before writing. SDK-specific representability checks are attached by sdk and SDK-producing all; e2e currently invokes the SDK writer without that additional validation callback.
40
+ * @evidence contracts/common.md#clear-and-simple-design One class with four public generators over one private pipeline; directory assertion, title, and error report are module-private helpers.
41
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts No controller or route name is special-cased; the same pipeline serves the CLI and programmatic callers.
42
+ * @evidence contracts/common.md#meaningful-documentation The comment states the four generators and that the errors of an analysis are reported together.
43
+ * @evidence contracts/portability.md#os-neutral-implementation Output checks and diagnostic locations use Node fs.stat and path operations; controller compilation and output writes remain owned by ConfigAnalyzer and the generators. Filesystem errors distinguish missing/non-directory locations from other native failures.
44
+ */
32
45
  class NestiaSdkApplication {
33
46
  constructor(config) {
34
47
  this.config = config;
35
48
  }
49
+ /**
50
+ * Generates everything the configuration asks for: the SDK and its e2e tests
51
+ * when `output` is set, and the Swagger document when `swagger` is set.
52
+ *
53
+ * It throws when neither `output` nor `swagger.output` is configured.
54
+ *
55
+ * @evidence contracts/common.md#principled-implementation The SDK validation is attached only when an SDK is generated, so a Swagger-only run does not fail on SDK rules, and the e2e tests are generated after the SDK they import.
56
+ * @evidence contracts/common.md#clear-and-simple-design One method that composes the generators inside the shared pipeline.
57
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The error names the properties a caller can configure; none is stale.
58
+ * @evidence contracts/common.md#meaningful-documentation The comment states what is generated and the failure.
59
+ * @evidence contracts/portability.md#os-neutral-implementation all delegates configured output creation to the native writers and does not apply the explicit parent-directory checks used by sdk/e2e/swagger. Diagnostic source paths are rendered relative to the current native working directory.
60
+ */
36
61
  all() {
37
62
  return __awaiter(this, void 0, void 0, function* () {
38
63
  var _a;
@@ -42,7 +67,6 @@ class NestiaSdkApplication {
42
67
  "",
43
68
  " - INestiaConfig.output",
44
69
  " - INestiaConfig.swagger.output",
45
- " - INestiaConfig.openai.output",
46
70
  ].join("\n"));
47
71
  print_title("Nestia All Generator");
48
72
  yield this.generate({
@@ -59,6 +83,18 @@ class NestiaSdkApplication {
59
83
  });
60
84
  });
61
85
  }
86
+ /**
87
+ * Generates the SDK and the automatic e2e test functions.
88
+ *
89
+ * It throws when `output` or `e2e` is missing, or when the parent directory
90
+ * of either does not exist.
91
+ *
92
+ * @evidence contracts/common.md#principled-implementation The e2e functions import the generated SDK, so the SDK is generated first, and both parent directories are asserted before any analysis runs.
93
+ * @evidence contracts/common.md#clear-and-simple-design One method over the shared pipeline.
94
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The directory check follows the configuration and no path is special-cased.
95
+ * @evidence contracts/common.md#meaningful-documentation The comment states the requirements and the failures.
96
+ * @evidence contracts/portability.md#os-neutral-implementation path.resolve obtains each native parent and fs.stat follows symlinks to verify a directory before analysis. ENOENT/ENOTDIR become configuration diagnostics; permission and other filesystem errors propagate without a platform-specific shell fallback.
97
+ */
62
98
  e2e() {
63
99
  return __awaiter(this, void 0, void 0, function* () {
64
100
  if (!this.config.output)
@@ -86,6 +122,17 @@ class NestiaSdkApplication {
86
122
  });
87
123
  });
88
124
  }
125
+ /**
126
+ * Generates the SDK library.
127
+ *
128
+ * It throws when `output` is missing or its parent directory does not exist.
129
+ *
130
+ * @evidence contracts/common.md#principled-implementation The SDK validation runs after route typing and before the generator, so a route the SDK cannot express is reported instead of written.
131
+ * @evidence contracts/common.md#clear-and-simple-design One method over the shared pipeline.
132
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The directory check follows the configuration.
133
+ * @evidence contracts/common.md#meaningful-documentation The comment states the requirement and the failures.
134
+ * @evidence contracts/portability.md#os-neutral-implementation The configured output parent is resolved through Node path and verified by fs.stat, including linked directories. Generator writes use their own native boundaries; this entry does not infer case identity from an OS name.
135
+ */
89
136
  sdk() {
90
137
  return __awaiter(this, void 0, void 0, function* () {
91
138
  if (!this.config.output)
@@ -103,6 +150,18 @@ class NestiaSdkApplication {
103
150
  });
104
151
  });
105
152
  }
153
+ /**
154
+ * Generates the Swagger document.
155
+ *
156
+ * It throws when `swagger.output` is missing or the directory that will hold
157
+ * the document does not exist; the output may be a file or a directory.
158
+ *
159
+ * @evidence contracts/common.md#principled-implementation The directory to check is the parent of a file path with an extension and the path itself otherwise, which is how the generator decides where to write.
160
+ * @evidence contracts/common.md#clear-and-simple-design One method over the shared pipeline.
161
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The rule is the generator's own output rule.
162
+ * @evidence contracts/common.md#meaningful-documentation The comment states the requirement and the two output forms.
163
+ * @evidence contracts/portability.md#os-neutral-implementation path.parse/resolve decide the native containing directory from whether the output has an extension, matching SwaggerGenerator's destination rule. The common directory check distinguishes missing paths from non-directory entries and propagates other filesystem errors.
164
+ */
106
165
  swagger() {
107
166
  return __awaiter(this, void 0, void 0, function* () {
108
167
  var _a;
@@ -177,8 +236,6 @@ class NestiaSdkApplication {
177
236
  // ANALYZE TYPESCRIPT CODE
178
237
  //----
179
238
  console.log("Analyzing source codes");
180
- // METADATA COMPONENTS
181
- const sourceCollection = TypedHttpRouteAnalyzer_1.TypedHttpRouteAnalyzer.dictionary(controllers);
182
239
  // CONVERT TO TYPED OPERATIONS
183
240
  const routes = [];
184
241
  for (const c of controllers)
@@ -187,6 +244,8 @@ class NestiaSdkApplication {
187
244
  routes.push(...TypedMcpRouteAnalyzer_1.TypedMcpRouteAnalyzer.analyze({
188
245
  controller: c,
189
246
  operation: o,
247
+ clone: project.config.clone,
248
+ errors: project.errors,
190
249
  }));
191
250
  continue;
192
251
  }
@@ -212,7 +271,6 @@ class NestiaSdkApplication {
212
271
  routes.push(...TypedHttpRouteAnalyzer_1.TypedHttpRouteAnalyzer.analyze({
213
272
  controller: c,
214
273
  errors: project.errors,
215
- dictionary: sourceCollection,
216
274
  operation: o,
217
275
  paths: Array.from(pathList),
218
276
  }));
@@ -224,7 +282,7 @@ class NestiaSdkApplication {
224
282
  }));
225
283
  }
226
284
  AccessorAnalyzer_1.AccessorAnalyzer.analyze(routes);
227
- const collection = TypedHttpRouteAnalyzer_1.TypedHttpRouteAnalyzer.routeDictionary(routes.filter((r) => r.protocol === "http"));
285
+ const collection = TypedHttpRouteAnalyzer_1.TypedHttpRouteAnalyzer.routeDictionary(routes.filter((r) => r.protocol !== "websocket"));
228
286
  if (props.validate !== undefined)
229
287
  project.errors.push(...props.validate({
230
288
  project,
@@ -1 +1 @@
1
- {"version":3,"file":"NestiaSdkApplication.js","sourceRoot":"","sources":["../src/NestiaSdkApplication.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,4CAAoB;AACpB,gDAAwB;AACxB,+BAA8C;AAG9C,kEAA+D;AAC/D,8DAA2D;AAC3D,0DAAuD;AACvD,oFAAiF;AACjF,8EAA2E;AAC3E,4EAAyE;AACzE,wFAAqF;AACrF,2DAAwD;AACxD,2DAAwD;AACxD,mEAAgE;AAKhE,gFAA6E;AAK7E,mDAAgD;AAChD,mEAAgE;AAEhE;IACE,YAAoC,MAAqB;sBAArB,MAAM;IAAkB,CAAC;IAEhD,GAAG;;;YACd,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,IAAI,EAAC,MAAA,IAAI,CAAC,MAAM,CAAC,OAAO,0CAAE,MAAM,CAAA;gBACrD,MAAM,IAAI,KAAK,CACb;oBACE,kGAAkG;oBAClG,EAAE;oBACF,0BAA0B;oBAC1B,kCAAkC;oBAClC,iCAAiC;iBAClC,CAAC,IAAI,CAAC,IAAI,CAAC,CACb,CAAC;YACJ,WAAW,CAAC,sBAAsB,CAAC,CAAC;YACpC,MAAM,IAAI,CAAC,QAAQ,CAAC;gBAClB,QAAQ,EAAE,CAAO,GAAG,EAAE,EAAE;oBACtB,IAAI,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC;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AO,CAAC,CAAC,IAAI,IAAI;wBACrB,GAAG,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,SAAS,GAAG,EAAE,CAAC;qBAC3C,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACjB,CAAC,CAAC;iBACD,IAAI,CAAC,IAAI,CAAC;SACd,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACX,IAAI,KAAK,CAAC,IAAI,KAAK,OAAO;YAAE,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;;YAC9C,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IAC5B,CAAC;IACD,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC;QAAE,MAAM,IAAI,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;AACpE,CAAC,CAAC;AAEF,MAAM,SAAS,GAAG,CAAC,KAAe,EAAY,EAAE,CAC9C,KAAK,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC"}
@@ -2,6 +2,27 @@ import { INestApplication } from "@nestjs/common";
2
2
  import { OpenApiV3, OpenApiV3_1, SwaggerV2 } from "@typia/interface";
3
3
  import { OpenApi } from "typia";
4
4
  import { INestiaConfig } from "./INestiaConfig";
5
+ /**
6
+ * Composes the Swagger document of a running NestJS application, without files.
7
+ *
8
+ * @evidence contracts/common.md#principled-implementation The controllers are taken from the application's module graph and analyzed like the CLI does, and only the HTTP routes are composed.
9
+ * @evidence contracts/common.md#clear-and-simple-design One public function with a private analysis pipeline.
10
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts It uses the same analyzers and composer as the CLI, so both produce one document.
11
+ * @evidence contracts/common.md#meaningful-documentation The comment states its purpose.
12
+ * @evidence contracts/portability.md#os-neutral-implementation Controller source lookup is delegated to ConfigAnalyzer.application; diagnostic filenames use Node path.relative from process.cwd. Route paths and versions remain protocol text rather than native filesystem identity.
13
+ */
5
14
  export declare namespace NestiaSwaggerComposer {
15
+ /**
16
+ * Returns the OpenAPI document of the application in the requested version.
17
+ *
18
+ * The document is composed as OpenAPI 3.2 and converted to the configured
19
+ * older version; every analysis error is collected and thrown together.
20
+ *
21
+ * @evidence contracts/common.md#principled-implementation Composition runs at the newest version and `OpenApiConverter.downgradeDocument` produces the older ones, so version differences live in one converter, and a failure of the analysis throws one error that lists every problem.
22
+ * @evidence contracts/common.md#clear-and-simple-design One function over the shared analyzers and the Swagger generator.
23
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts No route is special-cased; the module graph is read through `ConfigAnalyzer.application`.
24
+ * @evidence contracts/common.md#meaningful-documentation The comment states the returned versions and the error behavior.
25
+ * @evidence contracts/portability.md#os-neutral-implementation The composer receives an existing application and writes no output file. Its delegated controller discovery obtains native source locations, and its report renders those locations through path.relative; initialize may read package metadata for default info.
26
+ */
6
27
  const document: (app: INestApplication, config: Omit<INestiaConfig.ISwaggerConfig, "output">) => Promise<OpenApi.IDocument | OpenApiV3_1.IDocument | OpenApiV3.IDocument | SwaggerV2.IDocument>;
7
28
  }
@@ -24,8 +24,29 @@ const TypedHttpRouteAnalyzer_1 = require("./analyses/TypedHttpRouteAnalyzer");
24
24
  const SwaggerGenerator_1 = require("./generates/SwaggerGenerator");
25
25
  const IReflectOperationError_1 = require("./structures/IReflectOperationError");
26
26
  const VersioningStrategy_1 = require("./utils/VersioningStrategy");
27
+ /**
28
+ * Composes the Swagger document of a running NestJS application, without files.
29
+ *
30
+ * @evidence contracts/common.md#principled-implementation The controllers are taken from the application's module graph and analyzed like the CLI does, and only the HTTP routes are composed.
31
+ * @evidence contracts/common.md#clear-and-simple-design One public function with a private analysis pipeline.
32
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts It uses the same analyzers and composer as the CLI, so both produce one document.
33
+ * @evidence contracts/common.md#meaningful-documentation The comment states its purpose.
34
+ * @evidence contracts/portability.md#os-neutral-implementation Controller source lookup is delegated to ConfigAnalyzer.application; diagnostic filenames use Node path.relative from process.cwd. Route paths and versions remain protocol text rather than native filesystem identity.
35
+ */
27
36
  var NestiaSwaggerComposer;
28
37
  (function (NestiaSwaggerComposer) {
38
+ /**
39
+ * Returns the OpenAPI document of the application in the requested version.
40
+ *
41
+ * The document is composed as OpenAPI 3.2 and converted to the configured
42
+ * older version; every analysis error is collected and thrown together.
43
+ *
44
+ * @evidence contracts/common.md#principled-implementation Composition runs at the newest version and `OpenApiConverter.downgradeDocument` produces the older ones, so version differences live in one converter, and a failure of the analysis throws one error that lists every problem.
45
+ * @evidence contracts/common.md#clear-and-simple-design One function over the shared analyzers and the Swagger generator.
46
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts No route is special-cased; the module graph is read through `ConfigAnalyzer.application`.
47
+ * @evidence contracts/common.md#meaningful-documentation The comment states the returned versions and the error behavior.
48
+ * @evidence contracts/portability.md#os-neutral-implementation The composer receives an existing application and writes no output file. Its delegated controller discovery obtains native source locations, and its report renders those locations through path.relative; initialize may read package metadata for default info.
49
+ */
29
50
  NestiaSwaggerComposer.document = (app, config) => __awaiter(this, void 0, void 0, function* () {
30
51
  var _a;
31
52
  const input = yield ConfigAnalyzer_1.ConfigAnalyzer.application(app);
@@ -53,8 +74,6 @@ var NestiaSwaggerComposer;
53
74
  .filter((c) => c !== null);
54
75
  if (project.errors.length)
55
76
  throw report({ type: "error", errors: project.errors });
56
- // METADATA COMPONENTS
57
- const collection = TypedHttpRouteAnalyzer_1.TypedHttpRouteAnalyzer.dictionary(controllers);
58
77
  // CONVERT TO TYPED OPERATIONS
59
78
  const routes = [];
60
79
  for (const c of controllers)
@@ -82,7 +101,6 @@ var NestiaSwaggerComposer;
82
101
  routes.push(...TypedHttpRouteAnalyzer_1.TypedHttpRouteAnalyzer.analyze({
83
102
  controller: c,
84
103
  errors: project.errors,
85
- dictionary: collection,
86
104
  operation: o,
87
105
  paths: Array.from(pathList),
88
106
  }));
@@ -1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jB,CAAC,CAAC;iBACD,IAAI,CAAC,IAAI,CAAC;SACd,CAAC,IAAI,CAAC,EAAE,CAAC,CACX,CAAC;IACJ,CAAC;IACD,MAAM,IAAI,KAAK,CACb,8CAA8C,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CACtE,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,SAAS,GAAG,CAAC,KAAe,EAAY,EAAE,CAC9C,KAAK,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC"}
@@ -2,7 +2,33 @@ import { ITypedHttpRoute } from "../structures/ITypedHttpRoute";
2
2
  import { ITypedMcpRoute } from "../structures/ITypedMcpRoute";
3
3
  import { ITypedWebSocketRoute } from "../structures/ITypedWebSocketRoute";
4
4
  type AnyRoute = ITypedHttpRoute | ITypedWebSocketRoute | ITypedMcpRoute;
5
+ /**
6
+ * Assigns each route the accessor path under which the generated SDK exposes
7
+ * it.
8
+ *
9
+ * @evidence contracts/common.md#principled-implementation The accessors are shrunk where a name repeats, escaped into valid unique identifiers, shrunk again, and each route is renamed to its last accessor segment.
10
+ * @evidence contracts/common.md#clear-and-simple-design One public function over three private passes.
11
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The passes follow the accessor structure and no route or controller name is special-cased.
12
+ * @evidence contracts/common.md#meaningful-documentation The comment states its purpose.
13
+ * efficient algorithms: For R routes of at most D accessor segments, the prefix maps avoid repeated route-to-route searches. Prefix slicing and joining costs O(R D²) character work before collision escapes; collisions add probes and longer names. Two shrink passes are required around escaping because escaping changes the names being shrunk.
14
+ * reuse equivalent work: This invocation computes its own result and coordinates no completed or in-flight computation across requests.
15
+ * bound retention and release resources: This operation owns only invocation-local values, with no retained cache, handle or background task.
16
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation AccessorAnalyzer 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.
17
+ */
5
18
  export declare namespace AccessorAnalyzer {
19
+ /**
20
+ * Rewrites the accessor of every route in place so that accessors are valid,
21
+ * unique, and as short as they can be.
22
+ *
23
+ * @evidence contracts/common.md#principled-implementation Segments that repeat their parent are removed when no sibling shares the parent, non-identifier characters become underscores, a segment that collides with an existing accessor gets an underscore prefix, and the route name becomes the last segment.
24
+ * @evidence contracts/common.md#clear-and-simple-design One function that runs the passes in a fixed order.
25
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The rules apply to every route, and reserved names are computed from the routes themselves.
26
+ * @evidence contracts/common.md#meaningful-documentation The comment states the passes and the in-place rewrite.
27
+ * efficient algorithms: For R routes of at most D accessor segments, the prefix maps avoid repeated route-to-route searches. Prefix slicing and joining costs O(R D²) character work before collision escapes; collisions add probes and longer names. Two shrink passes are required around escaping because escaping changes the names being shrunk.
28
+ * reuse equivalent work: This invocation computes its own result and coordinates no completed or in-flight computation across requests.
29
+ * bound retention and release resources: This operation owns only invocation-local values, with no retained cache, handle or background task.
30
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation AccessorAnalyzer.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.
31
+ */
6
32
  const analyze: (routes: Array<AnyRoute>) => void;
7
33
  }
8
34
  export {};