@voxgig/sdkgen 1.2.1 → 1.3.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 (345) hide show
  1. package/bin/voxgig-sdkgen +2 -2
  2. package/dist/action/action.d.ts +3 -1
  3. package/dist/action/action.js +26 -10
  4. package/dist/action/action.js.map +1 -1
  5. package/dist/action/feature.js +9 -8
  6. package/dist/action/feature.js.map +1 -1
  7. package/dist/action/target.d.ts +7 -1
  8. package/dist/action/target.js +22 -13
  9. package/dist/action/target.js.map +1 -1
  10. package/dist/cmp/Changelog.d.ts +2 -0
  11. package/dist/cmp/Changelog.js +30 -0
  12. package/dist/cmp/Changelog.js.map +1 -0
  13. package/dist/cmp/Deploy.d.ts +2 -0
  14. package/dist/cmp/Deploy.js +227 -0
  15. package/dist/cmp/Deploy.js.map +1 -0
  16. package/dist/cmp/FeatureHook.js +5 -6
  17. package/dist/cmp/FeatureHook.js.map +1 -1
  18. package/dist/cmp/License.d.ts +2 -0
  19. package/dist/cmp/License.js +44 -0
  20. package/dist/cmp/License.js.map +1 -0
  21. package/dist/cmp/Readme.js +2 -0
  22. package/dist/cmp/Readme.js.map +1 -1
  23. package/dist/cmp/ReadmeErrors.d.ts +2 -0
  24. package/dist/cmp/ReadmeErrors.js +210 -0
  25. package/dist/cmp/ReadmeErrors.js.map +1 -0
  26. package/dist/cmp/ReadmeExplanation.js +213 -223
  27. package/dist/cmp/ReadmeExplanation.js.map +1 -1
  28. package/dist/cmp/ReadmeModel.js +6 -1
  29. package/dist/cmp/ReadmeModel.js.map +1 -1
  30. package/dist/cmp/ReadmeTop.js +389 -82
  31. package/dist/cmp/ReadmeTop.js.map +1 -1
  32. package/dist/cmp/Security.d.ts +2 -0
  33. package/dist/cmp/Security.js +36 -0
  34. package/dist/cmp/Security.js.map +1 -0
  35. package/dist/helpers/canonType.d.ts +7 -0
  36. package/dist/helpers/canonType.js +74 -0
  37. package/dist/helpers/canonType.js.map +1 -0
  38. package/dist/helpers/collectDeps.d.ts +3 -2
  39. package/dist/helpers/collectDeps.js.map +1 -1
  40. package/dist/helpers/naming.d.ts +3 -0
  41. package/dist/helpers/naming.js +51 -0
  42. package/dist/helpers/naming.js.map +1 -0
  43. package/dist/helpers/opExample.d.ts +13 -0
  44. package/dist/helpers/opExample.js +149 -0
  45. package/dist/helpers/opExample.js.map +1 -0
  46. package/dist/helpers/opShape.d.ts +18 -0
  47. package/dist/helpers/opShape.js +225 -0
  48. package/dist/helpers/opShape.js.map +1 -0
  49. package/dist/helpers/packageMeta.d.ts +27 -0
  50. package/dist/helpers/packageMeta.js +224 -0
  51. package/dist/helpers/packageMeta.js.map +1 -0
  52. package/dist/sdkgen.d.ts +12 -2
  53. package/dist/sdkgen.js +60 -20
  54. package/dist/sdkgen.js.map +1 -1
  55. package/dist/tsconfig.tsbuildinfo +1 -1
  56. package/dist/types.d.ts +65 -2
  57. package/dist/types.js.map +1 -1
  58. package/dist/utility.d.ts +2 -1
  59. package/dist/utility.js +39 -11
  60. package/dist/utility.js.map +1 -1
  61. package/model/sdkgen.aontu +137 -0
  62. package/package.json +11 -5
  63. package/project/.sdk/model/feature/feature-index.aontu +5 -0
  64. package/project/.sdk/model/target/go-cli.aontu +47 -0
  65. package/project/.sdk/model/target/go-mcp.aontu +41 -0
  66. package/project/.sdk/model/target/go.aontu +28 -0
  67. package/project/.sdk/model/target/{js.jsonic → js.aontu} +13 -0
  68. package/project/.sdk/model/target/{lua.jsonic → lua.aontu} +13 -0
  69. package/project/.sdk/model/target/{php.jsonic → php.aontu} +13 -0
  70. package/project/.sdk/model/target/{py.jsonic → py.aontu} +13 -0
  71. package/project/.sdk/model/target/{rb.jsonic → rb.aontu} +13 -0
  72. package/project/.sdk/model/target/{ts.jsonic → ts.aontu} +13 -0
  73. package/project/.sdk/src/cmp/go/Config_go.ts +3 -2
  74. package/project/.sdk/src/cmp/go/EntityOperation_go.ts +1 -0
  75. package/project/.sdk/src/cmp/go/EntityTypes_go.ts +197 -0
  76. package/project/.sdk/src/cmp/go/Entity_go.ts +2 -1
  77. package/project/.sdk/src/cmp/go/MainEntity_go.ts +6 -0
  78. package/project/.sdk/src/cmp/go/Main_go.ts +23 -3
  79. package/project/.sdk/src/cmp/go/Package_go.ts +1 -1
  80. package/project/.sdk/src/cmp/go/ReadmeEntity_go.ts +48 -10
  81. package/project/.sdk/src/cmp/go/ReadmeExamplesTest_go.ts +688 -0
  82. package/project/.sdk/src/cmp/go/ReadmeExplanation_go.ts +1 -1
  83. package/project/.sdk/src/cmp/go/ReadmeHowto_go.ts +52 -8
  84. package/project/.sdk/src/cmp/go/ReadmeInstall_go.ts +11 -6
  85. package/project/.sdk/src/cmp/go/ReadmeIntro_go.ts +40 -1
  86. package/project/.sdk/src/cmp/go/ReadmeModel_go.ts +67 -17
  87. package/project/.sdk/src/cmp/go/ReadmeOptions_go.ts +4 -3
  88. package/project/.sdk/src/cmp/go/ReadmeQuick_go.ts +146 -116
  89. package/project/.sdk/src/cmp/go/ReadmeRef_go.ts +87 -21
  90. package/project/.sdk/src/cmp/go/ReadmeTopHowto_go.ts +4 -0
  91. package/project/.sdk/src/cmp/go/ReadmeTopQuick_go.ts +75 -16
  92. package/project/.sdk/src/cmp/go/ReadmeTopTest_go.ts +35 -5
  93. package/project/.sdk/src/cmp/go/TestEntity_go.ts +1 -1
  94. package/project/.sdk/src/cmp/go/Test_go.ts +5 -1
  95. package/project/.sdk/src/cmp/go/fragment/Entity.fragment.go +21 -0
  96. package/project/.sdk/src/cmp/go/fragment/EntityCreateOp.fragment.go +11 -0
  97. package/project/.sdk/src/cmp/go/fragment/EntityListOp.fragment.go +11 -0
  98. package/project/.sdk/src/cmp/go/fragment/EntityLoadOp.fragment.go +11 -0
  99. package/project/.sdk/src/cmp/go/fragment/EntityRemoveOp.fragment.go +11 -0
  100. package/project/.sdk/src/cmp/go/fragment/EntityUpdateOp.fragment.go +11 -0
  101. package/project/.sdk/src/cmp/go/utility_go.ts +70 -0
  102. package/project/.sdk/src/cmp/go-cli/Main_go-cli.ts +195 -0
  103. package/project/.sdk/src/cmp/go-cli/fragment/main.fragment.go +106 -0
  104. package/project/.sdk/src/cmp/go-cli/fragment/words.fragment.go +132 -0
  105. package/project/.sdk/src/cmp/go-mcp/Main_go-mcp.ts +184 -0
  106. package/project/.sdk/src/cmp/go-mcp/fragment/main.fragment.go +68 -0
  107. package/project/.sdk/src/cmp/go-mcp/fragment/tools.fragment.go +114 -0
  108. package/project/.sdk/src/cmp/js/Config_js.ts +3 -6
  109. package/project/.sdk/src/cmp/js/EntityTypes_js.ts +111 -0
  110. package/project/.sdk/src/cmp/js/MainEntity_js.ts +1 -0
  111. package/project/.sdk/src/cmp/js/Main_js.ts +3 -0
  112. package/project/.sdk/src/cmp/js/Package_js.ts +16 -7
  113. package/project/.sdk/src/cmp/js/ReadmeEntity_js.ts +33 -10
  114. package/project/.sdk/src/cmp/js/ReadmeExplanation_js.ts +2 -2
  115. package/project/.sdk/src/cmp/js/ReadmeHowto_js.ts +52 -11
  116. package/project/.sdk/src/cmp/js/ReadmeIntro_js.ts +39 -1
  117. package/project/.sdk/src/cmp/js/ReadmeModel_js.ts +50 -18
  118. package/project/.sdk/src/cmp/js/ReadmeOptions_js.ts +4 -3
  119. package/project/.sdk/src/cmp/js/ReadmeQuick_js.ts +70 -20
  120. package/project/.sdk/src/cmp/js/ReadmeRef_js.ts +50 -16
  121. package/project/.sdk/src/cmp/js/ReadmeTopHowto_js.ts +3 -0
  122. package/project/.sdk/src/cmp/js/ReadmeTopQuick_js.ts +45 -19
  123. package/project/.sdk/src/cmp/js/ReadmeTopTest_js.ts +35 -3
  124. package/project/.sdk/src/cmp/js/fragment/EntityCreateOp.fragment.js +5 -0
  125. package/project/.sdk/src/cmp/js/fragment/EntityListOp.fragment.js +5 -0
  126. package/project/.sdk/src/cmp/js/fragment/EntityLoadOp.fragment.js +5 -0
  127. package/project/.sdk/src/cmp/js/fragment/EntityRemoveOp.fragment.js +5 -0
  128. package/project/.sdk/src/cmp/js/fragment/EntityUpdateOp.fragment.js +5 -0
  129. package/project/.sdk/src/cmp/js/utility_js.ts +57 -0
  130. package/project/.sdk/src/cmp/lua/Config_lua.ts +3 -2
  131. package/project/.sdk/src/cmp/lua/EntityTypes_lua.ts +113 -0
  132. package/project/.sdk/src/cmp/lua/MainEntity_lua.ts +8 -0
  133. package/project/.sdk/src/cmp/lua/Main_lua.ts +4 -0
  134. package/project/.sdk/src/cmp/lua/Package_lua.ts +23 -4
  135. package/project/.sdk/src/cmp/lua/ReadmeEntity_lua.ts +50 -13
  136. package/project/.sdk/src/cmp/lua/ReadmeExamplesTest_lua.ts +293 -0
  137. package/project/.sdk/src/cmp/lua/ReadmeHowto_lua.ts +46 -8
  138. package/project/.sdk/src/cmp/lua/ReadmeInstall_lua.ts +19 -3
  139. package/project/.sdk/src/cmp/lua/ReadmeIntro_lua.ts +38 -1
  140. package/project/.sdk/src/cmp/lua/ReadmeModel_lua.ts +51 -16
  141. package/project/.sdk/src/cmp/lua/ReadmeOptions_lua.ts +4 -3
  142. package/project/.sdk/src/cmp/lua/ReadmeQuick_lua.ts +156 -21
  143. package/project/.sdk/src/cmp/lua/ReadmeRef_lua.ts +71 -23
  144. package/project/.sdk/src/cmp/lua/ReadmeTopQuick_lua.ts +46 -9
  145. package/project/.sdk/src/cmp/lua/ReadmeTopTest_lua.ts +43 -5
  146. package/project/.sdk/src/cmp/lua/Test_lua.ts +4 -0
  147. package/project/.sdk/src/cmp/lua/fragment/EntityCreateOp.fragment.lua +4 -0
  148. package/project/.sdk/src/cmp/lua/fragment/EntityListOp.fragment.lua +4 -0
  149. package/project/.sdk/src/cmp/lua/fragment/EntityLoadOp.fragment.lua +4 -0
  150. package/project/.sdk/src/cmp/lua/fragment/EntityRemoveOp.fragment.lua +4 -0
  151. package/project/.sdk/src/cmp/lua/fragment/EntityUpdateOp.fragment.lua +4 -0
  152. package/project/.sdk/src/cmp/php/Config_php.ts +3 -2
  153. package/project/.sdk/src/cmp/php/EntityTypes_php.ts +142 -0
  154. package/project/.sdk/src/cmp/php/MainEntity_php.ts +18 -1
  155. package/project/.sdk/src/cmp/php/Main_php.ts +4 -0
  156. package/project/.sdk/src/cmp/php/Package_php.ts +18 -7
  157. package/project/.sdk/src/cmp/php/ReadmeEntity_php.ts +46 -14
  158. package/project/.sdk/src/cmp/php/ReadmeExamplesTest_php.ts +401 -0
  159. package/project/.sdk/src/cmp/php/ReadmeHowto_php.ts +56 -13
  160. package/project/.sdk/src/cmp/php/ReadmeInstall_php.ts +15 -3
  161. package/project/.sdk/src/cmp/php/ReadmeIntro_php.ts +40 -1
  162. package/project/.sdk/src/cmp/php/ReadmeModel_php.ts +26 -8
  163. package/project/.sdk/src/cmp/php/ReadmeOptions_php.ts +4 -3
  164. package/project/.sdk/src/cmp/php/ReadmeQuick_php.ts +159 -25
  165. package/project/.sdk/src/cmp/php/ReadmeRef_php.ts +90 -45
  166. package/project/.sdk/src/cmp/php/ReadmeTopHowto_php.ts +1 -1
  167. package/project/.sdk/src/cmp/php/ReadmeTopQuick_php.ts +43 -11
  168. package/project/.sdk/src/cmp/php/ReadmeTopTest_php.ts +52 -11
  169. package/project/.sdk/src/cmp/php/TestDirect_php.ts +9 -9
  170. package/project/.sdk/src/cmp/php/TestEntity_php.ts +6 -12
  171. package/project/.sdk/src/cmp/php/Test_php.ts +4 -0
  172. package/project/.sdk/src/cmp/php/fragment/Entity.fragment.php +13 -1
  173. package/project/.sdk/src/cmp/php/fragment/EntityCreateOp.fragment.php +10 -1
  174. package/project/.sdk/src/cmp/php/fragment/EntityListOp.fragment.php +10 -1
  175. package/project/.sdk/src/cmp/php/fragment/EntityLoadOp.fragment.php +10 -1
  176. package/project/.sdk/src/cmp/php/fragment/EntityRemoveOp.fragment.php +10 -1
  177. package/project/.sdk/src/cmp/php/fragment/EntityUpdateOp.fragment.php +10 -1
  178. package/project/.sdk/src/cmp/php/fragment/Main.fragment.php +22 -14
  179. package/project/.sdk/src/cmp/py/Config_py.ts +3 -2
  180. package/project/.sdk/src/cmp/py/EntityTypes_py.ts +184 -0
  181. package/project/.sdk/src/cmp/py/Entity_py.ts +27 -0
  182. package/project/.sdk/src/cmp/py/MainEntity_py.ts +2 -1
  183. package/project/.sdk/src/cmp/py/Main_py.ts +35 -0
  184. package/project/.sdk/src/cmp/py/Package_py.ts +24 -3
  185. package/project/.sdk/src/cmp/py/ReadmeEntity_py.ts +48 -14
  186. package/project/.sdk/src/cmp/py/ReadmeExamplesTest_py.ts +626 -0
  187. package/project/.sdk/src/cmp/py/ReadmeHowto_py.ts +53 -14
  188. package/project/.sdk/src/cmp/py/ReadmeInstall_py.ts +19 -3
  189. package/project/.sdk/src/cmp/py/ReadmeIntro_py.ts +48 -1
  190. package/project/.sdk/src/cmp/py/ReadmeModel_py.ts +28 -10
  191. package/project/.sdk/src/cmp/py/ReadmeOptions_py.ts +4 -3
  192. package/project/.sdk/src/cmp/py/ReadmeQuick_py.ts +150 -27
  193. package/project/.sdk/src/cmp/py/ReadmeRef_py.ts +86 -40
  194. package/project/.sdk/src/cmp/py/ReadmeTopHowto_py.ts +1 -1
  195. package/project/.sdk/src/cmp/py/ReadmeTopQuick_py.ts +45 -11
  196. package/project/.sdk/src/cmp/py/ReadmeTopTest_py.ts +43 -5
  197. package/project/.sdk/src/cmp/py/TestDirect_py.ts +7 -9
  198. package/project/.sdk/src/cmp/py/TestEntity_py.ts +6 -14
  199. package/project/.sdk/src/cmp/py/Test_py.ts +4 -0
  200. package/project/.sdk/src/cmp/py/fragment/Entity.fragment.py +5 -2
  201. package/project/.sdk/src/cmp/py/fragment/EntityCreateOp.fragment.py +1 -1
  202. package/project/.sdk/src/cmp/py/fragment/EntityListOp.fragment.py +5 -1
  203. package/project/.sdk/src/cmp/py/fragment/EntityLoadOp.fragment.py +6 -1
  204. package/project/.sdk/src/cmp/py/fragment/EntityRemoveOp.fragment.py +6 -1
  205. package/project/.sdk/src/cmp/py/fragment/EntityUpdateOp.fragment.py +1 -1
  206. package/project/.sdk/src/cmp/py/fragment/Main.fragment.py +17 -10
  207. package/project/.sdk/src/cmp/rb/Config_rb.ts +3 -2
  208. package/project/.sdk/src/cmp/rb/EntityTypes_rb.ts +136 -0
  209. package/project/.sdk/src/cmp/rb/MainEntity_rb.ts +1 -0
  210. package/project/.sdk/src/cmp/rb/Main_rb.ts +4 -0
  211. package/project/.sdk/src/cmp/rb/Package_rb.ts +34 -7
  212. package/project/.sdk/src/cmp/rb/ReadmeEntity_rb.ts +47 -13
  213. package/project/.sdk/src/cmp/rb/ReadmeExamplesTest_rb.ts +289 -0
  214. package/project/.sdk/src/cmp/rb/ReadmeHowto_rb.ts +72 -21
  215. package/project/.sdk/src/cmp/rb/ReadmeInstall_rb.ts +16 -4
  216. package/project/.sdk/src/cmp/rb/ReadmeIntro_rb.ts +40 -1
  217. package/project/.sdk/src/cmp/rb/ReadmeModel_rb.ts +29 -12
  218. package/project/.sdk/src/cmp/rb/ReadmeOptions_rb.ts +4 -3
  219. package/project/.sdk/src/cmp/rb/ReadmeQuick_rb.ts +163 -25
  220. package/project/.sdk/src/cmp/rb/ReadmeRef_rb.ts +85 -40
  221. package/project/.sdk/src/cmp/rb/ReadmeTopHowto_rb.ts +1 -1
  222. package/project/.sdk/src/cmp/rb/ReadmeTopQuick_rb.ts +45 -11
  223. package/project/.sdk/src/cmp/rb/ReadmeTopTest_rb.ts +54 -11
  224. package/project/.sdk/src/cmp/rb/TestDirect_rb.ts +9 -9
  225. package/project/.sdk/src/cmp/rb/TestEntity_rb.ts +6 -12
  226. package/project/.sdk/src/cmp/rb/Test_rb.ts +4 -0
  227. package/project/.sdk/src/cmp/rb/fragment/Entity.fragment.rb +2 -0
  228. package/project/.sdk/src/cmp/rb/fragment/EntityCreateOp.fragment.rb +5 -0
  229. package/project/.sdk/src/cmp/rb/fragment/EntityListOp.fragment.rb +20 -2
  230. package/project/.sdk/src/cmp/rb/fragment/EntityLoadOp.fragment.rb +8 -1
  231. package/project/.sdk/src/cmp/rb/fragment/EntityRemoveOp.fragment.rb +6 -1
  232. package/project/.sdk/src/cmp/rb/fragment/EntityUpdateOp.fragment.rb +5 -0
  233. package/project/.sdk/src/cmp/rb/fragment/Main.fragment.rb +24 -8
  234. package/project/.sdk/src/cmp/ts/Config_ts.ts +3 -6
  235. package/project/.sdk/src/cmp/ts/EntityTypes_ts.ts +105 -0
  236. package/project/.sdk/src/cmp/ts/Entity_ts.ts +17 -1
  237. package/project/.sdk/src/cmp/ts/MainEntity_ts.ts +1 -0
  238. package/project/.sdk/src/cmp/ts/Main_ts.ts +6 -0
  239. package/project/.sdk/src/cmp/ts/Package_ts.ts +14 -7
  240. package/project/.sdk/src/cmp/ts/ReadmeEntity_ts.ts +32 -10
  241. package/project/.sdk/src/cmp/ts/ReadmeExampleTest_ts.ts +81 -0
  242. package/project/.sdk/src/cmp/ts/ReadmeExamplesTest_ts.ts +446 -0
  243. package/project/.sdk/src/cmp/ts/ReadmeExplanation_ts.ts +2 -2
  244. package/project/.sdk/src/cmp/ts/ReadmeHowto_ts.ts +57 -11
  245. package/project/.sdk/src/cmp/ts/ReadmeInstall_ts.ts +19 -6
  246. package/project/.sdk/src/cmp/ts/ReadmeIntro_ts.ts +39 -1
  247. package/project/.sdk/src/cmp/ts/ReadmeModel_ts.ts +50 -18
  248. package/project/.sdk/src/cmp/ts/ReadmeOptions_ts.ts +4 -3
  249. package/project/.sdk/src/cmp/ts/ReadmeQuick_ts.ts +141 -48
  250. package/project/.sdk/src/cmp/ts/ReadmeRef_ts.ts +50 -16
  251. package/project/.sdk/src/cmp/ts/ReadmeTopHowto_ts.ts +3 -0
  252. package/project/.sdk/src/cmp/ts/ReadmeTopQuick_ts.ts +58 -19
  253. package/project/.sdk/src/cmp/ts/ReadmeTopTest_ts.ts +35 -3
  254. package/project/.sdk/src/cmp/ts/TestEntity_ts.ts +2 -2
  255. package/project/.sdk/src/cmp/ts/Test_ts.ts +5 -0
  256. package/project/.sdk/src/cmp/ts/fragment/Entity.fragment.ts +3 -1
  257. package/project/.sdk/src/cmp/ts/fragment/EntityBase.fragment.ts +10 -5
  258. package/project/.sdk/src/cmp/ts/fragment/EntityCreateOp.fragment.ts +4 -2
  259. package/project/.sdk/src/cmp/ts/fragment/EntityListOp.fragment.ts +4 -2
  260. package/project/.sdk/src/cmp/ts/fragment/EntityLoadOp.fragment.ts +4 -2
  261. package/project/.sdk/src/cmp/ts/fragment/EntityRemoveOp.fragment.ts +4 -2
  262. package/project/.sdk/src/cmp/ts/fragment/EntityUpdateOp.fragment.ts +4 -2
  263. package/project/.sdk/src/cmp/ts/utility_ts.ts +59 -0
  264. package/project/.sdk/tm/go/LICENSE +1 -1
  265. package/project/.sdk/tm/go/Makefile +36 -1
  266. package/project/.sdk/tm/go/VERSION +1 -0
  267. package/project/.sdk/tm/go/core/context.go +12 -7
  268. package/project/.sdk/tm/go-cli/src/feature/README.md +6 -0
  269. package/project/.sdk/tm/go-cli/src/feature/base/.gitkeep +0 -0
  270. package/project/.sdk/tm/go-cli/src/feature/log/.gitkeep +0 -0
  271. package/project/.sdk/tm/go-cli/src/feature/test/.gitkeep +0 -0
  272. package/project/.sdk/tm/go-mcp/src/feature/README.md +6 -0
  273. package/project/.sdk/tm/go-mcp/src/feature/base/.gitkeep +0 -0
  274. package/project/.sdk/tm/go-mcp/src/feature/log/.gitkeep +0 -0
  275. package/project/.sdk/tm/go-mcp/src/feature/test/.gitkeep +0 -0
  276. package/project/.sdk/tm/js/LICENSE +1 -1
  277. package/project/.sdk/tm/js/Makefile +41 -0
  278. package/project/.sdk/tm/lua/LICENSE +1 -1
  279. package/project/.sdk/tm/lua/Makefile +40 -1
  280. package/project/.sdk/tm/lua/core/context.lua +13 -8
  281. package/project/.sdk/tm/php/LICENSE +1 -1
  282. package/project/.sdk/tm/php/Makefile +31 -1
  283. package/project/.sdk/tm/php/VERSION +1 -0
  284. package/project/.sdk/tm/php/core/Context.php +12 -6
  285. package/project/.sdk/tm/php/test/PrimaryUtilityTest.php +13 -4
  286. package/project/.sdk/tm/php/utility/Done.php +2 -2
  287. package/project/.sdk/tm/php/utility/MakeError.php +3 -3
  288. package/project/.sdk/tm/py/LICENSE +1 -1
  289. package/project/.sdk/tm/py/Makefile +34 -1
  290. package/project/.sdk/tm/py/core/context.py +12 -7
  291. package/project/.sdk/tm/py/test/test_primary_utility.py +15 -4
  292. package/project/.sdk/tm/py/test/test_struct_utility.py +1 -1
  293. package/project/.sdk/tm/py/utility/done.py +3 -1
  294. package/project/.sdk/tm/py/utility/make_error.py +2 -2
  295. package/project/.sdk/tm/rb/LICENSE +1 -1
  296. package/project/.sdk/tm/rb/Makefile +36 -2
  297. package/project/.sdk/tm/rb/core/context.rb +8 -3
  298. package/project/.sdk/tm/rb/test/primary_utility_test.rb +2 -2
  299. package/project/.sdk/tm/rb/utility/done.rb +3 -1
  300. package/project/.sdk/tm/rb/utility/make_error.rb +5 -2
  301. package/project/.sdk/tm/ts/LICENSE +1 -1
  302. package/project/.sdk/tm/ts/Makefile +42 -0
  303. package/project/.sdk/tm/ts/src/Context.ts +8 -3
  304. package/src/action/action.ts +30 -11
  305. package/src/action/feature.ts +12 -14
  306. package/src/action/target.ts +28 -17
  307. package/src/cmp/Changelog.ts +34 -0
  308. package/src/cmp/Deploy.ts +258 -0
  309. package/src/cmp/FeatureHook.ts +6 -8
  310. package/src/cmp/License.ts +49 -0
  311. package/src/cmp/Readme.ts +2 -0
  312. package/src/cmp/ReadmeErrors.ts +257 -0
  313. package/src/cmp/ReadmeExplanation.ts +250 -230
  314. package/src/cmp/ReadmeModel.ts +7 -2
  315. package/src/cmp/ReadmeTop.ts +411 -95
  316. package/src/cmp/Security.ts +41 -0
  317. package/src/helpers/canonType.ts +89 -0
  318. package/src/helpers/collectDeps.ts +5 -3
  319. package/src/helpers/naming.ts +59 -0
  320. package/src/helpers/opExample.ts +170 -0
  321. package/src/helpers/opShape.ts +274 -0
  322. package/src/helpers/packageMeta.ts +236 -0
  323. package/src/sdkgen.ts +91 -23
  324. package/src/tsconfig.json +1 -0
  325. package/src/types.ts +85 -2
  326. package/src/utility.ts +45 -11
  327. package/README.md +0 -2
  328. package/dist/action/lang.d.ts +0 -2
  329. package/dist/action/lang.js +0 -68
  330. package/dist/action/lang.js.map +0 -1
  331. package/dist/cmp/Hook.d.ts +0 -2
  332. package/dist/cmp/Hook.js +0 -10
  333. package/dist/cmp/Hook.js.map +0 -1
  334. package/dist/cmp/Top.d.ts +0 -2
  335. package/dist/cmp/Top.js +0 -23
  336. package/dist/cmp/Top.js.map +0 -1
  337. package/dist/prepare-openapi.d.ts +0 -2
  338. package/dist/prepare-openapi.js +0 -37
  339. package/dist/prepare-openapi.js.map +0 -1
  340. package/model/sdkgen.jsonic +0 -74
  341. package/project/.sdk/model/feature/feature-index.jsonic +0 -5
  342. package/project/.sdk/model/target/go.jsonic +0 -22
  343. package/project/.sdk/tm/go/utility/struct/go.mod +0 -3
  344. /package/project/.sdk/model/feature/{log.jsonic → log.aontu} +0 -0
  345. /package/project/.sdk/model/feature/{test.jsonic → test.aontu} +0 -0
