@nestia/sdk 14.0.0 → 14.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (391) hide show
  1. package/README.md +1 -1
  2. package/assets/bundle/distribute/build-sdk.cjs +28 -0
  3. package/assets/bundle/distribute/package.json +7 -3
  4. package/assets/bundle/distribute/tsconfig.json +15 -105
  5. package/lib/INestiaConfig.d.ts +74 -34
  6. package/lib/NestiaSdkApplication.d.ts +60 -0
  7. package/lib/NestiaSdkApplication.js +121 -32
  8. package/lib/NestiaSdkApplication.js.map +1 -1
  9. package/lib/NestiaSwaggerComposer.d.ts +21 -0
  10. package/lib/NestiaSwaggerComposer.js +32 -13
  11. package/lib/NestiaSwaggerComposer.js.map +1 -1
  12. package/lib/analyses/AccessorAnalyzer.d.ts +26 -0
  13. package/lib/analyses/AccessorAnalyzer.js +26 -0
  14. package/lib/analyses/AccessorAnalyzer.js.map +1 -1
  15. package/lib/analyses/ConfigAnalyzer.d.ts +41 -0
  16. package/lib/analyses/ConfigAnalyzer.js +52 -77
  17. package/lib/analyses/ConfigAnalyzer.js.map +1 -1
  18. package/lib/analyses/ImportAnalyzer.d.ts +25 -0
  19. package/lib/analyses/ImportAnalyzer.js +25 -0
  20. package/lib/analyses/ImportAnalyzer.js.map +1 -1
  21. package/lib/analyses/ParameterNameAnalyzer.d.ts +44 -0
  22. package/lib/analyses/ParameterNameAnalyzer.js +63 -0
  23. package/lib/analyses/ParameterNameAnalyzer.js.map +1 -0
  24. package/lib/analyses/PathAnalyzer.d.ts +93 -1
  25. package/lib/analyses/PathAnalyzer.js +160 -23
  26. package/lib/analyses/PathAnalyzer.js.map +1 -1
  27. package/lib/analyses/ReflectControllerAnalyzer.d.ts +32 -0
  28. package/lib/analyses/ReflectControllerAnalyzer.js +24 -1
  29. package/lib/analyses/ReflectControllerAnalyzer.js.map +1 -1
  30. package/lib/analyses/ReflectHttpOperationAnalyzer.d.ts +29 -0
  31. package/lib/analyses/ReflectHttpOperationAnalyzer.js +35 -24
  32. package/lib/analyses/ReflectHttpOperationAnalyzer.js.map +1 -1
  33. package/lib/analyses/ReflectHttpOperationExceptionAnalyzer.d.ts +31 -0
  34. package/lib/analyses/ReflectHttpOperationExceptionAnalyzer.js +21 -0
  35. package/lib/analyses/ReflectHttpOperationExceptionAnalyzer.js.map +1 -1
  36. package/lib/analyses/ReflectHttpOperationParameterAnalyzer.d.ts +31 -0
  37. package/lib/analyses/ReflectHttpOperationParameterAnalyzer.js +143 -23
  38. package/lib/analyses/ReflectHttpOperationParameterAnalyzer.js.map +1 -1
  39. package/lib/analyses/ReflectHttpOperationResponseAnalyzer.d.ts +32 -0
  40. package/lib/analyses/ReflectHttpOperationResponseAnalyzer.js +27 -2
  41. package/lib/analyses/ReflectHttpOperationResponseAnalyzer.js.map +1 -1
  42. package/lib/analyses/ReflectMcpOperationAnalyzer.d.ts +29 -0
  43. package/lib/analyses/ReflectMcpOperationAnalyzer.js +35 -11
  44. package/lib/analyses/ReflectMcpOperationAnalyzer.js.map +1 -1
  45. package/lib/analyses/ReflectMetadataAnalyzer.d.ts +47 -0
  46. package/lib/analyses/ReflectMetadataAnalyzer.js +47 -0
  47. package/lib/analyses/ReflectMetadataAnalyzer.js.map +1 -1
  48. package/lib/analyses/ReflectWebSocketOperationAnalyzer.d.ts +29 -0
  49. package/lib/analyses/ReflectWebSocketOperationAnalyzer.js +27 -5
  50. package/lib/analyses/ReflectWebSocketOperationAnalyzer.js.map +1 -1
  51. package/lib/analyses/SecurityAnalyzer.d.ts +25 -0
  52. package/lib/analyses/SecurityAnalyzer.js +39 -19
  53. package/lib/analyses/SecurityAnalyzer.js.map +1 -1
  54. package/lib/analyses/SwaggerExampleAnalyzer.d.ts +31 -0
  55. package/lib/analyses/SwaggerExampleAnalyzer.js +36 -0
  56. package/lib/analyses/SwaggerExampleAnalyzer.js.map +1 -0
  57. package/lib/analyses/TypedHttpRouteAnalyzer.d.ts +41 -3
  58. package/lib/analyses/TypedHttpRouteAnalyzer.js +196 -172
  59. package/lib/analyses/TypedHttpRouteAnalyzer.js.map +1 -1
  60. package/lib/analyses/TypedMcpRouteAnalyzer.d.ts +29 -0
  61. package/lib/analyses/TypedMcpRouteAnalyzer.js +152 -20
  62. package/lib/analyses/TypedMcpRouteAnalyzer.js.map +1 -1
  63. package/lib/analyses/TypedWebSocketRouteAnalyzer.d.ts +19 -0
  64. package/lib/analyses/TypedWebSocketRouteAnalyzer.js +20 -1
  65. package/lib/analyses/TypedWebSocketRouteAnalyzer.js.map +1 -1
  66. package/lib/decorators/OperationMetadata.d.ts +6 -0
  67. package/lib/decorators/OperationMetadata.js +6 -0
  68. package/lib/decorators/OperationMetadata.js.map +1 -1
  69. package/lib/executable/internal/CommandParser.d.ts +19 -0
  70. package/lib/executable/internal/CommandParser.js +19 -0
  71. package/lib/executable/internal/CommandParser.js.map +1 -1
  72. package/lib/executable/internal/NestiaConfigLoader.d.ts +56 -0
  73. package/lib/executable/internal/NestiaConfigLoader.js +48 -42
  74. package/lib/executable/internal/NestiaConfigLoader.js.map +1 -1
  75. package/lib/executable/internal/NestiaSdkCommand.d.ts +60 -0
  76. package/lib/executable/internal/NestiaSdkCommand.js +95 -3
  77. package/lib/executable/internal/NestiaSdkCommand.js.map +1 -1
  78. package/lib/executable/internal/NestiaSdkWatcher.d.ts +81 -0
  79. package/lib/executable/internal/NestiaSdkWatcher.js +125 -41
  80. package/lib/executable/internal/NestiaSdkWatcher.js.map +1 -1
  81. package/lib/executable/internal/NestiaSwaggerWatch.d.ts +80 -0
  82. package/lib/executable/internal/NestiaSwaggerWatch.js +308 -0
  83. package/lib/executable/internal/NestiaSwaggerWatch.js.map +1 -0
  84. package/lib/executable/sdk.js +16 -1
  85. package/lib/executable/sdk.js.map +1 -1
  86. package/lib/factories/ExpressionFactory.d.ts +18 -0
  87. package/lib/factories/ExpressionFactory.js +21 -2
  88. package/lib/factories/ExpressionFactory.js.map +1 -1
  89. package/lib/factories/IdentifierFactory.d.ts +24 -0
  90. package/lib/factories/IdentifierFactory.js +24 -0
  91. package/lib/factories/IdentifierFactory.js.map +1 -1
  92. package/lib/factories/LiteralFactory.d.ts +22 -4
  93. package/lib/factories/LiteralFactory.js +33 -11
  94. package/lib/factories/LiteralFactory.js.map +1 -1
  95. package/lib/factories/StatementFactory.d.ts +28 -1
  96. package/lib/factories/StatementFactory.js +28 -1
  97. package/lib/factories/StatementFactory.js.map +1 -1
  98. package/lib/factories/TypeFactory.d.ts +24 -0
  99. package/lib/factories/TypeFactory.js +15 -0
  100. package/lib/factories/TypeFactory.js.map +1 -1
  101. package/lib/generates/CloneGenerator.d.ts +22 -0
  102. package/lib/generates/CloneGenerator.js +26 -5
  103. package/lib/generates/CloneGenerator.js.map +1 -1
  104. package/lib/generates/E2eGenerator.d.ts +19 -0
  105. package/lib/generates/E2eGenerator.js +19 -0
  106. package/lib/generates/E2eGenerator.js.map +1 -1
  107. package/lib/generates/SdkGenerator.d.ts +38 -0
  108. package/lib/generates/SdkGenerator.js +43 -5
  109. package/lib/generates/SdkGenerator.js.map +1 -1
  110. package/lib/generates/SwaggerGenerator.d.ts +36 -6
  111. package/lib/generates/SwaggerGenerator.js +190 -40
  112. package/lib/generates/SwaggerGenerator.js.map +1 -1
  113. package/lib/generates/internal/E2eFileProgrammer.d.ts +19 -0
  114. package/lib/generates/internal/E2eFileProgrammer.js +20 -1
  115. package/lib/generates/internal/E2eFileProgrammer.js.map +1 -1
  116. package/lib/generates/internal/FilePrinter.d.ts +57 -0
  117. package/lib/generates/internal/FilePrinter.js +74 -0
  118. package/lib/generates/internal/FilePrinter.js.map +1 -1
  119. package/lib/generates/internal/ImportDictionary.d.ts +93 -1
  120. package/lib/generates/internal/ImportDictionary.js +103 -2
  121. package/lib/generates/internal/ImportDictionary.js.map +1 -1
  122. package/lib/generates/internal/SdkAliasCollection.d.ts +121 -1
  123. package/lib/generates/internal/SdkAliasCollection.js +132 -11
  124. package/lib/generates/internal/SdkAliasCollection.js.map +1 -1
  125. package/lib/generates/internal/SdkDistributionComposer.d.ts +19 -0
  126. package/lib/generates/internal/SdkDistributionComposer.js +149 -52
  127. package/lib/generates/internal/SdkDistributionComposer.js.map +1 -1
  128. package/lib/generates/internal/SdkFileProgrammer.d.ts +18 -0
  129. package/lib/generates/internal/SdkFileProgrammer.js +101 -12
  130. package/lib/generates/internal/SdkFileProgrammer.js.map +1 -1
  131. package/lib/generates/internal/SdkHttpCloneProgrammer.d.ts +29 -0
  132. package/lib/generates/internal/SdkHttpCloneProgrammer.js +33 -0
  133. package/lib/generates/internal/SdkHttpCloneProgrammer.js.map +1 -1
  134. package/lib/generates/internal/SdkHttpCloneReferencer.d.ts +19 -0
  135. package/lib/generates/internal/SdkHttpCloneReferencer.js +78 -25
  136. package/lib/generates/internal/SdkHttpCloneReferencer.js.map +1 -1
  137. package/lib/generates/internal/SdkHttpFunctionProgrammer.d.ts +19 -0
  138. package/lib/generates/internal/SdkHttpFunctionProgrammer.js +40 -23
  139. package/lib/generates/internal/SdkHttpFunctionProgrammer.js.map +1 -1
  140. package/lib/generates/internal/SdkHttpNamespaceProgrammer.d.ts +19 -0
  141. package/lib/generates/internal/SdkHttpNamespaceProgrammer.js +46 -34
  142. package/lib/generates/internal/SdkHttpNamespaceProgrammer.js.map +1 -1
  143. package/lib/generates/internal/SdkHttpParameterProgrammer.d.ts +142 -1
  144. package/lib/generates/internal/SdkHttpParameterProgrammer.js +175 -6
  145. package/lib/generates/internal/SdkHttpParameterProgrammer.js.map +1 -1
  146. package/lib/generates/internal/SdkHttpRouteProgrammer.d.ts +20 -0
  147. package/lib/generates/internal/SdkHttpRouteProgrammer.js +36 -32
  148. package/lib/generates/internal/SdkHttpRouteProgrammer.js.map +1 -1
  149. package/lib/generates/internal/SdkHttpSimulationProgrammer.d.ts +38 -0
  150. package/lib/generates/internal/SdkHttpSimulationProgrammer.js +66 -18
  151. package/lib/generates/internal/SdkHttpSimulationProgrammer.js.map +1 -1
  152. package/lib/generates/internal/SdkImportWizard.d.ts +63 -0
  153. package/lib/generates/internal/SdkImportWizard.js +63 -0
  154. package/lib/generates/internal/SdkImportWizard.js.map +1 -1
  155. package/lib/generates/internal/SdkMcpRouteProgrammer.d.ts +17 -2
  156. package/lib/generates/internal/SdkMcpRouteProgrammer.js +72 -24
  157. package/lib/generates/internal/SdkMcpRouteProgrammer.js.map +1 -1
  158. package/lib/generates/internal/SdkPathTemplate.d.ts +36 -0
  159. package/lib/generates/internal/SdkPathTemplate.js +65 -0
  160. package/lib/generates/internal/SdkPathTemplate.js.map +1 -0
  161. package/lib/generates/internal/SdkRouteDirectory.d.ts +10 -0
  162. package/lib/generates/internal/SdkRouteDirectory.js +10 -0
  163. package/lib/generates/internal/SdkRouteDirectory.js.map +1 -1
  164. package/lib/generates/internal/SdkTypeProgrammer.d.ts +54 -1
  165. package/lib/generates/internal/SdkTypeProgrammer.js +111 -27
  166. package/lib/generates/internal/SdkTypeProgrammer.js.map +1 -1
  167. package/lib/generates/internal/SdkTypeTagProgrammer.d.ts +53 -1
  168. package/lib/generates/internal/SdkTypeTagProgrammer.js +407 -67
  169. package/lib/generates/internal/SdkTypeTagProgrammer.js.map +1 -1
  170. package/lib/generates/internal/SdkWebSocketCloneProgrammer.d.ts +40 -0
  171. package/lib/generates/internal/SdkWebSocketCloneProgrammer.js +149 -142
  172. package/lib/generates/internal/SdkWebSocketCloneProgrammer.js.map +1 -1
  173. package/lib/generates/internal/SdkWebSocketNamespaceProgrammer.d.ts +19 -0
  174. package/lib/generates/internal/SdkWebSocketNamespaceProgrammer.js +46 -36
  175. package/lib/generates/internal/SdkWebSocketNamespaceProgrammer.js.map +1 -1
  176. package/lib/generates/internal/SdkWebSocketParameterProgrammer.d.ts +114 -1
  177. package/lib/generates/internal/SdkWebSocketParameterProgrammer.js +120 -5
  178. package/lib/generates/internal/SdkWebSocketParameterProgrammer.js.map +1 -1
  179. package/lib/generates/internal/SdkWebSocketRouteProgrammer.d.ts +18 -0
  180. package/lib/generates/internal/SdkWebSocketRouteProgrammer.js +75 -33
  181. package/lib/generates/internal/SdkWebSocketRouteProgrammer.js.map +1 -1
  182. package/lib/generates/internal/SwaggerDescriptionComposer.d.ts +42 -0
  183. package/lib/generates/internal/SwaggerDescriptionComposer.js +44 -1
  184. package/lib/generates/internal/SwaggerDescriptionComposer.js.map +1 -1
  185. package/lib/generates/internal/SwaggerOperationComposer.d.ts +18 -0
  186. package/lib/generates/internal/SwaggerOperationComposer.js +37 -8
  187. package/lib/generates/internal/SwaggerOperationComposer.js.map +1 -1
  188. package/lib/generates/internal/SwaggerOperationParameterComposer.d.ts +40 -1
  189. package/lib/generates/internal/SwaggerOperationParameterComposer.js +230 -25
  190. package/lib/generates/internal/SwaggerOperationParameterComposer.js.map +1 -1
  191. package/lib/generates/internal/SwaggerOperationResponseComposer.d.ts +21 -0
  192. package/lib/generates/internal/SwaggerOperationResponseComposer.js +58 -7
  193. package/lib/generates/internal/SwaggerOperationResponseComposer.js.map +1 -1
  194. package/lib/internal/legacy.d.ts +342 -31
  195. package/lib/internal/legacy.js +207 -31
  196. package/lib/internal/legacy.js.map +1 -1
  197. package/lib/structures/INestiaProject.d.ts +10 -0
  198. package/lib/structures/INestiaSdkInput.d.ts +30 -0
  199. package/lib/structures/IOperationMetadata.d.ts +77 -0
  200. package/lib/structures/IReflectController.d.ts +10 -0
  201. package/lib/structures/IReflectHttpOperation.d.ts +10 -0
  202. package/lib/structures/IReflectHttpOperationException.d.ts +13 -2
  203. package/lib/structures/IReflectHttpOperationParameter.d.ts +55 -3
  204. package/lib/structures/IReflectHttpOperationSuccess.d.ts +15 -3
  205. package/lib/structures/IReflectImport.d.ts +10 -0
  206. package/lib/structures/IReflectMcpOperation.d.ts +19 -0
  207. package/lib/structures/IReflectMcpOperationParameter.d.ts +9 -0
  208. package/lib/structures/IReflectOperationError.d.ts +28 -0
  209. package/lib/structures/IReflectOperationError.js +22 -2
  210. package/lib/structures/IReflectOperationError.js.map +1 -1
  211. package/lib/structures/IReflectType.d.ts +9 -0
  212. package/lib/structures/IReflectWebSocketOperation.d.ts +10 -0
  213. package/lib/structures/IReflectWebSocketOperationParameter.d.ts +55 -0
  214. package/lib/structures/ITypedApplication.d.ts +10 -0
  215. package/lib/structures/ITypedHttpRoute.d.ts +18 -0
  216. package/lib/structures/ITypedHttpRouteException.d.ts +13 -1
  217. package/lib/structures/ITypedHttpRouteParameter.d.ts +48 -1
  218. package/lib/structures/ITypedHttpRouteSuccess.d.ts +13 -1
  219. package/lib/structures/ITypedMcpRoute.d.ts +11 -0
  220. package/lib/structures/ITypedWebSocketRoute.d.ts +18 -0
  221. package/lib/transform.d.ts +6 -0
  222. package/lib/transform.js +6 -0
  223. package/lib/transform.js.map +1 -1
  224. package/lib/utils/ArrayUtil.d.ts +31 -1
  225. package/lib/utils/ArrayUtil.js +32 -11
  226. package/lib/utils/ArrayUtil.js.map +1 -1
  227. package/lib/utils/EmittedJavaScriptPatcher.d.ts +20 -0
  228. package/lib/utils/EmittedJavaScriptPatcher.js +65 -46
  229. package/lib/utils/EmittedJavaScriptPatcher.js.map +1 -1
  230. package/lib/utils/FileRetriever.d.ts +29 -0
  231. package/lib/utils/FileRetriever.js +29 -0
  232. package/lib/utils/FileRetriever.js.map +1 -1
  233. package/lib/utils/HttpResponseContentTypeUtil.d.ts +41 -0
  234. package/lib/utils/HttpResponseContentTypeUtil.js +31 -0
  235. package/lib/utils/HttpResponseContentTypeUtil.js.map +1 -1
  236. package/lib/utils/MapUtil.d.ts +64 -1
  237. package/lib/utils/MapUtil.js +24 -3
  238. package/lib/utils/MapUtil.js.map +1 -1
  239. package/lib/utils/PathUtil.d.ts +31 -0
  240. package/lib/utils/PathUtil.js +38 -0
  241. package/lib/utils/PathUtil.js.map +1 -1
  242. package/lib/utils/SdkBundlePath.d.ts +2 -0
  243. package/lib/utils/SdkBundlePath.js +10 -0
  244. package/lib/utils/SdkBundlePath.js.map +1 -0
  245. package/lib/utils/SdkInputFilter.d.ts +31 -0
  246. package/lib/utils/SdkInputFilter.js +115 -0
  247. package/lib/utils/SdkInputFilter.js.map +1 -0
  248. package/lib/utils/SourceFinder.d.ts +45 -0
  249. package/lib/utils/SourceFinder.js +74 -16
  250. package/lib/utils/SourceFinder.js.map +1 -1
  251. package/lib/utils/StringUtil.d.ts +77 -2
  252. package/lib/utils/StringUtil.js +166 -4
  253. package/lib/utils/StringUtil.js.map +1 -1
  254. package/lib/utils/TemporaryDirectory.d.ts +60 -0
  255. package/lib/utils/TemporaryDirectory.js +112 -0
  256. package/lib/utils/TemporaryDirectory.js.map +1 -0
  257. package/lib/utils/TsConfigReader.d.ts +42 -0
  258. package/lib/utils/TsConfigReader.js +98 -14
  259. package/lib/utils/TsConfigReader.js.map +1 -1
  260. package/lib/utils/TtscExecutor.d.ts +23 -1
  261. package/lib/utils/TtscExecutor.js +22 -0
  262. package/lib/utils/TtscExecutor.js.map +1 -1
  263. package/lib/utils/VersioningStrategy.d.ts +39 -2
  264. package/lib/utils/VersioningStrategy.js +46 -13
  265. package/lib/utils/VersioningStrategy.js.map +1 -1
  266. package/lib/validators/TextPlainValidator.d.ts +19 -0
  267. package/lib/validators/TextPlainValidator.js +19 -0
  268. package/lib/validators/TextPlainValidator.js.map +1 -1
  269. package/native/go.mod +1 -1
  270. package/native/go.sum +2 -2
  271. package/native/sdk/register.go +12 -2
  272. package/native/sdk/sdk_http_rules.go +210 -0
  273. package/native/sdk/sdk_metadata_json.go +79 -4
  274. package/native/sdk/sdk_transform.go +1157 -414
  275. package/package.json +8 -6
  276. package/src/INestiaConfig.ts +74 -34
  277. package/src/NestiaSdkApplication.ts +129 -41
  278. package/src/NestiaSwaggerComposer.ts +32 -14
  279. package/src/analyses/AccessorAnalyzer.ts +26 -0
  280. package/src/analyses/ConfigAnalyzer.ts +52 -90
  281. package/src/analyses/ImportAnalyzer.ts +25 -0
  282. package/src/analyses/ParameterNameAnalyzer.ts +75 -0
  283. package/src/analyses/PathAnalyzer.ts +167 -23
  284. package/src/analyses/ReflectControllerAnalyzer.ts +34 -1
  285. package/src/analyses/ReflectHttpOperationAnalyzer.ts +36 -14
  286. package/src/analyses/ReflectHttpOperationExceptionAnalyzer.ts +31 -0
  287. package/src/analyses/ReflectHttpOperationParameterAnalyzer.ts +153 -39
  288. package/src/analyses/ReflectHttpOperationResponseAnalyzer.ts +38 -7
  289. package/src/analyses/ReflectMcpOperationAnalyzer.ts +38 -3
  290. package/src/analyses/ReflectMetadataAnalyzer.ts +47 -0
  291. package/src/analyses/ReflectWebSocketOperationAnalyzer.ts +40 -7
  292. package/src/analyses/SecurityAnalyzer.ts +45 -20
  293. package/src/analyses/SwaggerExampleAnalyzer.ts +39 -0
  294. package/src/analyses/TypedHttpRouteAnalyzer.ts +263 -198
  295. package/src/analyses/TypedMcpRouteAnalyzer.ts +180 -20
  296. package/src/analyses/TypedWebSocketRouteAnalyzer.ts +20 -0
  297. package/src/decorators/OperationMetadata.ts +6 -0
  298. package/src/executable/internal/CommandParser.ts +19 -0
  299. package/src/executable/internal/NestiaConfigLoader.ts +66 -50
  300. package/src/executable/internal/NestiaSdkCommand.ts +96 -3
  301. package/src/executable/internal/NestiaSdkWatcher.ts +172 -44
  302. package/src/executable/internal/NestiaSwaggerWatch.ts +359 -0
  303. package/src/executable/sdk.ts +24 -1
  304. package/src/factories/ExpressionFactory.ts +23 -2
  305. package/src/factories/IdentifierFactory.ts +24 -0
  306. package/src/factories/LiteralFactory.ts +51 -13
  307. package/src/factories/StatementFactory.ts +28 -1
  308. package/src/factories/TypeFactory.ts +24 -0
  309. package/src/generates/CloneGenerator.ts +26 -5
  310. package/src/generates/E2eGenerator.ts +19 -0
  311. package/src/generates/SdkGenerator.ts +43 -12
  312. package/src/generates/SwaggerGenerator.ts +229 -46
  313. package/src/generates/internal/E2eFileProgrammer.ts +20 -0
  314. package/src/generates/internal/FilePrinter.ts +71 -0
  315. package/src/generates/internal/ImportDictionary.ts +120 -2
  316. package/src/generates/internal/SdkAliasCollection.ts +144 -15
  317. package/src/generates/internal/SdkDistributionComposer.ts +181 -56
  318. package/src/generates/internal/SdkFileProgrammer.ts +126 -16
  319. package/src/generates/internal/SdkHttpCloneProgrammer.ts +55 -0
  320. package/src/generates/internal/SdkHttpCloneReferencer.ts +97 -23
  321. package/src/generates/internal/SdkHttpFunctionProgrammer.ts +47 -30
  322. package/src/generates/internal/SdkHttpNamespaceProgrammer.ts +53 -64
  323. package/src/generates/internal/SdkHttpParameterProgrammer.ts +295 -13
  324. package/src/generates/internal/SdkHttpRouteProgrammer.ts +37 -31
  325. package/src/generates/internal/SdkHttpSimulationProgrammer.ts +122 -18
  326. package/src/generates/internal/SdkImportWizard.ts +63 -0
  327. package/src/generates/internal/SdkMcpRouteProgrammer.ts +150 -33
  328. package/src/generates/internal/SdkPathTemplate.ts +88 -0
  329. package/src/generates/internal/SdkRouteDirectory.ts +10 -0
  330. package/src/generates/internal/SdkTypeProgrammer.ts +137 -36
  331. package/src/generates/internal/SdkTypeTagProgrammer.ts +536 -78
  332. package/src/generates/internal/SdkWebSocketCloneProgrammer.ts +185 -142
  333. package/src/generates/internal/SdkWebSocketNamespaceProgrammer.ts +62 -68
  334. package/src/generates/internal/SdkWebSocketParameterProgrammer.ts +205 -5
  335. package/src/generates/internal/SdkWebSocketRouteProgrammer.ts +89 -48
  336. package/src/generates/internal/SwaggerDescriptionComposer.ts +47 -1
  337. package/src/generates/internal/SwaggerOperationComposer.ts +38 -6
  338. package/src/generates/internal/SwaggerOperationParameterComposer.ts +318 -36
  339. package/src/generates/internal/SwaggerOperationResponseComposer.ts +74 -11
  340. package/src/internal/legacy-augmentation.d.ts +16 -0
  341. package/src/internal/legacy.ts +407 -49
  342. package/src/structures/INestiaProject.ts +10 -0
  343. package/src/structures/INestiaSdkInput.ts +30 -0
  344. package/src/structures/IOperationMetadata.ts +83 -0
  345. package/src/structures/IReflectController.ts +10 -0
  346. package/src/structures/IReflectHttpOperation.ts +10 -0
  347. package/src/structures/IReflectHttpOperationException.ts +17 -2
  348. package/src/structures/IReflectHttpOperationParameter.ts +56 -2
  349. package/src/structures/IReflectHttpOperationSuccess.ts +19 -3
  350. package/src/structures/IReflectImport.ts +10 -0
  351. package/src/structures/IReflectMcpOperation.ts +19 -0
  352. package/src/structures/IReflectMcpOperationParameter.ts +9 -0
  353. package/src/structures/IReflectOperationError.ts +31 -2
  354. package/src/structures/IReflectType.ts +9 -0
  355. package/src/structures/IReflectWebSocketOperation.ts +10 -0
  356. package/src/structures/IReflectWebSocketOperationParameter.ts +55 -0
  357. package/src/structures/ITypedApplication.ts +10 -0
  358. package/src/structures/ITypedHttpRoute.ts +18 -0
  359. package/src/structures/ITypedHttpRouteException.ts +14 -1
  360. package/src/structures/ITypedHttpRouteParameter.ts +48 -1
  361. package/src/structures/ITypedHttpRouteSuccess.ts +14 -1
  362. package/src/structures/ITypedMcpRoute.ts +12 -0
  363. package/src/structures/ITypedWebSocketRoute.ts +18 -0
  364. package/src/transform.ts +6 -0
  365. package/src/utils/ArrayUtil.ts +32 -13
  366. package/src/utils/EmittedJavaScriptPatcher.ts +70 -47
  367. package/src/utils/FileRetriever.ts +29 -0
  368. package/src/utils/HttpResponseContentTypeUtil.ts +41 -0
  369. package/src/utils/MapUtil.ts +68 -3
  370. package/src/utils/PathUtil.ts +38 -0
  371. package/src/utils/SdkBundlePath.ts +11 -0
  372. package/src/utils/SdkInputFilter.ts +108 -0
  373. package/src/utils/SourceFinder.ts +76 -18
  374. package/src/utils/StringUtil.ts +182 -5
  375. package/src/utils/TemporaryDirectory.ts +108 -0
  376. package/src/utils/TsConfigReader.ts +124 -26
  377. package/src/utils/TtscExecutor.ts +23 -1
  378. package/src/utils/VersioningStrategy.ts +51 -16
  379. package/src/validators/TextPlainValidator.ts +19 -0
  380. package/lib/generates/internal/SwaggerReadonlyArrayEmender.d.ts +0 -9
  381. package/lib/generates/internal/SwaggerReadonlyArrayEmender.js +0 -178
  382. package/lib/generates/internal/SwaggerReadonlyArrayEmender.js.map +0 -1
  383. package/lib/validators/HttpHeadersValidator.d.ts +0 -11
  384. package/lib/validators/HttpHeadersValidator.js +0 -15
  385. package/lib/validators/HttpHeadersValidator.js.map +0 -1
  386. package/lib/validators/HttpQueryValidator.d.ts +0 -10
  387. package/lib/validators/HttpQueryValidator.js +0 -14
  388. package/lib/validators/HttpQueryValidator.js.map +0 -1
  389. package/src/generates/internal/SwaggerReadonlyArrayEmender.ts +0 -264
  390. package/src/validators/HttpHeadersValidator.ts +0 -12
  391. package/src/validators/HttpQueryValidator.ts +0 -11
