@nestia/sdk 14.0.1 → 14.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (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 +48 -73
  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 +21 -2
  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 +30 -0
  195. package/lib/structures/IOperationMetadata.d.ts +55 -0
  196. package/lib/structures/IReflectController.d.ts +10 -0
  197. package/lib/structures/IReflectHttpOperation.d.ts +10 -0
  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 +26 -1
  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 +388 -397
  270. package/package.json +7 -5
  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 +49 -87
  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 +47 -0
  286. package/src/analyses/ReflectWebSocketOperationAnalyzer.ts +33 -4
  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 +30 -0
  338. package/src/structures/IOperationMetadata.ts +55 -0
  339. package/src/structures/IReflectController.ts +10 -0
  340. package/src/structures/IReflectHttpOperation.ts +10 -0
  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 +33 -13
  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,9 +1,72 @@
1
1
  import { ImportDictionary } from "./ImportDictionary";
2
+ /**
3
+ * The imports of the SDK's runtime dependencies.
4
+ *
5
+ * @evidence contracts/common.md#principled-implementation The namespace names each dependency once so every generator registers it the same way.
6
+ * @evidence contracts/common.md#clear-and-simple-design Six one-call helpers.
7
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts Each helper registers one fixed import.
8
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
9
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation SdkImportWizard composes SDK syntax, identifiers or import bindings; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
10
+ */
2
11
  export declare namespace SdkImportWizard {
12
+ /**
13
+ * Returns the import of the fetcher: the encrypted one or the plain one.
14
+ *
15
+ * @evidence contracts/common.md#principled-implementation The choice follows the route.
16
+ * @evidence contracts/common.md#clear-and-simple-design One conditional.
17
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts It returns the registering function.
18
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
19
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation SdkImportWizard.Fetcher composes SDK syntax, identifiers or import bindings; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
20
+ */
3
21
  const Fetcher: (encrypted: boolean) => (importer: ImportDictionary) => string;
22
+ /**
23
+ * Registers `HttpError` of `@nestia/fetcher`.
24
+ *
25
+ * @evidence contracts/common.md#principled-implementation It is a type import.
26
+ * @evidence contracts/common.md#clear-and-simple-design One call.
27
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The import is fixed.
28
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
29
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation SdkImportWizard.HttpError composes SDK syntax, identifiers or import bindings; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
30
+ */
4
31
  const HttpError: (importer: ImportDictionary) => string;
32
+ /**
33
+ * Registers `IConnection` of `@nestia/fetcher`.
34
+ *
35
+ * @evidence contracts/common.md#principled-implementation It is a type import.
36
+ * @evidence contracts/common.md#clear-and-simple-design One call.
37
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The import is fixed.
38
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
39
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation SdkImportWizard.IConnection composes SDK syntax, identifiers or import bindings; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
40
+ */
5
41
  const IConnection: (importer: ImportDictionary) => string;
42
+ /**
43
+ * Registers `Primitive` of `typia`.
44
+ *
45
+ * @evidence contracts/common.md#principled-implementation It is a type import.
46
+ * @evidence contracts/common.md#clear-and-simple-design One call.
47
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The import is fixed.
48
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
49
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation SdkImportWizard.Primitive composes SDK syntax, identifiers or import bindings; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
50
+ */
6
51
  const Primitive: (importer: ImportDictionary) => string;
52
+ /**
53
+ * Registers `Resolved` of `typia`.
54
+ *
55
+ * @evidence contracts/common.md#principled-implementation It is a type import.
56
+ * @evidence contracts/common.md#clear-and-simple-design One call.
57
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The import is fixed.
58
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
59
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation SdkImportWizard.Resolved composes SDK syntax, identifiers or import bindings; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
60
+ */
7
61
  const Resolved: (importer: ImportDictionary) => string;
62
+ /**
63
+ * Registers the default import of `typia`.
64
+ *
65
+ * @evidence contracts/common.md#principled-implementation It is a value import.
66
+ * @evidence contracts/common.md#clear-and-simple-design One call.
67
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The import is fixed.
68
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
69
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation SdkImportWizard.typia composes SDK syntax, identifiers or import bindings; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
70
+ */
8
71
  const typia: (importer: ImportDictionary) => string;
9
72
  }
@@ -1,33 +1,96 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SdkImportWizard = void 0;
4
+ /**
5
+ * The imports of the SDK's runtime dependencies.
6
+ *
7
+ * @evidence contracts/common.md#principled-implementation The namespace names each dependency once so every generator registers it the same way.
8
+ * @evidence contracts/common.md#clear-and-simple-design Six one-call helpers.
9
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts Each helper registers one fixed import.
10
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
11
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation SdkImportWizard composes SDK syntax, identifiers or import bindings; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
12
+ */
4
13
  var SdkImportWizard;
5
14
  (function (SdkImportWizard) {
15
+ /**
16
+ * Returns the import of the fetcher: the encrypted one or the plain one.
17
+ *
18
+ * @evidence contracts/common.md#principled-implementation The choice follows the route.
19
+ * @evidence contracts/common.md#clear-and-simple-design One conditional.
20
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts It returns the registering function.
21
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
22
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation SdkImportWizard.Fetcher composes SDK syntax, identifiers or import bindings; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
23
+ */
6
24
  SdkImportWizard.Fetcher = (encrypted) => encrypted ? EncryptedFetcher : PlainFetcher;
25
+ /**
26
+ * Registers `HttpError` of `@nestia/fetcher`.
27
+ *
28
+ * @evidence contracts/common.md#principled-implementation It is a type import.
29
+ * @evidence contracts/common.md#clear-and-simple-design One call.
30
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The import is fixed.
31
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
32
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation SdkImportWizard.HttpError composes SDK syntax, identifiers or import bindings; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
33
+ */
7
34
  SdkImportWizard.HttpError = (importer) => importer.external({
8
35
  declaration: true,
9
36
  file: "@nestia/fetcher",
10
37
  type: "element",
11
38
  name: "HttpError",
12
39
  });
40
+ /**
41
+ * Registers `IConnection` of `@nestia/fetcher`.
42
+ *
43
+ * @evidence contracts/common.md#principled-implementation It is a type import.
44
+ * @evidence contracts/common.md#clear-and-simple-design One call.
45
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The import is fixed.
46
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
47
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation SdkImportWizard.IConnection composes SDK syntax, identifiers or import bindings; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
48
+ */
13
49
  SdkImportWizard.IConnection = (importer) => importer.external({
14
50
  declaration: true,
15
51
  file: "@nestia/fetcher",
16
52
  type: "element",
17
53
  name: "IConnection",
18
54
  });
55
+ /**
56
+ * Registers `Primitive` of `typia`.
57
+ *
58
+ * @evidence contracts/common.md#principled-implementation It is a type import.
59
+ * @evidence contracts/common.md#clear-and-simple-design One call.
60
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The import is fixed.
61
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
62
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation SdkImportWizard.Primitive composes SDK syntax, identifiers or import bindings; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
63
+ */
19
64
  SdkImportWizard.Primitive = (importer) => importer.external({
20
65
  declaration: true,
21
66
  file: "typia",
22
67
  type: "element",
23
68
  name: "Primitive",
24
69
  });
70
+ /**
71
+ * Registers `Resolved` of `typia`.
72
+ *
73
+ * @evidence contracts/common.md#principled-implementation It is a type import.
74
+ * @evidence contracts/common.md#clear-and-simple-design One call.
75
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The import is fixed.
76
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
77
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation SdkImportWizard.Resolved composes SDK syntax, identifiers or import bindings; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
78
+ */
25
79
  SdkImportWizard.Resolved = (importer) => importer.external({
26
80
  declaration: true,
27
81
  file: "typia",
28
82
  type: "element",
29
83
  name: "Resolved",
30
84
  });
85
+ /**
86
+ * Registers the default import of `typia`.
87
+ *
88
+ * @evidence contracts/common.md#principled-implementation It is a value import.
89
+ * @evidence contracts/common.md#clear-and-simple-design One call.
90
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The import is fixed.
91
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
92
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation SdkImportWizard.typia composes SDK syntax, identifiers or import bindings; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
93
+ */
31
94
  SdkImportWizard.typia = (importer) => importer.external({
32
95
  declaration: false,
33
96
  file: "typia",
@@ -1 +1 @@
1
- {"version":3,"file":"SdkImportWizard.js","sourceRoot":"","sources":["../../../src/generates/internal/SdkImportWizard.ts"],"names":[],"mappings":";;;AAEA,IAAiB,eAAe,CA2C/B;AA3CD,WAAiB,eAAe;IACjB,uBAAO,GAAG,CAAC,SAAkB,EAAE,EAAE,CAC5C,SAAS,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,YAAY,CAAC;IAEjC,yBAAS,GAAG,CAAC,QAA0B,EAAE,EAAE,CACtD,QAAQ,CAAC,QAAQ,CAAC;QAChB,WAAW,EAAE,IAAI;QACjB,IAAI,EAAE,iBAAiB;QACvB,IAAI,EAAE,SAAS;QACf,IAAI,EAAE,WAAW;KAClB,CAAC,CAAC;IAEQ,2BAAW,GAAG,CAAC,QAA0B,EAAE,E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b,IAAI,EAAE,SAAS;QACf,IAAI,EAAE,OAAO;KACd,CAAC,CAAC;AACP,CAAC,EAjGgB,eAAe,aAAf,eAAe,GAAf,eAAe,QAiG/B;AAED,MAAM,YAAY,GAAG,CAAC,QAA0B,EAAE,EAAE,CAClD,QAAQ,CAAC,QAAQ,CAAC;IAChB,WAAW,EAAE,KAAK;IAClB,IAAI,EAAE,iBAAiB;IACvB,IAAI,EAAE,SAAS;IACf,IAAI,EAAE,cAAc;CACrB,CAAC,CAAC;AAEL,MAAM,gBAAgB,GAAG,CAAC,QAA0B,EAAE,EAAE,CACtD,QAAQ,CAAC,QAAQ,CAAC;IAChB,WAAW,EAAE,KAAK;IAClB,IAAI,EAAE,sCAAsC;IAC5C,IAAI,EAAE,SAAS;IACf,IAAI,EAAE,kBAAkB;CACzB,CAAC,CAAC"}
@@ -5,11 +5,26 @@ import { ImportDictionary } from "./ImportDictionary";
5
5
  /**
6
6
  * Emits a typed client wrapper for an MCP tool.
7
7
  *
8
- * Object output types are wrapped in `Primitive<T>` because MCP round-trips
9
- * values through JSON. Void MCP tools return `Promise<void>`.
8
+ * Cloned input and output declarations use the native JSON wire graph.
9
+ * Source-reference output types use `Primitive<T>` for the same JSON
10
+ * round-trip. Void MCP tools return `Promise<void>`.
10
11
  *
11
12
  * @author wildduck - https://github.com/wildduck2
13
+ * @evidence contracts/common.md#principled-implementation The namespace prints the wrapper that calls the tool and its metadata, and turns a tool error into an exception.
14
+ * @evidence contracts/common.md#clear-and-simple-design One public function and the writers.
15
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The function's identifiers yield to the tool's own name.
16
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
17
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation SdkMcpRouteProgrammer composes SDK syntax, identifiers or import bindings; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
12
18
  */
13
19
  export declare namespace SdkMcpRouteProgrammer {
20
+ /**
21
+ * Returns the function and the namespace of an MCP tool.
22
+ *
23
+ * @evidence contracts/common.md#principled-implementation The two nodes are composed together so they share names.
24
+ * @evidence contracts/common.md#clear-and-simple-design One function.
25
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The shape follows the tool metadata.
26
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
27
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation SdkMcpRouteProgrammer.write composes SDK syntax, identifiers or import bindings; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
28
+ */
14
29
  const write: (project: INestiaProject) => (importer: ImportDictionary) => (route: ITypedMcpRoute) => Node[];
15
30
  }
@@ -5,16 +5,32 @@ const factory_1 = require("@ttsc/factory");
5
5
  const IdentifierFactory_1 = require("../../factories/IdentifierFactory");
6
6
  const StringUtil_1 = require("../../utils/StringUtil");
7
7
  const FilePrinter_1 = require("./FilePrinter");
8
+ const SdkTypeProgrammer_1 = require("./SdkTypeProgrammer");
8
9
  /**
9
10
  * Emits a typed client wrapper for an MCP tool.
10
11
  *
11
- * Object output types are wrapped in `Primitive<T>` because MCP round-trips
12
- * values through JSON. Void MCP tools return `Promise<void>`.
12
+ * Cloned input and output declarations use the native JSON wire graph.
13
+ * Source-reference output types use `Primitive<T>` for the same JSON
14
+ * round-trip. Void MCP tools return `Promise<void>`.
13
15
  *
14
16
  * @author wildduck - https://github.com/wildduck2
17
+ * @evidence contracts/common.md#principled-implementation The namespace prints the wrapper that calls the tool and its metadata, and turns a tool error into an exception.
18
+ * @evidence contracts/common.md#clear-and-simple-design One public function and the writers.
19
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The function's identifiers yield to the tool's own name.
20
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
21
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation SdkMcpRouteProgrammer composes SDK syntax, identifiers or import bindings; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
15
22
  */
16
23
  var SdkMcpRouteProgrammer;
17
24
  (function (SdkMcpRouteProgrammer) {
25
+ /**
26
+ * Returns the function and the namespace of an MCP tool.
27
+ *
28
+ * @evidence contracts/common.md#principled-implementation The two nodes are composed together so they share names.
29
+ * @evidence contracts/common.md#clear-and-simple-design One function.
30
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The shape follows the tool metadata.
31
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
32
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation SdkMcpRouteProgrammer.write composes SDK syntax, identifiers or import bindings; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
33
+ */
18
34
  SdkMcpRouteProgrammer.write = (project) => (importer) => (route) => [
19
35
  FilePrinter_1.FilePrinter.description(writeFunction(project)(importer)(route), writeDescription(route)),
20
36
  writeNamespace(project)(importer)(route),
@@ -45,7 +61,7 @@ var SdkMcpRouteProgrammer;
45
61
  alias: "McpCallToolResult",
46
62
  });
47
63
  const isVoid = isVoidReturn(route);
48
- if (!isVoid)
64
+ if (!isVoid && _project.config.clone !== true)
49
65
  importer.external({
50
66
  declaration: true,
51
67
  file: "typia",
@@ -104,19 +120,23 @@ var SdkMcpRouteProgrammer;
104
120
  factory_1.factory.createModifier(factory_1.SyntaxKind.AsyncKeyword),
105
121
  ], undefined, route.name, undefined, params, factory_1.factory.createTypeReferenceNode("Promise", [outputRef]), body);
106
122
  };
107
- const writeNamespace = (_project) => (importer) => (route) => {
123
+ const writeNamespace = (project) => (importer) => (route) => {
108
124
  const statements = [];
109
125
  if (route.input)
110
- statements.push(factory_1.factory.createTypeAliasDeclaration([factory_1.factory.createModifier(factory_1.SyntaxKind.ExportKeyword)], "Input", undefined, factory_1.factory.createTypeReferenceNode(route.input.type.name)));
126
+ statements.push(factory_1.factory.createTypeAliasDeclaration([factory_1.factory.createModifier(factory_1.SyntaxKind.ExportKeyword)], "Input", undefined, project.config.clone === true && route.inputMetadata
127
+ ? SdkTypeProgrammer_1.SdkTypeProgrammer.write(project)(importer)(route.inputMetadata)
128
+ : factory_1.factory.createTypeReferenceNode(route.input.type.name)));
111
129
  const outputType = !isVoidReturn(route) && route.returnType !== null
112
- ? factory_1.factory.createTypeReferenceNode(importer.external({
113
- declaration: true,
114
- file: "typia",
115
- type: "element",
116
- name: "Primitive",
117
- }), [
118
- factory_1.factory.createTypeReferenceNode(unwrapPromise(route.returnType.name)),
119
- ])
130
+ ? project.config.clone === true && route.outputMetadata
131
+ ? SdkTypeProgrammer_1.SdkTypeProgrammer.write(project)(importer)(route.outputMetadata)
132
+ : factory_1.factory.createTypeReferenceNode(importer.external({
133
+ declaration: true,
134
+ file: "typia",
135
+ type: "element",
136
+ name: "Primitive",
137
+ }), [
138
+ factory_1.factory.createTypeReferenceNode(unwrapPromise(route.returnType.name)),
139
+ ])
120
140
  : factory_1.factory.createKeywordTypeNode(factory_1.SyntaxKind.VoidKeyword);
121
141
  statements.push(factory_1.factory.createTypeAliasDeclaration([factory_1.factory.createModifier(factory_1.SyntaxKind.ExportKeyword)], "Output", undefined, outputType));
122
142
  statements.push(factory_1.factory.createVariableStatement([factory_1.factory.createModifier(factory_1.SyntaxKind.ExportKeyword)], factory_1.factory.createVariableDeclarationList([
@@ -1 +1 @@
1
- {"version":3,"file":"SdkMcpRouteProgrammer.js","sourceRoot":"","sources":["../../../src/generates/internal/SdkMcpRouteProgrammer.ts"],"names":[],"mappings":";;;AAAA,2CASuB;AAEvB,yEAAsE;AAGtE,uDAAoD;AACpD,+CAA4C;AAG5C;;;;;;;GAOG;AACH,IAAiB,qBAAqB,CAqgBrC;AArgBD,WAAiB,qBAAqB;IACvB,2BAAK,GAChB,CAAC,OAAuB,EAAE,EAAE,CAC5B,CAAC,QAA0B,EAAE,EAAE,CAC/B,CAAC,KAAqB,EAAU,EAAE,CAAC;QACjC,yBAAW,CAAC,WAAW,CACrB,aAAa,CAAC,OAAO,CAAC,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC,EACvC,gBAAgB,CAAC,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AC,mBAAmB,CACzB,SAAS,EACT,SAAS,EACT,CAAC,qCAAiB,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,EACtC,SAAS,EACT,SAAS,EACT,iBAAO,CAAC,8BAA8B,CACpC,KAAK,EAAE,EACP,MAAM,CACP,CACF;iBACF,CACF,EACD,MAAM,CACP,EACD,SAAS,EACT,CAAC,iBAAO,CAAC,mBAAmB,CAAC,IAAI,CAAC,CAAC,CACpC,EACD,iBAAO,CAAC,kBAAkB,CAAC,EAAE,CAAC,CAC/B;aACF,CACF;SACF,CACF,CACF,CAAC;IACJ,CAAC,CAAC;IAEF,MAAM,cAAc,GAAG,CACrB,YAAwB,EACxB,MAAc,EACH,EAAE,CACb,iBAAO,CAAC,oBAAoB,CAC1B,iBAAO,CAAC,mBAAmB,CACzB,iBAAO,CAAC,gBAAgB,CAAC,OAAO,CAAC,EACjC,SAAS,EACT;QACE,iBAAO,CAAC,wBAAwB,CAC9B,iBAAO,CAAC,kBAAkB,CAAC,YAAY,CAAC,EACxC;YACE,iBAAO,CAAC,kBAAkB,CACxB,YAAY,EACZ,iBAAO,CAAC,kBAAkB,CAAC,MAAM,CAAC,CACnC;SACF,CACF;KACF,CACF,CACF,CAAC;AACN,CAAC,EArgBgB,qBAAqB,aAArB,qBAAqB,GAArB,qBAAqB,QAqgBrC"}
1
+ {"version":3,"file":"SdkMcpRouteProgrammer.js","sourceRoot":"","sources":["../../../src/generates/internal/SdkMcpRouteProgrammer.ts"],"names":[],"mappings":";;;AAAA,2CASuB;AAEvB,yEAAsE;AAGtE,uDAAoD;AACpD,+CAA4C;AAE5C,2DAAwD;AAExD;;;;;;;;;;;;;GAaG;AACH,IAAiB,qBAAqB,CAkhBrC;AAlhBD,WAAiB,qBAAqB;IACpC;;;;;;;;OAQG;IACU,2BAAK,GAChB,CAAC,OAAuB,EAAE,EAAE,CAC5B,CAAC,QAA0B,EAAE,EAAE,CAC/B,CAAC,KAAqB,EAAU,EAAE,CAAC;QACjC,yBAAW,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,kBAAkB,CAAC,MAAM,CAAC,CACnC;SACF,CACF;KACF,CACF,CACF,CAAC;AACN,CAAC,EAlhBgB,qBAAqB,aAArB,qBAAqB,GAArB,qBAAqB,QAkhBrC"}
@@ -1,5 +1,14 @@
1
1
  import { type Expression } from "@ttsc/factory";
2
2
  import { ImportDictionary } from "./ImportDictionary";
3
+ /**
4
+ * The path expression of an SDK function.
5
+ *
6
+ * @evidence contracts/common.md#principled-implementation The namespace composes the route's path from its segments, filling the parameters through the fetcher's encoder.
7
+ * @evidence contracts/common.md#clear-and-simple-design One function.
8
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The segments are those the router reads.
9
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
10
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation SdkPathTemplate composes SDK syntax, identifiers or import bindings; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
11
+ */
3
12
  export declare namespace SdkPathTemplate {
4
13
  /**
5
14
  * The expression an SDK function builds its route's path with: the literal
@@ -12,6 +21,12 @@ export declare namespace SdkPathTemplate {
12
21
  * router reads the path, so a parameter with literal text beside it in its
13
22
  * segment, such as `/files/:id.json` or `/range/:from-:to`, is filled in
14
23
  * where it stands.
24
+ *
25
+ * @evidence contracts/common.md#principled-implementation A path without a parameter is a literal, and otherwise a template holding each parameter's `PathParameter.encode` call between its literal texts.
26
+ * @evidence contracts/common.md#clear-and-simple-design One function.
27
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The literal text follows the router's reading.
28
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
29
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation SdkPathTemplate.compose composes SDK syntax, identifiers or import bindings; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
15
30
  */
16
31
  const compose: (props: {
17
32
  importer: ImportDictionary;
@@ -4,6 +4,15 @@ exports.SdkPathTemplate = void 0;
4
4
  const factory_1 = require("@ttsc/factory");
5
5
  const PathAnalyzer_1 = require("../../analyses/PathAnalyzer");
6
6
  const IdentifierFactory_1 = require("../../factories/IdentifierFactory");
7
+ /**
8
+ * The path expression of an SDK function.
9
+ *
10
+ * @evidence contracts/common.md#principled-implementation The namespace composes the route's path from its segments, filling the parameters through the fetcher's encoder.
11
+ * @evidence contracts/common.md#clear-and-simple-design One function.
12
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The segments are those the router reads.
13
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
14
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation SdkPathTemplate composes SDK syntax, identifiers or import bindings; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
15
+ */
7
16
  var SdkPathTemplate;
8
17
  (function (SdkPathTemplate) {
9
18
  /**
@@ -17,6 +26,12 @@ var SdkPathTemplate;
17
26
  * router reads the path, so a parameter with literal text beside it in its
18
27
  * segment, such as `/files/:id.json` or `/range/:from-:to`, is filled in
19
28
  * where it stands.
29
+ *
30
+ * @evidence contracts/common.md#principled-implementation A path without a parameter is a literal, and otherwise a template holding each parameter's `PathParameter.encode` call between its literal texts.
31
+ * @evidence contracts/common.md#clear-and-simple-design One function.
32
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The literal text follows the router's reading.
33
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
34
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation SdkPathTemplate.compose composes SDK syntax, identifiers or import bindings; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
20
35
  */
21
36
  SdkPathTemplate.compose = (props) => {
22
37
  const segments = PathAnalyzer_1.PathAnalyzer.segments(props.path);
@@ -1 +1 @@
1
- {"version":3,"file":"SdkPathTemplate.js","sourceRoot":"","sources":["../../../src/generates/internal/SdkPathTemplate.ts"],"names":[],"mappings":";;;AAAA,2CAAyD;AAEzD,8DAA2D;AAC3D,yEAAsE;AAGtE,IAAiB,eAAe,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IAAI,CAAC,CAAC,CAC1D,EACD,CAAC,CAAC,KAAK,UAAU,CAAC,MAAM,GAAG,CAAC;YAC1B,CAAC,CAAC,iBAAO,CAAC,oBAAoB;YAC9B,CAAC,CAAC,iBAAO,CAAC,kBAAkB,CAAC,CAAC,QAAQ,CAAC,CAAC,GAAG,CAAC,CAAE,CAAC,CAClD,CACF,CACF,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC,EAxEgB,eAAe,aAAf,eAAe,GAAf,eAAe,QAwE/B"}
@@ -1,6 +1,16 @@
1
1
  import { ITypedHttpRoute } from "../../structures/ITypedHttpRoute";
2
2
  import { ITypedMcpRoute } from "../../structures/ITypedMcpRoute";
3
3
  import { ITypedWebSocketRoute } from "../../structures/ITypedWebSocketRoute";
4
+ /**
5
+ * One directory of the functional tree: its parent, its name, its module path,
6
+ * its children, and its routes.
7
+ *
8
+ * @evidence contracts/common.md#principled-implementation The module path is the parent's path with the name, from `api.functional`.
9
+ * @evidence contracts/common.md#clear-and-simple-design Parent and segment name identify one node; its derived module name, children and routes organize the generated functional tree.
10
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The members are set once and only the collections grow.
11
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
12
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation SdkRouteDirectory composes SDK syntax, identifiers or import bindings; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
13
+ */
4
14
  export declare class SdkRouteDirectory {
5
15
  readonly parent: SdkRouteDirectory | null;
6
16
  readonly name: string;
@@ -1,6 +1,16 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SdkRouteDirectory = void 0;
4
+ /**
5
+ * One directory of the functional tree: its parent, its name, its module path,
6
+ * its children, and its routes.
7
+ *
8
+ * @evidence contracts/common.md#principled-implementation The module path is the parent's path with the name, from `api.functional`.
9
+ * @evidence contracts/common.md#clear-and-simple-design Parent and segment name identify one node; its derived module name, children and routes organize the generated functional tree.
10
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The members are set once and only the collections grow.
11
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
12
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation SdkRouteDirectory composes SDK syntax, identifiers or import bindings; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
13
+ */
4
14
  class SdkRouteDirectory {
5
15
  constructor(parent, name) {
6
16
  this.parent = parent;
@@ -1 +1 @@
1
- {"version":3,"file":"SdkRouteDirectory.js","sourceRoot":"","sources":["../../../src/generates/internal/SdkRouteDirectory.ts"],"names":[],"mappings":";;;AAIA;IAOE,YACW,MAAgC,EAChC,IAAY;sBADZ,MAAM;oBACN,IAAI;QAEb,IAAI,CAAC,QAAQ,GAAG,IAAI,GAAG,EAAE,CAAC;QAC1B,IAAI,CAAC,MAAM,GAAG,EAAE,CAAC;QACjB,IAAI,CAAC,MAAM;YACT,IAAI,CAAC,MAAM,KAAK,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,IAAI,IAAI,EAAE,CAAC,CAAC,CAAC,OAAO,IAAI,EAAE,CAAC;IAC3E,CAAC;CACF"}
1
+ {"version":3,"file":"SdkRouteDirectory.js","sourceRoot":"","sources":["../../../src/generates/internal/SdkRouteDirectory.ts"],"names":[],"mappings":";;;AAIA;;;;;;;;;GASG;AACH;IAOE,YACW,MAAgC,EAChC,IAAY;sBADZ,MAAM;oBACN,IAAI;QAEb,IAAI,CAAC,QAAQ,GAAG,IAAI,GAAG,EAAE,CAAC;QAC1B,IAAI,CAAC,MAAM,GAAG,EAAE,CAAC;QACjB,IAAI,CAAC,MAAM;YACT,IAAI,CAAC,MAAM,KAAK,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,IAAI,IAAI,EAAE,CAAC,CAAC,CAAC,OAAO,IAAI,EAAE,CAAC;IAC3E,CAAC;CACF"}
@@ -1,8 +1,61 @@
1
1
  import { type TypeNode } from "@ttsc/factory";
2
- import { MetadataObjectType, MetadataSchema } from "../../internal/legacy";
2
+ import { MetadataArrayType, MetadataObjectType, MetadataSchema, MetadataTupleType } from "../../internal/legacy";
3
3
  import { INestiaProject } from "../../structures/INestiaProject";
4
4
  import { ImportDictionary } from "./ImportDictionary";
5
+ /**
6
+ * Writes the TypeScript type of a metadata.
7
+ *
8
+ * @evidence contracts/common.md#principled-implementation The namespace turns each member of the metadata into a type node and joins them as a union.
9
+ * @evidence contracts/common.md#clear-and-simple-design The schema facade and object writer use one writer per form; collection-body operations distinguish a named recursive definition from its nested references.
10
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts A name that cannot be referenced is written inline.
11
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
12
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation SdkTypeProgrammer composes SDK syntax, identifiers or import bindings; 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 SdkTypeProgrammer {
15
+ /**
16
+ * Returns the type of a metadata: the union of its any, null, undefined,
17
+ * escaped, constant, template, atomic, tuple, array, object, alias, and
18
+ * native and typed collection forms. An empty union emits never.
19
+ *
20
+ * @evidence contracts/common.md#principled-implementation Named objects, aliases and recursive collections use references; implicit objects and nonrecursive collections use inline bodies. A recursive declaration writes its collection body once, and nested uses return through references.
21
+ * @evidence contracts/common.md#clear-and-simple-design One function of ordered cases.
22
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The member order is fixed, supported resolved natives retain their type references, and empty unions use the TypeScript bottom type rather than an empty printed node.
23
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
24
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation SdkTypeProgrammer.write composes SDK syntax, identifiers or import bindings; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
25
+ */
6
26
  const write: (project: INestiaProject) => (importer: ImportDictionary) => (meta: MetadataSchema, parentEscaped?: boolean) => TypeNode;
27
+ /**
28
+ * Returns the type of an object: the regular properties as one literal,
29
+ * intersected with each dynamic key's index signature. Both signature forms
30
+ * retain the metadata's readonly modifier.
31
+ *
32
+ * @evidence contracts/common.md#principled-implementation A key that is a sole literal is regular, and every other key is dynamic. Each property's mutability supplies the readonly modifier for its corresponding property or index signature.
33
+ * @evidence contracts/common.md#clear-and-simple-design One function.
34
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The cases are exhaustive over the keys.
35
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
36
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation SdkTypeProgrammer.write_object composes SDK syntax, identifiers or import bindings; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
37
+ */
7
38
  const write_object: (project: INestiaProject) => (importer: ImportDictionary) => (object: MetadataObjectType) => TypeNode;
39
+ /**
40
+ * Writes an array definition's body, using named references for recursive
41
+ * collections reached through its element schema.
42
+ *
43
+ * @evidence contracts/common.md#principled-implementation A declaration needs one array body while its nested use sites use the ordinary writer's recursive references, so X=X[] is finite and retains its element meaning.
44
+ * @evidence contracts/common.md#clear-and-simple-design One array node delegates its element to write.
45
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The declaration operation is distinct from reference emission and adds no test-only flags or names.
46
+ * @evidence contracts/common.md#meaningful-documentation The comment distinguishes a definition body from nested references.
47
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation SdkTypeProgrammer.write_array_type composes SDK syntax, identifiers or import bindings; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
48
+ */
49
+ const write_array_type: (project: INestiaProject) => (importer: ImportDictionary) => (meta: MetadataArrayType) => TypeNode;
50
+ /**
51
+ * Writes a tuple definition's body, retaining optional and rest elements
52
+ * while nested recursive collections use named references.
53
+ *
54
+ * @evidence contracts/common.md#principled-implementation Each element retains its optional/rest form and schema; nested uses return through write, whose recursive reference branch terminates self and mutual collection cycles.
55
+ * @evidence contracts/common.md#clear-and-simple-design One element map creates the tuple body.
56
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The same body operation serves ordinary inline tuples and recursive declarations without special-cased source names.
57
+ * @evidence contracts/common.md#meaningful-documentation The comment states the definition body and modifier responsibilities.
58
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation SdkTypeProgrammer.write_tuple_type composes SDK syntax, identifiers or import bindings; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
59
+ */
60
+ const write_tuple_type: (project: INestiaProject) => (importer: ImportDictionary) => (meta: MetadataTupleType) => TypeNode;
8
61
  }