@@ -8,322 +8,342 @@ import {
8
8
 
9
9
  import { requirePath } from '../utility'
10
10
 
11
+ import { entityIdField, entityPrimaryOp } from '../helpers/opShape'
12
+ import { idLiteral, matchArg, dataArg } from '../helpers/opExample'
13
+ import type { ExampleLang } from '../helpers/opExample'
14
+ import { safeVarName } from '../helpers/naming'
11
15
 
12
- const ReadmeExplanation = cmp(function ReadmeExplanation(props: any) {
13
- const { target, ctx$ } = props
14
- const { model } = ctx$
15
-
16
- const feature = getModelPath(model, `main.${KIT}.feature`)
17
16
 
18
- Content(`
19
- ## Explanation
17
+ function cap(s: string): string {
18
+ return s.charAt(0).toUpperCase() + s.slice(1)
19
+ }
20
20
 
21
- ### The operation pipeline
22
21
 
23
- Every entity operation (load, list, create, update, remove) follows a
24
- six-stage pipeline. Each stage fires a feature hook before executing:
22
+ // The four sections below differ by target language but share an identical
23
+ // structure, so the per-language prose lives in one table rather than in
24
+ // parallel if/else chains. Targets not listed here (ts, js, ...) use
25
+ // DEFAULT_LANG.
26
+ type LangExplain = {
27
+ featureKind: string // what a "feature" is in this language
28
+ // stateful-entity explanation + example, driven by the entity's PRIMARY op
29
+ // (`op`) — never a hardcoded `load` a create-only entity lacks. `arg` is the
30
+ // pre-rendered, language-correct call argument; `matchIdF` is the id key when
31
+ // the op is a match op (so the `.match()` comment shows `{ id: ... }`), else
32
+ // null (a generic comment).
33
+ entityState: (
34
+ eName: string, eLower: string,
35
+ op: string, arg: string,
36
+ matchIdF: string | null, idLit: string,
37
+ ) => string
38
+ direct: string // direct/prepare explanation
39
+ }
25
40
 
26
- \`\`\`
27
- PrePoint \u2192 PreSpec \u2192 PreRequest \u2192 PreResponse \u2192 PreResult \u2192 PreDone
28
- \`\`\`
29
41
 
30
- - **PrePoint**: Resolves which API endpoint to call based on the
31
- operation name and entity configuration.
32
- - **PreSpec**: Builds the HTTP spec \u2014 URL, method, headers, body \u2014
33
- from the resolved point and the caller's parameters.
34
- - **PreRequest**: Sends the HTTP request. Features can intercept here
35
- to replace the transport (as TestFeature does with mocks).
36
- - **PreResponse**: Parses the raw HTTP response.
37
- - **PreResult**: Extracts the business data from the parsed response.
38
- - **PreDone**: Final stage before returning to the caller. Entity
39
- state (match, data) is updated here.
42
+ const DEFAULT_LANG: LangExplain = {
43
+ featureKind: `Features are the extension mechanism. A feature is an object with a
44
+ \`hooks\` map. Each hook key is a pipeline stage name, and the value is
45
+ a function that receives the context.
40
46
 
41
- `)
47
+ `,
48
+ entityState: (eName, eLower, op, arg, matchIdF, idLit) => `Entity instances are stateful. After a successful \`${op}\`, the entity
49
+ stores the returned data and match criteria internally. Subsequent
50
+ calls on the same instance can rely on this state.
42
51
 
43
- // Target-specific error description
44
- if (target.name === 'py') {
45
- Content(`If any stage returns an error, the pipeline short-circuits and the
46
- error is returned to the caller as the second element in the return tuple.
52
+ \`\`\`ts
53
+ const ${eLower} = client.${eName}()
54
+ await ${eLower}.${op}(${arg})
47
55
 
48
- `)
49
- }
50
- else if (target.name === 'php') {
51
- Content(`If any stage returns an error, the pipeline short-circuits and the
52
- error is returned to the caller as the second element in the return array.
56
+ // ${eLower}.data() now returns the ${eLower} data from the last \`${op}\`
57
+ ${matchIdF ? `// ${eLower}.match() returns { ${matchIdF}: ${idLit} }` : `// ${eLower}.match() returns the last match criteria`}
58
+ \`\`\`
53
59
 
54
- `)
55
- }
56
- else if (target.name === 'rb') {
57
- Content(`If any stage returns an error, the pipeline short-circuits and the
58
- error is returned to the caller as a second return value.
60
+ Call \`make()\` to create a fresh instance with the same configuration
61
+ but no stored state.
59
62
 
60
- `)
61
- }
62
- else if (target.name === 'lua') {
63
- Content(`If any stage returns an error, the pipeline short-circuits and the
64
- error is returned to the caller as a second return value.
63
+ `,
64
+ direct: `The \`direct\` method gives full control over the HTTP request. Use it
65
+ for non-standard endpoints, bulk operations, or any path not modelled
66
+ as an entity. The \`prepare\` method is useful for debugging — it
67
+ shows exactly what \`direct\` would send.
65
68
 
66
- `)
67
- }
68
- else if (target.name === 'go') {
69
- Content(`If any stage returns an error, the pipeline short-circuits and the
70
- error is returned to the caller. An unexpected panic triggers the
71
- \`PreUnexpected\` hook.
69
+ `,
70
+ }
72
71
 
73
- `)
74
- }
75
- else {
76
- Content(`If any stage returns an error, the pipeline short-circuits and the
77
- error is returned to the caller.
78
72
 
79
- An unexpected exception triggers the \`PreUnexpected\` hook before
80
- propagating.
73
+ const LANGS: Record<string, LangExplain> = {
74
+ py: {
75
+ featureKind: `Features are the extension mechanism. A feature is a Python class
76
+ with hook methods named after pipeline stages (e.g. \`PrePoint\`,
77
+ \`PreSpec\`). Each method receives the context.
81
78
 
82
- `)
83
- }
79
+ `,
80
+ entityState: (eName, eLower, op, arg) => `Entity instances are stateful. After a successful \`${op}\`, the entity
81
+ stores the returned data and match criteria internally.
84
82
 
83
+ \`\`\`python
84
+ ${eLower} = client.${eName}()
85
+ ${eLower}.${op}(${arg})
85
86
 
86
- // Features and hooks
87
- Content(`### Features and hooks
87
+ # ${eLower}.data_get() now returns the ${eLower} data from the last ${op}
88
+ # ${eLower}.match_get() returns the last match criteria
89
+ \`\`\`
88
90
 
89
- `)
91
+ Call \`make()\` to create a fresh instance with the same configuration
92
+ but no stored state.
90
93
 
91
- if (target.name === 'py') {
92
- Content(`Features are the extension mechanism. A feature is a Python class
93
- with hook methods named after pipeline stages (e.g. \`PrePoint\`,
94
- \`PreSpec\`). Each method receives the context.
94
+ `,
95
+ direct: `\`direct()\` gives full control over the HTTP request. Use it for
96
+ non-standard endpoints, bulk operations, or any path not modelled as
97
+ an entity. \`prepare()\` builds the request without sending it — useful
98
+ for debugging or custom transport.
95
99
 
96
- `)
97
- }
98
- else if (target.name === 'php') {
99
- Content(`Features are the extension mechanism. A feature is a PHP class
100
- with hook methods named after pipeline stages (e.g. \`PrePoint\`,
101
- \`PreSpec\`). Each method receives the context.
100
+ `,
101
+ },
102
102
 
103
- `)
104
- }
105
- else if (target.name === 'rb') {
106
- Content(`Features are the extension mechanism. A feature is a Ruby class
103
+ php: {
104
+ featureKind: `Features are the extension mechanism. A feature is a PHP class
107
105
  with hook methods named after pipeline stages (e.g. \`PrePoint\`,
108
106
  \`PreSpec\`). Each method receives the context.
109
107
 
110
- `)
111
- }
112
- else if (target.name === 'lua') {
113
- Content(`Features are the extension mechanism. A feature is a Lua table
114
- with hook methods named after pipeline stages (e.g. \`PrePoint\`,
115
- \`PreSpec\`). Each method receives the context.
108
+ `,
109
+ entityState: (eName, eLower, op, arg) => `Entity instances are stateful. After a successful \`${op}\`, the entity
110
+ stores the returned data and match criteria internally.
116
111
 
117
- `)
118
- }
119
- else if (target.name === 'go') {
120
- Content(`Features are the extension mechanism. A feature implements the
121
- \`Feature\` interface and provides hooks \u2014 functions keyed by pipeline
122
- stage names.
112
+ \`\`\`php
113
+ $${eLower} = $client->${eName}();
114
+ $${eLower}->${op}(${arg});
123
115
 
124
- `)
125
- }
126
- else {
127
- Content(`Features are the extension mechanism. A feature is an object with a
128
- \`hooks\` map. Each hook key is a pipeline stage name, and the value is
129
- a function that receives the context.
116
+ // $${eLower}->data_get() now returns the ${eLower} data from the last ${op}
117
+ // $${eLower}->match_get() returns the last match criteria
118
+ \`\`\`
130
119
 
131
- `)
132
- }
120
+ Call \`make()\` to create a fresh instance with the same configuration
121
+ but no stored state.
133
122
 
134
- Content(`The SDK ships with built-in features:
123
+ `,
124
+ direct: `\`direct()\` gives full control over the HTTP request. Use it for
125
+ non-standard endpoints, bulk operations, or any path not modelled as
126
+ an entity. \`prepare()\` builds the request without sending it — useful
127
+ for debugging or custom transport.
135
128
 
136
- `)
137
- each(feature, (feat: any) => {
138
- if (!feat.active) return
139
- if (!feat.Name) names(feat, feat.name)
140
- const purpose = feat.title || feat.Name || feat.name
141
- Content(`- **${feat.Name}Feature**: ${purpose}
142
- `)
143
- })
129
+ `,
130
+ },
144
131
 
145
- Content(`
146
- Features are initialized in order. Hooks fire in the order features
147
- were added, so later features can override earlier ones.
132
+ rb: {
133
+ featureKind: `Features are the extension mechanism. A feature is a Ruby class
134
+ with hook methods named after pipeline stages (e.g. \`PrePoint\`,
135
+ \`PreSpec\`). Each method receives the context.
148
136
 
149
- `)
137
+ `,
138
+ entityState: (eName, eLower, op, arg) => `Entity instances are stateful. After a successful \`${op}\`, the entity
139
+ stores the returned data and match criteria internally.
150
140
 
141
+ \`\`\`ruby
142
+ ${eLower} = client.${eName}
143
+ ${eLower}.${op}(${arg})
151
144
 
152
- // Target-specific explanation
153
- const ReadmeExplanation_sdk =
154
- requirePath(ctx$, `./cmp/${target.name}/ReadmeExplanation_${target.name}`, { ignore: true })
145
+ # ${eLower}.data_get now returns the ${eLower} data from the last ${op}
146
+ # ${eLower}.match_get returns the last match criteria
147
+ \`\`\`
155
148
 
156
- if (ReadmeExplanation_sdk) {
157
- ReadmeExplanation_sdk['ReadmeExplanation']({ target })
158
- }
149
+ Call \`make\` to create a fresh instance with the same configuration
150
+ but no stored state.
159
151
 
152
+ `,
153
+ direct: `\`direct\` gives full control over the HTTP request. Use it for
154
+ non-standard endpoints, bulk operations, or any path not modelled as
155
+ an entity. \`prepare\` builds the request without sending it — useful
156
+ for debugging or custom transport.
160
157
 
161
- // Entity state
162
- Content(`### Entity state
158
+ `,
159
+ },
163
160
 
164
- `)
161
+ lua: {
162
+ featureKind: `Features are the extension mechanism. A feature is a Lua table
163
+ with hook methods named after pipeline stages (e.g. \`PrePoint\`,
164
+ \`PreSpec\`). Each method receives the context.
165
165
 
166
- if (target.name === 'py') {
167
- Content(`Entity instances are stateful. After a successful \`load\`, the entity
166
+ `,
167
+ entityState: (eName, eLower, op, arg) => `Entity instances are stateful. After a successful \`${op}\`, the entity
168
168
  stores the returned data and match criteria internally.
169
169
 
170
- \`\`\`python
171
- moon = client.Moon()
172
- moon.load({"planet_id": "earth", "id": "luna"})
170
+ \`\`\`lua
171
+ local ${eLower} = client:${eName}()
172
+ ${eLower}:${op}(${arg})
173
173
 
174
- # moon.data_get() now returns the loaded moon data
175
- # moon.match_get() returns the last match criteria
174
+ -- ${eLower}:data_get() now returns the ${eLower} data from the last ${op}
175
+ -- ${eLower}:match_get() returns the last match criteria
176
176
  \`\`\`
177
177
 
178
178
  Call \`make()\` to create a fresh instance with the same configuration
179
179
  but no stored state.
180
180
 
181
- `)
182
- }
183
- else if (target.name === 'php') {
184
- Content(`Entity instances are stateful. After a successful \`load\`, the entity
185
- stores the returned data and match criteria internally.
181
+ `,
182
+ direct: `\`direct()\` gives full control over the HTTP request. Use it for
183
+ non-standard endpoints, bulk operations, or any path not modelled as
184
+ an entity. \`prepare()\` builds the request without sending it useful
185
+ for debugging or custom transport.
186
186
 
187
- \`\`\`php
188
- $moon = $client->Moon();
189
- [$result, $err] = $moon->load(["planet_id" => "earth", "id" => "luna"]);
187
+ `,
188
+ },
190
189
 
191
- // $moon->dataGet() now returns the loaded moon data
192
- // $moon->matchGet() returns the last match criteria
193
- \`\`\`
194
-
195
- Call \`make()\` to create a fresh instance with the same configuration
196
- but no stored state.
190
+ go: {
191
+ featureKind: `Features are the extension mechanism. A feature implements the
192
+ \`Feature\` interface and provides hooks — functions keyed by pipeline
193
+ stage names.
197
194
 
198
- `)
199
- }
200
- else if (target.name === 'rb') {
201
- Content(`Entity instances are stateful. After a successful \`load\`, the entity
195
+ `,
196
+ entityState: (eName, eLower, op, arg) => `Entity instances are stateful. After a successful \`${cap(op)}\`, the entity
202
197
  stores the returned data and match criteria internally.
203
198
 
204
- \`\`\`ruby
205
- moon = client.Moon
206
- moon.load({ "planet_id" => "earth", "id" => "luna" })
199
+ \`\`\`go
200
+ ${eLower} := client.${eName}(nil)
201
+ ${eLower}.${cap(op)}(${arg}, nil)
207
202
 
208
- # moon.data_get now returns the loaded moon data
209
- # moon.match_get returns the last match criteria
203
+ // ${eLower}.Data() now returns the ${eLower} data from the last ${op}
204
+ // ${eLower}.Match() returns the last match criteria
210
205
  \`\`\`
211
206
 
212
- Call \`make\` to create a fresh instance with the same configuration
207
+ Call \`Make()\` to create a fresh instance with the same configuration
213
208
  but no stored state.
214
209
 
215
- `)
216
- }
217
- else if (target.name === 'lua') {
218
- Content(`Entity instances are stateful. After a successful \`load\`, the entity
219
- stores the returned data and match criteria internally.
210
+ `,
211
+ direct: `\`Direct()\` gives full control over the HTTP request. Use it for
212
+ non-standard endpoints, bulk operations, or any path not modelled as
213
+ an entity. \`Prepare()\` builds the request without sending it useful
214
+ for debugging or custom transport.
220
215
 
221
- \`\`\`lua
222
- local moon = client:Moon(nil)
223
- moon:load({ planet_id = "earth", id = "luna" }, nil)
216
+ `,
217
+ },
218
+ }
224
219
 