@@ -1,22 +1,135 @@
1
- import { type ParameterDeclaration, type TypeNode } from "@ttsc/factory";
1
+ import { type Expression, type ParameterDeclaration, type TypeNode } from "@ttsc/factory";
2
2
  import { INestiaProject } from "../../structures/INestiaProject";
3
3
  import { ITypedWebSocketRoute } from "../../structures/ITypedWebSocketRoute";
4
+ import { ITypedWebSocketRouteParameter } from "../../structures/ITypedWebSocketRouteParameter";
5
+ /**
6
+ * The parameters of a WebSocket route's SDK function.
7
+ *
8
+ * @evidence contracts/common.md#principled-implementation The namespace decides the identifiers, lists the entries, and writes the declarations, as the HTTP one does.
9
+ * @evidence contracts/common.md#clear-and-simple-design Several small functions.
10
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The identifiers are decided once.
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 SdkWebSocketParameterProgrammer 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 namespace SdkWebSocketParameterProgrammer {
15
+ /**
16
+ * One parameter of a WebSocket route: its key and its type.
17
+ *
18
+ * @evidence contracts/common.md#principled-implementation The record is what a declaration needs.
19
+ * @evidence contracts/common.md#clear-and-simple-design A two-member record.
20
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.
21
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
22
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation SdkWebSocketParameterProgrammer.IEntry 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
+ */
5
24
  interface IEntry {
6
25
  key: string;
7
26
  type: TypeNode;
8
27
  }