225
- -- moon:data_get() now returns the loaded moon data
226
- -- moon:match_get() returns the last match criteria
227
- \`\`\`
228
220
 
229
- Call \`make()\` to create a fresh instance with the same configuration
230
- but no stored state.
221
+ const ReadmeExplanation = cmp(function ReadmeExplanation(props: any) {
222
+ const { target, ctx$ } = props
223
+ const { model } = ctx$
231
224
 
232
- `)
225
+ const feature = getModelPath(model, `main.${KIT}.feature`)
226
+ const lang = LANGS[target.name] || DEFAULT_LANG
227
+
228
+ // Derive a real example entity from the model (the same way the sibling
229
+ // Readme components do) so the entity-state example never references a
230
+ // phantom entity.
231
+ const entity = getModelPath(model, `main.${KIT}.entity`, { only_active: false, required: false })
232
+ const ex = Object.values(entity || {}).find((e: any) => e && e.active !== false) as any
233
+ const eName = ex ? (ex.Name || (ex.name[0].toUpperCase() + ex.name.slice(1))) : 'Entity'
234
+ // Sanitise against the target's reserved words (a `Delete` entity must not
235
+ // bind `const delete = ...`).
236
+ const eLower = safeVarName(eName.toLowerCase(), target.name)
237
+ const lname = target.name as ExampleLang
238
+ // The entity's id-like key field name, or null when it has none (a
239
+ // response-wrapped spec can model an entity with no id). Drives whether the
240
+ // state example keys on an id at all.
241
+ const idF = entityIdField(ex)
242
+ // The entity's PRIMARY op — an op it actually exposes (never a hardcoded
243
+ // `load` a create-only entity lacks).
244
+ const primaryOp = entityPrimaryOp(ex) || 'load'
245
+ const isMatchOp = 'load' === primaryOp || 'remove' === primaryOp
246
+ // Type-correct example id literal (numeric when the id param is integer-typed),
247
+ // derived from the OP's param type so an id carried only in the match compiles.
248
+ const idLit = idLiteral(ex, primaryOp, idF)
249
+ // Language-correct call argument for the primary op: a match for load/remove,
250
+ // a required-field body for create/update, nothing for list.
251
+ let stateArg: string
252
+ if ('list' === primaryOp) {
253
+ stateArg = 'go' === target.name ? 'nil' : ''
254
+ } else if (isMatchOp) {
255
+ stateArg = matchArg(lname, idF, idLit)
256
+ } else {
257
+ stateArg = dataArg(lname, ex, primaryOp, idF)
233
258
  }