28
+ /**
29
+ * The identifiers one WebSocket route's SDK function and `path()` use,
30
+ * decided once so the two cannot disagree; the HTTP counterpart,
31
+ * `SdkHttpParameterProgrammer.INames`, gives the rules.
32
+ *
33
+ * Path parameters are the user's names. `query` and `provider` are the SDK's
34
+ * own: the positional parameters, or the `props` keys in keyword mode, that
35
+ * carry the query object and the provider, so they yield to a path parameter
36
+ * of the same name instead of repeating it. A `props` key shadows nothing, so
37
+ * it yields to nothing else.
38
+ *
39
+ * @evidence contracts/common.md#principled-implementation One decision serves the two scopes.
40
+ * @evidence contracts/common.md#clear-and-simple-design A record of names and two lookups.
41
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.
42
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
43
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation SdkWebSocketParameterProgrammer.INames 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.
44
+ */
45
+ interface INames {
46
+ connection: string;
47
+ props: string;
48
+ query: string;
49
+ provider: string;
50
+ url: string;
51
+ connector: string;
52
+ driver: string;
53
+ variables: string;
54
+ location: string;
55
+ key: string;
56
+ value: string;
57
+ elem: string;
58
+ /**
59
+ * Local identifier of a path parameter in positional mode.
60
+ *
61
+ * @evidence contracts/common.md#principled-implementation A path parameter keeps its name unless the SDK cannot change the name it collides with.
62
+ * @evidence contracts/common.md#clear-and-simple-design One lookup.
63
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts It reads the decision.
64
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
65
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation SdkWebSocketParameterProgrammer.INames.parameter 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.
66
+ */
67
+ parameter: (p: ITypedWebSocketRouteParameter.IParam) => string;
68
+ /**
69
+ * Reads a parameter, or one of `query` and `provider`, by its key.
70
+ *
71
+ * @evidence contracts/common.md#principled-implementation The read follows the mode of the function.
72
+ * @evidence contracts/common.md#clear-and-simple-design One lookup.
73
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts It reads the decision.
74
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
75
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation SdkWebSocketParameterProgrammer.INames.access 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.
76
+ */
77
+ access: (key: string) => Expression;
78
+ }
79
+ /**
80
+ * Decides the identifiers of a WebSocket route's function and `path()` once.
81
+ *
82
+ * @evidence contracts/common.md#principled-implementation The fixed names each scope references are collected, and `query` and `provider` yield to a path parameter of the same name.
83
+ * @evidence contracts/common.md#clear-and-simple-design One function over the scope sets.
84
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts Only shadowed names are renamed.
85
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
86
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation SdkWebSocketParameterProgrammer.getNames 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.
87
+ */
88
+ const getNames: (props: {
89
+ project: INestiaProject;
90
+ route: ITypedWebSocketRoute;
91
+ }) => INames;
92
+ /**
93
+ * Returns the entries of a WebSocket route: its path parameters, its query,
94
+ * and its provider.
95
+ *
96
+ * @evidence contracts/common.md#principled-implementation The query exists only when the route has one, and the provider is included only when the caller requests it.
97
+ * @evidence contracts/common.md#clear-and-simple-design One list.
98
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The order is the call order.
99
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
100
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation SdkWebSocketParameterProgrammer.getEntries 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.
101
+ */
9
102
  const getEntries: (props: {
10
103
  project: INestiaProject;
11
104
  route: ITypedWebSocketRoute;
12
105
  provider: boolean;
13
106
  prefix: boolean;
14
107
  }) => IEntry[];