234
- else if (target.name === 'go') {
235
- Content(`Entity instances are stateful. After a successful \`Load\`, the entity
236
- stores the returned data and match criteria internally.
259
+ // Only a match op keys the `.match()` comment on `{ id: ... }`.
260
+ const matchIdF = isMatchOp ? idF : null
237
261
 
238
- \`\`\`go
239
- moon := client.Moon(nil)
240
- moon.Load(map[string]any{"planet_id": "earth", "id": "luna"}, nil)
262
+ Content(`
263
+ ## Advanced
241
264
 
242
- // moon.Data() now returns the loaded moon data
243
- // moon.Match() returns the last match criteria
244
- \`\`\`
265
+ > The sections above cover everyday use. The material below explains the
266
+ > SDK's internals useful when extending it with custom features, but not
267
+ > needed for normal use.
245
268
 
246
- Call \`Make()\` to create a fresh instance with the same configuration
247
- but no stored state.
269
+ ### The operation pipeline
248
270
 
249
- `)
250
- }
251
- else {
252
- Content(`Entity instances are stateful. After a successful \`load\`, the entity
253
- stores the returned data and match criteria internally. Subsequent
254
- calls on the same instance can rely on this state.
271
+ Every entity operation follows a six-stage pipeline. Each stage fires a
272
+ feature hook before executing:
255
273
 
256
- \`\`\`ts
257
- const moon = client.Moon()
258
- await moon.load({ planet_id: 'earth', id: 'luna' })
259
-
260
- // moon.data() now returns the loaded moon data
261
- // moon.match() returns { planet_id: 'earth', id: 'luna' }
274
+ \`\`\`
275
+ PrePoint PreSpec → PreRequest → PreResponse → PreResult → PreDone
262
276
  \`\`\`
263
277
 
264
- Call \`make()\` to create a fresh instance with the same configuration
265
- but no stored state.
278
+ - **PrePoint**: Resolves which API endpoint to call based on the
279
+ operation name and entity configuration.
280
+ - **PreSpec**: Builds the HTTP spec — URL, method, headers, body —
281
+ from the resolved point and the caller's parameters.
282
+ - **PreRequest**: Sends the HTTP request. Features can intercept here
283
+ to replace the transport (as TestFeature does with mocks).
284
+ - **PreResponse**: Parses the raw HTTP response.
285
+ - **PreResult**: Extracts the business data from the parsed response.
286
+ - **PreDone**: Final stage before returning to the caller. Entity
287
+ state (match, data) is updated here.
266
288
 
267
- `)
268
- }
289
+ If any stage errors, the pipeline short-circuits and the error surfaces
290
+ to the caller — see [Error handling](#error-handling) for how that looks
291
+ in this language.
269
292
 
293
+ `)
270
294
 
271
- // Direct vs entity access
272
- Content(`### Direct vs entity access
273
295
 
274
- The entity interface handles URL construction, parameter placement,
275
- and response parsing automatically. Use it for standard CRUD operations.
296
+ // Features and hooks
297
+ Content(`### Features and hooks
276
298
 
277
299
  `)
278
300
 
279
- if (target.name === 'py') {
280
- Content(`\`direct()\` gives full control over the HTTP request. Use it for
281
- non-standard endpoints, bulk operations, or any path not modelled as
282
- an entity. \`prepare()\` builds the request without sending it \u2014 useful
283
- for debugging or custom transport.
301
+ Content(lang.featureKind)
284
302
 
285
- `)
286
- }
287
- else if (target.name === 'php') {
288
- Content(`\`direct()\` gives full control over the HTTP request. Use it for
289
- non-standard endpoints, bulk operations, or any path not modelled as
290
- an entity. \`prepare()\` builds the request without sending it \u2014 useful
291
- for debugging or custom transport.
303
+ Content(`The SDK ships with built-in features:
292
304
 
293
305
  `)
294
- }
295
- else if (target.name === 'rb') {
296
- Content(`\`direct\` gives full control over the HTTP request. Use it for
297
- non-standard endpoints, bulk operations, or any path not modelled as
298
- an entity. \`prepare\` builds the request without sending it \u2014 useful
299
- for debugging or custom transport.
300
-
306
+ each(feature, (feat: any) => {
307
+ if (!feat.active) return
308
+ if (!feat.Name) names(feat, feat.name)
309
+ const purpose = feat.title || feat.Name || feat.name
310
+ Content(`- **${feat.Name}Feature**: ${purpose}
301
311
  `)
302
- }
303
- else if (target.name === 'lua') {
304
- Content(`\`direct()\` gives full control over the HTTP request. Use it for
305
- non-standard endpoints, bulk operations, or any path not modelled as
306
- an entity. \`prepare()\` builds the request without sending it \u2014 useful
307
- for debugging or custom transport.
312
+ })
313
+
314
+ Content(`
315
+ Features are initialized in order. Hooks fire in the order features
316
+ were added, so later features can override earlier ones.
308
317
 
309
318
  `)
319
+
320
+
321
+ // Target-specific explanation
322
+ const ReadmeExplanation_sdk =
323
+ requirePath(ctx$, `./cmp/${target.name}/ReadmeExplanation_${target.name}`, { ignore: true })
324
+
325
+ if (ReadmeExplanation_sdk) {
326
+ ReadmeExplanation_sdk['ReadmeExplanation']({ target })
310
327
  }
311
- else if (target.name === 'go') {
312
- Content(`\`Direct()\` gives full control over the HTTP request. Use it for
313
- non-standard endpoints, bulk operations, or any path not modelled as
314
- an entity. \`Prepare()\` builds the request without sending it \u2014 useful
315
- for debugging or custom transport.
328
+
329
+
330
+ // Entity state
331
+ Content(`### Entity state
316
332
 
317
333
  `)
318
- }
319
- else {
320
- Content(`The \`direct\` method gives full control over the HTTP request. Use it
321
- for non-standard endpoints, bulk operations, or any path not modelled
322
- as an entity. The \`prepare\` method is useful for debugging \u2014 it
323
- shows exactly what \`direct\` would send.
334
+
335
+ Content(lang.entityState(eName, eLower, primaryOp, stateArg, matchIdF, idLit))
336
+
337
+
338
+ // Direct vs entity access
339
+ Content(`### Direct vs entity access
340
+
341
+ The entity interface handles URL construction, parameter placement,
342
+ and response parsing automatically. Use it for standard CRUD operations.
324
343
 
325
344
  `)
326
- }
345
+
346
+ Content(lang.direct)
327
347
 
328
348
  })
329
349
 
@@ -1,5 +1,5 @@
1
1
 
2
- import { cmp, each, Content } from 'jostraca'
2
+ import { cmp, each, names, Content } from 'jostraca'
3
3
 
4
4
  import {
5
5
  KIT,
@@ -13,6 +13,10 @@ const ReadmeModel = cmp(function ReadmeModel(props: any) {
13
13
  const { target, ctx$ } = props
14
14
  const { model } = ctx$
15
15
 
16
+ // Guard the Name case variant so the reference header never renders
17
+ // "undefinedSDK" if apidef did not populate it.
18
+ if (model.name && !model.Name) names(model, model.name)
19
+
16
20
  const entity = getModelPath(model, `main.${KIT}.entity`)
17
21
  const entityList = each(entity).filter((e: any) => e.active !== false)
18
22
 
@@ -60,7 +64,8 @@ ${apikeyRow}| \`base\` | \`string\` | Base URL of the API server. |
60
64
  `)
61
65
 
62
66
  each(entityList, (ent: any) => {
63
- Content(`| \`${ent.Name}(data?)\` | \`${ent.Name}Entity\` | Create a ${ent.Name} entity instance. |
67
+ const article = /^[aeiou]/i.test(ent.Name) ? 'an' : 'a'
68
+ Content(`| \`${ent.Name}(data?)\` | \`${ent.Name}Entity\` | Create ${article} ${ent.Name} entity instance. |
64
69
  `)
65
70
  })
66
71