108
+ /**
109
+ * Returns the parameter declarations of a WebSocket route's function: `props`
110
+ * in keyword mode, and one positional parameter per entry otherwise.
111
+ *
112
+ * @evidence contracts/common.md#principled-implementation The names come from `getNames`.
113
+ * @evidence contracts/common.md#clear-and-simple-design One function of two modes.
114
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The two modes share the entries.
115
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
116
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation SdkWebSocketParameterProgrammer.getParameterDeclarations 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.
117
+ */
15
118
  const getParameterDeclarations: (props: {
16
119
  project: INestiaProject;
17
120
  route: ITypedWebSocketRoute;
18
121
  provider: boolean;
19
122
  prefix: boolean;
20
123
  }) => ParameterDeclaration[];
124
+ /**
125
+ * Reports whether the route's path holds no parameter, so `path()` takes
126
+ * none.
127
+ *
128
+ * @evidence contracts/common.md#principled-implementation The route has no path parameter and no query.
129
+ * @evidence contracts/common.md#clear-and-simple-design One expression.
130
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts It reads the route.
131
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
132
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation SdkWebSocketParameterProgrammer.isPathEmpty 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.
133
+ */
21
134
  const isPathEmpty: (route: ITypedWebSocketRoute) => boolean;
22
135
  }
@@ -2,20 +2,114 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SdkWebSocketParameterProgrammer = void 0;
4
4
  const factory_1 = require("@ttsc/factory");
5
+ const StringUtil_1 = require("../../utils/StringUtil");
5
6
  const SdkAliasCollection_1 = require("./SdkAliasCollection");
7
+ /**
8
+ * The parameters of a WebSocket route's SDK function.
9
+ *
10
+ * @evidence contracts/common.md#principled-implementation The namespace decides the identifiers, lists the entries, and writes the declarations, as the HTTP one does.
11
+ * @evidence contracts/common.md#clear-and-simple-design Several small functions.
12
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The identifiers are decided once.
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 SdkWebSocketParameterProgrammer 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
+ */
6
16
  var SdkWebSocketParameterProgrammer;
7
17
  (function (SdkWebSocketParameterProgrammer) {
18
+ /**
19
+ * Decides the identifiers of a WebSocket route's function and `path()` once.
20
+ *
21
+ * @evidence contracts/common.md#principled-implementation The fixed names each scope references are collected, and `query` and `provider` yield to a path parameter of the same name.
22
+ * @evidence contracts/common.md#clear-and-simple-design One function over the scope sets.
23
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts Only shadowed names are renamed.
24
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
25
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation SdkWebSocketParameterProgrammer.getNames 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.
26
+ */
27
+ SdkWebSocketParameterProgrammer.getNames = (props) => {
28
+ const { project, route } = props;
29
+ // names each scope references and the SDK cannot change
30
+ const functional = [route.name, "WebSocketConnector"];
31
+ const path = [
32
+ ...(route.pathParameters.length !== 0 ? ["PathParameter"] : []),
33
+ ...(route.query !== null
34
+ ? ["URLSearchParams", "Object", "Array", "String", "undefined"]
35
+ : []),
36
+ ];
37
+ const locals = new Map();
38
+ if (project.config.keyword !== true)
39
+ for (const p of route.pathParameters)
40
+ locals.set(p, StringUtil_1.StringUtil.escapeDuplicate([
41
+ ...functional,
42
+ ...path,
43
+ ...route.pathParameters.filter((q) => q !== p).map((q) => q.name),
44
+ ...locals.values(),
45
+ ])(p.name));
46
+ // `query` and `provider` sit beside the path parameters, as parameters or
47
+ // as `props` keys. Every other own identifier avoids the positional
48
+ // path parameters its scope reads where it is visible: all of them for
49
+ // the function's locals, `variables`, and `location`, none for the
50
+ // loop's `key` and `value`, whose header reads only the query, and for
51
+ // `elem`.
52
+ const keys = route.pathParameters.map((p) => { var _a; return (_a = locals.get(p)) !== null && _a !== void 0 ? _a : p.name; });
53
+ const positional = [...locals.values()];
54
+ const own = (fixed, reads, taken) => (name) => {
55
+ const escaped = StringUtil_1.StringUtil.escapeDuplicate([
56
+ ...fixed,
57
+ ...reads,
58
+ ...taken,
59
+ ])(name);
60
+ taken.push(escaped);
61
+ return escaped;
62
+ };
63
+ const shared = [];
64
+ const $props = own([...functional, ...path], [], shared)("props");
65
+ // Positional `query` and `provider` also yield to the names their scopes
66
+ // reference; as `props` keys they shadow nothing, so a route named
67
+ // `query` keeps its `query` key.
68
+ const beside = (fixed) => own(project.config.keyword === true ? [] : fixed, keys, shared);
69
+ const $query = beside([...functional, ...path])("query");
70
+ const $provider = beside(functional)("provider");
71
+ const inFunction = [...shared];
72
+ const inPath = [...shared];
73
+ const names = {
74
+ props: $props,
75
+ query: $query,
76
+ provider: $provider,
77
+ connection: own(functional, positional, inFunction)("connection"),
78
+ url: own(functional, positional, inFunction)("url"),
79
+ connector: own(functional, positional, inFunction)("connector"),
80
+ driver: own(functional, positional, inFunction)("driver"),
81
+ variables: own(path, positional, inPath)("variables"),
82
+ location: own(path, positional, inPath)("location"),
83
+ key: own(path, [], inPath)("key"),
84
+ value: own(path, [], inPath)("value"),
85
+ elem: own(path, [], inPath)("elem"),
86
+ };
87
+ return Object.assign(Object.assign({}, names), { parameter: (p) => { var _a; return (_a = locals.get(p)) !== null && _a !== void 0 ? _a : p.name; }, access: (key) => project.config.keyword === true
88
+ ? factory_1.factory.createPropertyAccessExpression(factory_1.factory.createIdentifier(names.props), key)
89
+ : factory_1.factory.createIdentifier(key) });
90
+ };
91
+ /**
92
+ * Returns the entries of a WebSocket route: its path parameters, its query,
93
+ * and its provider.
94
+ *
95
+ * @evidence contracts/common.md#principled-implementation The query exists only when the route has one, and the provider is included only when the caller requests it.
96
+ * @evidence contracts/common.md#clear-and-simple-design One list.
97
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The order is the call order.
98
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
99
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation SdkWebSocketParameterProgrammer.getEntries 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.
100
+ */
8
101
  SdkWebSocketParameterProgrammer.getEntries = (props) => {
102
+ const names = SdkWebSocketParameterProgrammer.getNames(props);
9
103
  const prefix = props.prefix ? `${props.route.name}.` : "";
10
104
  return [
11
105
  ...props.route.pathParameters.map((p) => ({
12
- key: p.name,
106
+ key: names.parameter(p),
13
107
  type: SdkAliasCollection_1.SdkAliasCollection.name(p),
14
108
  })),
15
109
  ...(props.route.query
16
110
  ? [
17
111
  {
18
- key: "query",
112
+ key: names.query,
19
113
  type: factory_1.factory.createTypeReferenceNode(`${prefix}Query`),
20
114
  },
21
115
  ]
@@ -23,18 +117,29 @@ var SdkWebSocketParameterProgrammer;
23
117
  ...(props.provider
24
118
  ? [
25
119
  {
26
- key: "provider",
120
+ key: names.provider,
27
121
  type: factory_1.factory.createTypeReferenceNode(`${prefix}Provider`),
28
122
  },
29
123
  ]
30
124
  : []),
31
125
  ];
32
126
  };
127
+ /**
128
+ * Returns the parameter declarations of a WebSocket route's function: `props`
129
+ * in keyword mode, and one positional parameter per entry otherwise.
130
+ *
131
+ * @evidence contracts/common.md#principled-implementation The names come from `getNames`.
132
+ * @evidence contracts/common.md#clear-and-simple-design One function of two modes.
133
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The two modes share the entries.
134
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
135
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation SdkWebSocketParameterProgrammer.getParameterDeclarations 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.
136
+ */
33
137
  SdkWebSocketParameterProgrammer.getParameterDeclarations = (props) => {
34
138
  const entries = SdkWebSocketParameterProgrammer.getEntries(props);
35
139
  if (entries.length === 0)
36
140
  return [];
37
141
  else if (props.project.config.keyword === true) {
142
+ const names = SdkWebSocketParameterProgrammer.getNames(props);
38
143
  const typeName = props.prefix
39
144
  ? `${props.route.name}.Props`
40
145
  : "Props";
@@ -42,14 +147,24 @@ var SdkWebSocketParameterProgrammer;
42
147
  ? factory_1.factory.createTypeReferenceNode(typeName)
43
148
  : factory_1.factory.createTypeReferenceNode("Omit", [
44
149
  factory_1.factory.createTypeReferenceNode(typeName),
45
- factory_1.factory.createLiteralTypeNode(factory_1.factory.createStringLiteral("provider")),
150
+ factory_1.factory.createLiteralTypeNode(factory_1.factory.createStringLiteral(names.provider)),
46
151
  ]);
47
152
  return [
48
- factory_1.factory.createParameterDeclaration(undefined, undefined, "props", undefined, node),
153
+ factory_1.factory.createParameterDeclaration(undefined, undefined, names.props, undefined, node),
49
154
  ];
50
155
  }
51
156
  return entries.map((entry) => factory_1.factory.createParameterDeclaration(undefined, undefined, entry.key, undefined, entry.type));
52
157
  };
158
+ /**
159
+ * Reports whether the route's path holds no parameter, so `path()` takes
160
+ * none.
161
+ *
162
+ * @evidence contracts/common.md#principled-implementation The route has no path parameter and no query.
163
+ * @evidence contracts/common.md#clear-and-simple-design One expression.
164
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts It reads the route.
165
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
166
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation SdkWebSocketParameterProgrammer.isPathEmpty 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.
167
+ */
53
168
  SdkWebSocketParameterProgrammer.isPathEmpty = (route) => route.pathParameters.length === 0 && route.query === null;
54
169
  })(SdkWebSocketParameterProgrammer || (exports.SdkWebSocketParameterProgrammer = SdkWebSocketParameterProgrammer = {}));
55
170
  //# sourceMappingURL=SdkWebSocketParameterProgrammer.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SdkWebSocketParameterProgrammer.js","sourceRoot":"","sources":["../../../src/generates/internal/SdkWebSocketParameterProgrammer.ts"],"names":[],"mappings":";;;AAAA,2CAIuB;AAIvB,6DAA0D;AAE1D,IAAiB,+BAA+B,CAgF/C;AAhFD,WAAiB,+BAA+B;IAMjC,0CAAU,GAAG,CAAC,KAK1B,EAAY,EAAE;QACb,MAAM,MAAM,GAAW,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;QAClE,OAAO;YACL,GAAG,KAAK,CAAC,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;gBACxC,GAAG,EAAE,CAAC,CAAC,IAAI;gBACX,IAAI,EAAE,uCAAkB,CAAC,IAAI,CAAC,CAAC,CAAC;aACjC,CAAC,CAAC;YACH,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK;gBACnB,CAAC,CAAC;oBACE;wBACE,GAAG,EAAE,OAAO;wBACZ,IAAI,EAAE,iBAAO,CAAC,uBAAuB,CAAC,GAAG,MAAM,OAAO,CAAC;qBACxD;iBACF;gBACH,CAAC,CAAC,EAAE,CAAC;YACP,GAAG,CAAC,KAAK,CAAC,QAAQ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AAG,CAAC,KAA2B,EAAW,EAAE,CAClE,KAAK,CAAC,cAAc,CAAC,MAAM,KAAK,CAAC,IAAI,KAAK,CAAC,KAAK,KAAK,IAAI,CAAC;AAC9D,CAAC,EAhFgB,+BAA+B,aAA/B,+BAA+B,GAA/B,+BAA+B,QAgF/C"}
1
+ {"version":3,"file":"SdkWebSocketParameterProgrammer.js","sourceRoot":"","sources":["../../../src/generates/internal/SdkWebSocketParameterProgrammer.ts"],"names":[],"mappings":";;;AAAA,2CAKuB;AAKvB,uDAAoD;AACpD,6DAA0D;AAE1D;;;;;;;;GAQG;AACH,IAAiB,+BAA+B,CA4Q/C;AA5QD,WAAiB,+BAA+B;IAqE9C;;;;;;;;OAQG;IACU,wCAAQ,GAAG,CAAC,KAGxB,EAAU,EAAE;QACX,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,KAAK,CAAC;QACjC,wDAAwD;QACxD,MAAM,UAAU,GAAa,CAAC,KAAK,CAAC,IAAI,EAAE,oBAAoB,CAAC,CAAC;QAChE,MAAM,IAAI,GAAa;YACrB,GAAG,CAAC,KAAK,CAAC,cAAc,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;YAC/D,GAAG,CAAC,KAAK,CAAC,KAAK,KAAK,IAAI;gBACtB,CAAC,CAAC,CAAC,iBAAiB,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,WAAW,CAAC;gBAC/D,CAAC,CAAC,EAAE,CAAC;SACR,CAAC;QACF,MAAM,MAAM,GAAsD,IAAI,GAAG,EAAE,CAAC;QAC5E,IAAI,OAAO,CAAC,MAAM,CAAC,OAAO,KAAK,IAAI;YACjC,KAAK,MAAM,CAAC,IAAI,KAAK,CAAC,cAAc;gBAClC,MAAM,CAAC,GAAG,CACR,CAAC,EACD,uBAAU,CAAC,eAAe,CAAC;oBACzB,GAAG,UAAU;oBACb,GAAG,IAAI;oBACP,G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ACT,KAAK,CAAC,IAAI,CACX,CACF,CAAC;IACJ,CAAC,CAAC;IAEF;;;;;;;;;OASG;IACU,2CAAW,GAAG,CAAC,KAA2B,EAAW,EAAE,CAClE,KAAK,CAAC,cAAc,CAAC,MAAM,KAAK,CAAC,IAAI,KAAK,CAAC,KAAK,KAAK,IAAI,CAAC;AAC9D,CAAC,EA5QgB,+BAA+B,aAA/B,+BAA+B,GAA/B,+BAA+B,QA4Q/C"}
@@ -2,6 +2,24 @@ import { type Statement } from "@ttsc/factory";
2
2
  import { INestiaProject } from "../../structures/INestiaProject";
3
3
  import { ITypedWebSocketRoute } from "../../structures/ITypedWebSocketRoute";
4
4
  import { ImportDictionary } from "./ImportDictionary";
5
+ /**
6
+ * Writes a WebSocket route into the SDK: its function and its namespace.
7
+ *
8
+ * @evidence contracts/common.md#principled-implementation The namespace prints the async function that opens the connection with `tgrid`.
9
+ * @evidence contracts/common.md#clear-and-simple-design One public function and the writers.
10
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The identifiers are decided by the parameter programmer.
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 SdkWebSocketRouteProgrammer 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 SdkWebSocketRouteProgrammer {
15
+ /**
16
+ * Returns the function and the namespace of a WebSocket route.
17
+ *
18
+ * @evidence contracts/common.md#principled-implementation The two nodes are composed together so they share names.
19
+ * @evidence contracts/common.md#clear-and-simple-design One function.
20
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The shape follows the route.
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 SdkWebSocketRouteProgrammer.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.
23
+ */
6
24
  const write: (project: INestiaProject) => (importer: ImportDictionary) => (route: ITypedWebSocketRoute) => Statement[];
7
25
  }
@@ -3,46 +3,87 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SdkWebSocketRouteProgrammer = void 0;
4
4
  const factory_1 = require("@ttsc/factory");
5
5
  const IdentifierFactory_1 = require("../../factories/IdentifierFactory");
6
- const StringUtil_1 = require("../../utils/StringUtil");
7
6
  const FilePrinter_1 = require("./FilePrinter");
8
7
  const SdkImportWizard_1 = require("./SdkImportWizard");
9
8
  const SdkWebSocketNamespaceProgrammer_1 = require("./SdkWebSocketNamespaceProgrammer");
10
9
  const SdkWebSocketParameterProgrammer_1 = require("./SdkWebSocketParameterProgrammer");
10
+ /**
11
+ * Writes a WebSocket route into the SDK: its function and its namespace.
12
+ *
13
+ * @evidence contracts/common.md#principled-implementation The namespace prints the async function that opens the connection with `tgrid`.
14
+ * @evidence contracts/common.md#clear-and-simple-design One public function and the writers.
15
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The identifiers are decided by the parameter programmer.
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 SdkWebSocketRouteProgrammer 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.
18
+ */
11
19
  var SdkWebSocketRouteProgrammer;
12
20
  (function (SdkWebSocketRouteProgrammer) {
21
+ /**
22
+ * Returns the function and the namespace of a WebSocket route.
23
+ *
24
+ * @evidence contracts/common.md#principled-implementation The two nodes are composed together so they share names.
25
+ * @evidence contracts/common.md#clear-and-simple-design One function.
26
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The shape follows the route.
27
+ * @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
28
+ * @evidenceExclude contracts/portability.md#os-neutral-implementation SdkWebSocketRouteProgrammer.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.
29
+ */
13
30
  SdkWebSocketRouteProgrammer.write = (project) => (importer) => (route) => [
14
- FilePrinter_1.FilePrinter.description(writeFunction(project)(importer)(route), writeDescription(route)),
31
+ FilePrinter_1.FilePrinter.description(writeFunction(project)(importer)(route), writeDescription(project, route)),
15
32
  SdkWebSocketNamespaceProgrammer_1.SdkWebSocketNamespaceProgrammer.write(project)(importer)(route),
16
33
  ];
17
- const writeDescription = (route) => {
34
+ const writeDescription = (project, route) => {
18
35
  // MAIN DESCRIPTION
19
36
  const comments = route.description
20
37
  ? route.description.split("\n")
21
38
  : [];
22
- // COMMENT TAGS
23
- const tags = route.jsDocTags.filter((tag) => tag.name !== "param" ||
24
- [...route.pathParameters, ...(route.query ? [route.query] : [])]
25
- .filter((p) => p.category === "param" || p.category === "query")
26
- .some((p) => { var _a, _b; return p.name === ((_b = (_a = tag.text) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.text); }));
27
- if (tags.length !== 0) {
28
- const content = tags.map((t) => { var _a; return ((_a = t.text) === null || _a === void 0 ? void 0 : _a.length)
29
- ? `@${t.name} ${t.text.map((e) => e.text).join("")}`
30
- : `@${t.name}`; });
31
- comments.push("", ...new Set(content));
32
- }
39
+ // COMMENT TAGS, each `@param` naming what the SDK function declares,
40
+ // which yields on a collision
41
+ const names = SdkWebSocketParameterProgrammer_1.SdkWebSocketParameterProgrammer.getNames({ project, route });
42
+ const declared = (name) => {
43
+ const path = route.pathParameters.find((p) => p.name === name);
44
+ const key = path !== undefined
45
+ ? project.config.keyword === true
46
+ ? path.name
47
+ : names.parameter(path)
48
+ : route.query !== null && route.query.name === name
49
+ ? names.query
50
+ : null;
51
+ return key === null
52
+ ? null
53
+ : project.config.keyword === true
54
+ ? `${names.props}.${key}`
55
+ : key;
56
+ };
57
+ const tags = route.jsDocTags
58
+ .map((tag) => {
59
+ var _a, _b, _c, _d, _e;
60
+ var _f, _g;
61
+ if (tag.name !== "param")
62
+ return FilePrinter_1.FilePrinter.jsDocTag(tag.name, (_f = (_a = tag.text) === null || _a === void 0 ? void 0 : _a.map((e) => e.text).join("")) !== null && _f !== void 0 ? _f : "");
63
+ const name = declared((_c = (_b = tag.text) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c.text);
64
+ return name === null
65
+ ? null
66
+ : FilePrinter_1.FilePrinter.jsDocTag(`param ${name}`, (_g = (_e = (_d = tag.text) === null || _d === void 0 ? void 0 : _d.find((e) => e.kind === "text")) === null || _e === void 0 ? void 0 : _e.text) !== null && _g !== void 0 ? _g : "");
67
+ })
68
+ .filter((tag) => tag !== null);
69
+ // apart from the description, when there is one
70
+ if (tags.length !== 0)
71
+ comments.push(...(comments.length !== 0 ? [""] : []), ...new Set(tags));
33
72
  // POSTFIX
34
73
  if (!!comments.length)
35
74
  comments.push("");
36
- comments.push(`@controller ${route.controller.class.name}.${route.name}`, `@path ${route.path}`, `@nestia Generated by Nestia - https://github.com/samchon/nestia`);
75
+ comments.push(
76
+ // the public name, kept by a route declared under a local one
77
+ `@controller ${route.controller.class.name}.${route.key}`, `@path ${route.path}`, `@nestia Generated by Nestia - https://github.com/samchon/nestia`);
37
78
  return comments.join("\n");
38
79
  };
39
80
  const writeFunction = (project) => (importer) => (route) => {
40
- const connection = StringUtil_1.StringUtil.escapeDuplicate([route.name])("connection");
81
+ const names = SdkWebSocketParameterProgrammer_1.SdkWebSocketParameterProgrammer.getNames({ project, route });
41
82
  return factory_1.factory.createFunctionDeclaration([
42
83
  factory_1.factory.createModifier(factory_1.SyntaxKind.ExportKeyword),
43
84
  factory_1.factory.createModifier(factory_1.SyntaxKind.AsyncKeyword),
44
85
  ], undefined, route.name, undefined, [
45
- IdentifierFactory_1.IdentifierFactory.parameter(connection, factory_1.factory.createTypeReferenceNode(SdkImportWizard_1.SdkImportWizard.IConnection(importer), [factory_1.factory.createTypeReferenceNode(`${route.name}.Header`)])),
86
+ IdentifierFactory_1.IdentifierFactory.parameter(names.connection, factory_1.factory.createTypeReferenceNode(SdkImportWizard_1.SdkImportWizard.IConnection(importer), [factory_1.factory.createTypeReferenceNode(`${route.name}.Header`)])),
46
87
  ...SdkWebSocketParameterProgrammer_1.SdkWebSocketParameterProgrammer.getParameterDeclarations({
47
88
  project,
48
89
  route,
@@ -51,23 +92,20 @@ var SdkWebSocketRouteProgrammer;
51
92
  }),
52
93
  ], factory_1.factory.createTypeReferenceNode("Promise", [
53
94
  factory_1.factory.createTypeReferenceNode(`${route.name}.Output`),
54
- ]), factory_1.factory.createBlock(writeFunctionBody(project)(importer)(route)(connection), true));
95
+ ]), factory_1.factory.createBlock(writeFunctionBody(project)(importer)(route)(names), true));
55
96
  };
56
- const writeFunctionBody = (project) => (importer) => (route) => (connection) => {
57
- const access = (key) => project.config.keyword === true
58
- ? factory_1.factory.createPropertyAccessExpression(factory_1.factory.createIdentifier("props"), key)
59
- : factory_1.factory.createIdentifier(key);
97
+ const writeFunctionBody = (project) => (importer) => (route) => (names) => {
60
98
  return [
61
- local("url")(factory_1.factory.createTypeReferenceNode("string"))(joinPath(connection, factory_1.factory.createCallExpression(factory_1.factory.createPropertyAccessExpression(factory_1.factory.createIdentifier(route.name), "path"), [], project.config.keyword === true &&
99
+ local(names.url)(factory_1.factory.createTypeReferenceNode("string"))(joinPath(names.connection, factory_1.factory.createCallExpression(factory_1.factory.createPropertyAccessExpression(factory_1.factory.createIdentifier(route.name), "path"), [], project.config.keyword === true &&
62
100
  SdkWebSocketParameterProgrammer_1.SdkWebSocketParameterProgrammer.isPathEmpty(route) === false
63
- ? [factory_1.factory.createIdentifier("props")]
101
+ ? [factory_1.factory.createIdentifier(names.props)]
64
102
  : SdkWebSocketParameterProgrammer_1.SdkWebSocketParameterProgrammer.getEntries({
65
103
  project,
66
104
  route,
67
105
  provider: false,
68
106
  prefix: true,
69
107
  }).map((p) => factory_1.factory.createIdentifier(p.key))))),
70
- local("connector")(factory_1.factory.createTypeReferenceNode(importer.external({
108
+ local(names.connector)(factory_1.factory.createTypeReferenceNode(importer.external({
71
109
  declaration: false,
72
110
  file: "tgrid",
73
111
  type: "element",
@@ -82,24 +120,28 @@ var SdkWebSocketRouteProgrammer;
82
120
  type: "element",
83
121
  name: "WebSocketConnector",
84
122
  })), undefined, [
85
- factory_1.factory.createAsExpression(factory_1.factory.createBinaryExpression(factory_1.factory.createPropertyAccessExpression(factory_1.factory.createIdentifier(connection), "headers"), factory_1.factory.createToken(factory_1.SyntaxKind.QuestionQuestionToken), factory_1.factory.createObjectLiteralExpression([], false)), factory_1.factory.createKeywordTypeNode(factory_1.SyntaxKind.AnyKeyword)),
86
- access("provider"),
123
+ factory_1.factory.createAsExpression(factory_1.factory.createBinaryExpression(factory_1.factory.createPropertyAccessExpression(factory_1.factory.createIdentifier(names.connection), "headers"), factory_1.factory.createToken(factory_1.SyntaxKind.QuestionQuestionToken), factory_1.factory.createObjectLiteralExpression([], false)), factory_1.factory.createKeywordTypeNode(factory_1.SyntaxKind.AnyKeyword)),
124
+ names.access(names.provider),
87
125
  ])),
88
- factory_1.factory.createExpressionStatement(factory_1.factory.createAwaitExpression(factory_1.factory.createCallExpression(factory_1.factory.createPropertyAccessExpression(factory_1.factory.createIdentifier("connector"), "connect"), undefined, [factory_1.factory.createIdentifier("url")]))),
89
- local("driver")(factory_1.factory.createTypeReferenceNode(importer.external({
126
+ factory_1.factory.createExpressionStatement(factory_1.factory.createAwaitExpression(factory_1.factory.createCallExpression(factory_1.factory.createPropertyAccessExpression(factory_1.factory.createIdentifier(names.connector), "connect"), undefined, [factory_1.factory.createIdentifier(names.url)]))),
127
+ local(names.driver)(factory_1.factory.createTypeReferenceNode(importer.external({
90
128
  declaration: true,
91
129
  file: "tgrid",
92
130
  type: "element",
93
131
  name: "Driver",
94
- }), [factory_1.factory.createTypeReferenceNode(`${route.name}.Listener`)]))(factory_1.factory.createCallExpression(factory_1.factory.createPropertyAccessExpression(factory_1.factory.createIdentifier("connector"), "getDriver"), undefined, undefined)),
132
+ }), [factory_1.factory.createTypeReferenceNode(`${route.name}.Listener`)]))(factory_1.factory.createCallExpression(factory_1.factory.createPropertyAccessExpression(factory_1.factory.createIdentifier(names.connector), "getDriver"), undefined, undefined)),
95
133
  factory_1.factory.createReturnStatement(factory_1.factory.createObjectLiteralExpression([
96
- factory_1.factory.createShorthandPropertyAssignment("connector"),
97
- factory_1.factory.createShorthandPropertyAssignment("driver"),
98
- factory_1.factory.createPropertyAssignment(factory_1.factory.createIdentifier("reconnect"), factory_1.factory.createArrowFunction([factory_1.factory.createToken(factory_1.SyntaxKind.AsyncKeyword)], undefined, [], undefined, factory_1.factory.createToken(factory_1.SyntaxKind.EqualsGreaterThanToken), factory_1.factory.createAwaitExpression(factory_1.factory.createCallExpression(factory_1.factory.createPropertyAccessExpression(factory_1.factory.createIdentifier("connector"), factory_1.factory.createIdentifier("connect")), undefined, [factory_1.factory.createIdentifier("url")])))),
134
+ writeOutputMember("connector", names.connector),
135
+ writeOutputMember("driver", names.driver),
136
+ factory_1.factory.createPropertyAssignment(factory_1.factory.createIdentifier("reconnect"), factory_1.factory.createArrowFunction([factory_1.factory.createToken(factory_1.SyntaxKind.AsyncKeyword)], undefined, [], undefined, factory_1.factory.createToken(factory_1.SyntaxKind.EqualsGreaterThanToken), factory_1.factory.createAwaitExpression(factory_1.factory.createCallExpression(factory_1.factory.createPropertyAccessExpression(factory_1.factory.createIdentifier(names.connector), factory_1.factory.createIdentifier("connect")), undefined, [factory_1.factory.createIdentifier(names.url)])))),
99
137
  ], true)),
100
138
  ];
101
139
  };
102
140
  })(SdkWebSocketRouteProgrammer || (exports.SdkWebSocketRouteProgrammer = SdkWebSocketRouteProgrammer = {}));
141
+ /** A member of the returned `Output`, shorthand when its local has its name. */
142
+ const writeOutputMember = (key, local) => key === local
143
+ ? factory_1.factory.createShorthandPropertyAssignment(key)
144
+ : factory_1.factory.createPropertyAssignment(key, factory_1.factory.createIdentifier(local));
103
145
  const local = (name) => (type) => (expression) => factory_1.factory.createVariableStatement([], factory_1.factory.createVariableDeclarationList([factory_1.factory.createVariableDeclaration(name, undefined, type, expression)], factory_1.NodeFlags.Const));
104
146
  const joinPath = (connection, caller) => factory_1.factory.createTemplateExpression(factory_1.factory.createTemplateHead("", ""), [
105
147
  factory_1.factory.createTemplateSpan(factory_1.factory.createConditionalExpression(factory_1.factory.createCallExpression(factory_1.factory.createPropertyAccessExpression(factory_1.factory.createPropertyAccessExpression(factory_1.factory.createIdentifier(connection), factory_1.factory.createIdentifier("host")), factory_1.factory.createIdentifier("endsWith")), undefined, [factory_1.factory.createStringLiteral("/")]), factory_1.factory.createToken(factory_1.SyntaxKind.QuestionToken), factory_1.factory.createCallExpression(factory_1.factory.createPropertyAccessExpression(factory_1.factory.createPropertyAccessExpression(factory_1.factory.createIdentifier(connection), factory_1.factory.createIdentifier("host")), factory_1.factory.createIdentifier("substring")), undefined, [
@@ -1 +1 @@
1
- {"version":3,"file":"SdkWebSocketRouteProgrammer.js","sourceRoot":"","sources":["../../../src/generates/internal/SdkWebSocketRouteProgrammer.ts"],"names":[],"mappings":";;;AAAA,2CAOuB;AAGvB,yEAAsE;AAGtE,uDAAoD;AACpD,+CAA4C;AAE5C,uDAAoD;AACpD,uFAAoF;AACpF,uFAAoF;AAEpF,IAAiB,2BAA2B,CA+N3C;AA/ND,WAAiB,2BAA2B;IAC7B,iCAAK,GAChB,CAAC,OAAuB,EAAE,EAAE,CAC5B,CAAC,QAA0B,EAAE,EAAE,CAC/B,CAAC,KAA2B,EAAe,EAAE,CAAC;QAC5C,yBAAW,CAAC,WAAW,CACrB,aAAa,CAAC,OAAO,CAAC,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC,EACvC,gBAAgB,CAAC,KAAK,CAAC,CACxB;QACD,iEAA+B,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC;KAChE,CAAC;IAEJ,MAAM,gBAAgB,GAAG,CAAC,KAA2B,EAAU,EAAE;QAC/D,mBAAmB;QACnB,MAAM,Q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AC,CACtC,EACD,SAAS,EACT;QACE,iBAAO,CAAC,oBAAoB,CAAC,GAAG,CAAC;QACjC,iBAAO,CAAC,sBAAsB,CAC5B,iBAAO,CAAC,8BAA8B,CACpC,iBAAO,CAAC,8BAA8B,CACpC,iBAAO,CAAC,gBAAgB,CAAC,UAAU,CAAC,EACpC,iBAAO,CAAC,gBAAgB,CAAC,MAAM,CAAC,CACjC,EACD,iBAAO,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CACnC,EACD,iBAAO,CAAC,WAAW,CAAC,oBAAU,CAAC,UAAU,CAAC,EAC1C,iBAAO,CAAC,oBAAoB,CAAC,GAAG,CAAC,CAClC;KACF,CACF,EACD,iBAAO,CAAC,WAAW,CAAC,oBAAU,CAAC,UAAU,CAAC,EAC1C,iBAAO,CAAC,8BAA8B,CACpC,iBAAO,CAAC,gBAAgB,CAAC,UAAU,CAAC,EACpC,iBAAO,CAAC,gBAAgB,CAAC,MAAM,CAAC,CACjC,CACF,EACD,iBAAO,CAAC,oBAAoB,CAAC,EAAE,CAAC,CACjC;IACD,iBAAO,CAAC,kBAAkB,CAAC,MAAM,EAAE,iBAAO,CAAC,kBAAkB,CAAC,EAAE,CAAC,CAAC;CACnE,CAAC,CAAC"}
1
+ {"version":3,"file":"SdkWebSocketRouteProgrammer.js","sourceRoot":"","sources":["../../../src/generates/internal/SdkWebSocketRouteProgrammer.ts"],"names":[],"mappings":";;;AAAA,2CAOuB;AAEvB,yEAAsE;AAGtE,+CAA4C;AAE5C,uDAAoD;AACpD,uFAAoF;AACpF,uFAAoF;AAEpF;;;;;;;;GAQG;AACH,IAAiB,2BAA2B,CA2P3C;AA3PD,WAAiB,2BAA2B;IAC1C;;;;;;;;OAQG;IACU,iCAAK,GAChB,CAAC,OAAuB,EAAE,EAAE,CAC5B,CAAC,QAA0B,EAAE,EAAE,CAC/B,CAAC,KAA2B,EAAe,EAAE,CAAC;QAC5C,yBAAW,CAAC,WAAW,CACrB,aAAa,CAAC,OAAO,CAA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