@voxgig/sdkgen 1.3.17 → 1.3.19

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 (267) hide show
  1. package/bin/voxgig-sdkgen +1 -1
  2. package/dist/cmp/Deploy.js +16 -16
  3. package/dist/cmp/Deploy.js.map +1 -1
  4. package/dist/cmp/Entity.js +5 -1
  5. package/dist/cmp/Entity.js.map +1 -1
  6. package/dist/cmp/Feature.js +2 -1
  7. package/dist/cmp/Feature.js.map +1 -1
  8. package/dist/cmp/ReadmeTop.js +13 -11
  9. package/dist/cmp/ReadmeTop.js.map +1 -1
  10. package/dist/helpers/canonType.js +8 -3
  11. package/dist/helpers/canonType.js.map +1 -1
  12. package/dist/helpers/collectDeps.d.ts +1 -1
  13. package/dist/helpers/collectDeps.js +36 -13
  14. package/dist/helpers/collectDeps.js.map +1 -1
  15. package/dist/helpers/naming.d.ts +5 -1
  16. package/dist/helpers/naming.js +118 -0
  17. package/dist/helpers/naming.js.map +1 -1
  18. package/dist/helpers/opShape.d.ts +3 -1
  19. package/dist/helpers/opShape.js +87 -8
  20. package/dist/helpers/opShape.js.map +1 -1
  21. package/dist/helpers/serverVars.d.ts +10 -0
  22. package/dist/helpers/serverVars.js +87 -0
  23. package/dist/helpers/serverVars.js.map +1 -0
  24. package/dist/sdkgen.d.ts +4 -3
  25. package/dist/sdkgen.js +11 -2
  26. package/dist/sdkgen.js.map +1 -1
  27. package/dist/tsconfig.tsbuildinfo +1 -1
  28. package/package.json +15 -10
  29. package/project/.sdk/model/target/cpp.aontu +4 -4
  30. package/project/.sdk/model/target/go-cli.aontu +17 -17
  31. package/project/.sdk/model/target/go-mcp.aontu +11 -11
  32. package/project/.sdk/model/target/go.aontu +1 -1
  33. package/project/.sdk/model/target/java.aontu +4 -4
  34. package/project/.sdk/model/target/kotlin.aontu +4 -4
  35. package/project/.sdk/model/target/lean.aontu +51 -0
  36. package/project/.sdk/model/target/scala.aontu +4 -4
  37. package/project/.sdk/src/cmp/c/EntityTypes_c.ts +3 -4
  38. package/project/.sdk/src/cmp/c/Entity_c.ts +3 -3
  39. package/project/.sdk/src/cmp/c/ReadmeExamplesTest_c.ts +24 -7
  40. package/project/.sdk/src/cmp/c/TestDirect_c.ts +3 -3
  41. package/project/.sdk/src/cmp/c/TestEntity_c.ts +1 -1
  42. package/project/.sdk/src/cmp/clojure/Entity_clojure.ts +1 -1
  43. package/project/.sdk/src/cmp/clojure/ReadmeExamplesTest_clojure.ts +19 -8
  44. package/project/.sdk/src/cmp/cpp/EntityTypes_cpp.ts +2 -2
  45. package/project/.sdk/src/cmp/cpp/Entity_cpp.ts +3 -3
  46. package/project/.sdk/src/cmp/cpp/MainEntity_cpp.ts +2 -2
  47. package/project/.sdk/src/cmp/cpp/ReadmeExamplesTest_cpp.ts +136 -0
  48. package/project/.sdk/src/cmp/cpp/TestDirect_cpp.ts +3 -3
  49. package/project/.sdk/src/cmp/cpp/Test_cpp.ts +4 -0
  50. package/project/.sdk/src/cmp/csharp/EntityTypes_csharp.ts +2 -3
  51. package/project/.sdk/src/cmp/csharp/Entity_csharp.ts +3 -3
  52. package/project/.sdk/src/cmp/csharp/MainEntity_csharp.ts +2 -2
  53. package/project/.sdk/src/cmp/csharp/Package_csharp.ts +1 -1
  54. package/project/.sdk/src/cmp/csharp/ReadmeExamplesTest_csharp.ts +13 -1
  55. package/project/.sdk/src/cmp/csharp/TestDirect_csharp.ts +3 -3
  56. package/project/.sdk/src/cmp/csharp/TestEntity_csharp.ts +22 -15
  57. package/project/.sdk/src/cmp/dart/EntityTypes_dart.ts +2 -3
  58. package/project/.sdk/src/cmp/dart/Entity_dart.ts +3 -3
  59. package/project/.sdk/src/cmp/dart/MainEntity_dart.ts +2 -2
  60. package/project/.sdk/src/cmp/dart/Main_dart.ts +3 -3
  61. package/project/.sdk/src/cmp/dart/Package_dart.ts +1 -1
  62. package/project/.sdk/src/cmp/dart/TestDirect_dart.ts +4 -4
  63. package/project/.sdk/src/cmp/elixir/EntityTypes_elixir.ts +2 -3
  64. package/project/.sdk/src/cmp/elixir/Entity_elixir.ts +1 -1
  65. package/project/.sdk/src/cmp/elixir/ReadmeExamplesTest_elixir.ts +21 -3
  66. package/project/.sdk/src/cmp/go/Config_go.ts +14 -2
  67. package/project/.sdk/src/cmp/go/EntityTypes_go.ts +110 -18
  68. package/project/.sdk/src/cmp/go/Entity_go.ts +3 -3
  69. package/project/.sdk/src/cmp/go/Main_go.ts +7 -6
  70. package/project/.sdk/src/cmp/go/Package_go.ts +1 -1
  71. package/project/.sdk/src/cmp/go/TestDirect_go.ts +3 -3
  72. package/project/.sdk/src/cmp/go/TestEntity_go.ts +1 -1
  73. package/project/.sdk/src/cmp/go/utility_go.ts +25 -0
  74. package/project/.sdk/src/cmp/go-cli/Main_go-cli.ts +62 -35
  75. package/project/.sdk/src/cmp/go-cli/fragment/main.fragment.go +7 -7
  76. package/project/.sdk/src/cmp/go-cli/fragment/words.fragment.go +21 -18
  77. package/project/.sdk/src/cmp/go-mcp/Main_go-mcp.ts +9 -1
  78. package/project/.sdk/src/cmp/haskell/ReadmeExamplesTest_haskell.ts +28 -18
  79. package/project/.sdk/src/cmp/java/EntityTypes_java.ts +2 -3
  80. package/project/.sdk/src/cmp/java/Entity_java.ts +3 -3
  81. package/project/.sdk/src/cmp/java/MainEntity_java.ts +2 -2
  82. package/project/.sdk/src/cmp/java/Package_java.ts +1 -1
  83. package/project/.sdk/src/cmp/java/ReadmeExamplesTest_java.ts +23 -1
  84. package/project/.sdk/src/cmp/java/TestDirect_java.ts +3 -3
  85. package/project/.sdk/src/cmp/js/Config_js.ts +11 -0
  86. package/project/.sdk/src/cmp/js/EntityTypes_js.ts +2 -3
  87. package/project/.sdk/src/cmp/js/Entity_js.ts +3 -3
  88. package/project/.sdk/src/cmp/js/MainEntity_js.ts +2 -2
  89. package/project/.sdk/src/cmp/js/Main_js.ts +2 -2
  90. package/project/.sdk/src/cmp/js/TestDirect_js.ts +4 -4
  91. package/project/.sdk/src/cmp/js/fragment/Config.fragment.js +2 -2
  92. package/project/.sdk/src/cmp/js/fragment/Direct.test.fragment.js +4 -0
  93. package/project/.sdk/src/cmp/kotlin/EntityTypes_kotlin.ts +2 -3
  94. package/project/.sdk/src/cmp/kotlin/Entity_kotlin.ts +3 -3
  95. package/project/.sdk/src/cmp/kotlin/MainEntity_kotlin.ts +2 -2
  96. package/project/.sdk/src/cmp/kotlin/Package_kotlin.ts +1 -1
  97. package/project/.sdk/src/cmp/kotlin/ReadmeExamplesTest_kotlin.ts +27 -2
  98. package/project/.sdk/src/cmp/kotlin/TestDirect_kotlin.ts +3 -3
  99. package/project/.sdk/src/cmp/lean/Config_lean.ts +88 -0
  100. package/project/.sdk/src/cmp/lean/Entity_lean.ts +9 -0
  101. package/project/.sdk/src/cmp/lean/Gitignore_lean.ts +18 -0
  102. package/project/.sdk/src/cmp/lean/Main_lean.ts +120 -0
  103. package/project/.sdk/src/cmp/lean/Package_lean.ts +68 -0
  104. package/project/.sdk/src/cmp/lean/ReadmeEntity_lean.ts +29 -0
  105. package/project/.sdk/src/cmp/lean/ReadmeExplanation_lean.ts +19 -0
  106. package/project/.sdk/src/cmp/lean/ReadmeHowto_lean.ts +25 -0
  107. package/project/.sdk/src/cmp/lean/ReadmeInstall_lean.ts +38 -0
  108. package/project/.sdk/src/cmp/lean/ReadmeIntro_lean.ts +25 -0
  109. package/project/.sdk/src/cmp/lean/ReadmeModel_lean.ts +24 -0
  110. package/project/.sdk/src/cmp/lean/ReadmeOptions_lean.ts +22 -0
  111. package/project/.sdk/src/cmp/lean/ReadmeQuick_lean.ts +50 -0
  112. package/project/.sdk/src/cmp/lean/ReadmeRef_lean.ts +16 -0
  113. package/project/.sdk/src/cmp/lean/ReadmeTopHowto_lean.ts +16 -0
  114. package/project/.sdk/src/cmp/lean/ReadmeTopQuick_lean.ts +23 -0
  115. package/project/.sdk/src/cmp/lean/ReadmeTopTest_lean.ts +18 -0
  116. package/project/.sdk/src/cmp/lean/Test_lean.ts +207 -0
  117. package/project/.sdk/src/cmp/lean/utility_lean.ts +78 -0
  118. package/project/.sdk/src/cmp/lua/Config_lua.ts +10 -1
  119. package/project/.sdk/src/cmp/lua/EntityTypes_lua.ts +2 -3
  120. package/project/.sdk/src/cmp/lua/Entity_lua.ts +3 -3
  121. package/project/.sdk/src/cmp/lua/Package_lua.ts +1 -1
  122. package/project/.sdk/src/cmp/lua/TestDirect_lua.ts +3 -3
  123. package/project/.sdk/src/cmp/lua/TestEntity_lua.ts +1 -1
  124. package/project/.sdk/src/cmp/ocaml/ReadmeExamplesTest_ocaml.ts +29 -14
  125. package/project/.sdk/src/cmp/perl/Entity_perl.ts +3 -3
  126. package/project/.sdk/src/cmp/perl/MainEntity_perl.ts +2 -2
  127. package/project/.sdk/src/cmp/perl/Package_perl.ts +1 -1
  128. package/project/.sdk/src/cmp/perl/TestDirect_perl.ts +3 -3
  129. package/project/.sdk/src/cmp/php/Config_php.ts +13 -2
  130. package/project/.sdk/src/cmp/php/EntityTypes_php.ts +2 -3
  131. package/project/.sdk/src/cmp/php/Entity_php.ts +3 -3
  132. package/project/.sdk/src/cmp/php/MainEntity_php.ts +2 -2
  133. package/project/.sdk/src/cmp/php/Package_php.ts +1 -1
  134. package/project/.sdk/src/cmp/php/TestDirect_php.ts +3 -3
  135. package/project/.sdk/src/cmp/php/TestEntity_php.ts +1 -1
  136. package/project/.sdk/src/cmp/py/Config_py.ts +10 -1
  137. package/project/.sdk/src/cmp/py/EntityTypes_py.ts +2 -3
  138. package/project/.sdk/src/cmp/py/Entity_py.ts +3 -3
  139. package/project/.sdk/src/cmp/py/MainEntity_py.ts +2 -2
  140. package/project/.sdk/src/cmp/py/Main_py.ts +2 -2
  141. package/project/.sdk/src/cmp/py/Package_py.ts +1 -1
  142. package/project/.sdk/src/cmp/py/TestDirect_py.ts +3 -3
  143. package/project/.sdk/src/cmp/py/TestEntity_py.ts +1 -1
  144. package/project/.sdk/src/cmp/rb/Config_rb.ts +12 -1
  145. package/project/.sdk/src/cmp/rb/EntityTypes_rb.ts +15 -5
  146. package/project/.sdk/src/cmp/rb/Entity_rb.ts +3 -3
  147. package/project/.sdk/src/cmp/rb/MainEntity_rb.ts +2 -2
  148. package/project/.sdk/src/cmp/rb/Package_rb.ts +2 -2
  149. package/project/.sdk/src/cmp/rb/TestDirect_rb.ts +3 -3
  150. package/project/.sdk/src/cmp/rb/TestEntity_rb.ts +1 -1
  151. package/project/.sdk/src/cmp/rust/EntityBase_rust.ts +2 -2
  152. package/project/.sdk/src/cmp/rust/EntityTypes_rust.ts +3 -4
  153. package/project/.sdk/src/cmp/rust/Entity_rust.ts +3 -3
  154. package/project/.sdk/src/cmp/rust/MainEntity_rust.ts +2 -2
  155. package/project/.sdk/src/cmp/rust/Package_rust.ts +1 -1
  156. package/project/.sdk/src/cmp/rust/ReadmeExamplesTest_rust.ts +22 -10
  157. package/project/.sdk/src/cmp/rust/TestDirect_rust.ts +3 -3
  158. package/project/.sdk/src/cmp/rust/TestEntity_rust.ts +25 -18
  159. package/project/.sdk/src/cmp/scala/EntityTypes_scala.ts +2 -3
  160. package/project/.sdk/src/cmp/scala/Entity_scala.ts +3 -3
  161. package/project/.sdk/src/cmp/scala/MainEntity_scala.ts +2 -2
  162. package/project/.sdk/src/cmp/scala/ReadmeExamplesTest_scala.ts +22 -3
  163. package/project/.sdk/src/cmp/scala/TestDirect_scala.ts +3 -3
  164. package/project/.sdk/src/cmp/scala/Test_scala.ts +1 -1
  165. package/project/.sdk/src/cmp/swift/EntityTypes_swift.ts +12 -6
  166. package/project/.sdk/src/cmp/swift/Entity_swift.ts +3 -3
  167. package/project/.sdk/src/cmp/swift/MainEntity_swift.ts +2 -2
  168. package/project/.sdk/src/cmp/swift/Package_swift.ts +1 -1
  169. package/project/.sdk/src/cmp/swift/ReadmeExamplesTest_swift.ts +18 -1
  170. package/project/.sdk/src/cmp/swift/TestDirect_swift.ts +1 -1
  171. package/project/.sdk/src/cmp/ts/Config_ts.ts +11 -0
  172. package/project/.sdk/src/cmp/ts/EntityTypes_ts.ts +2 -3
  173. package/project/.sdk/src/cmp/ts/Entity_ts.ts +3 -3
  174. package/project/.sdk/src/cmp/ts/MainEntity_ts.ts +2 -2
  175. package/project/.sdk/src/cmp/ts/Main_ts.ts +2 -2
  176. package/project/.sdk/src/cmp/ts/TestDirect_ts.ts +4 -4
  177. package/project/.sdk/src/cmp/ts/fragment/Config.fragment.ts +2 -2
  178. package/project/.sdk/src/cmp/ts/fragment/Direct.test.fragment.ts +4 -0
  179. package/project/.sdk/src/cmp/zig/Entity_zig.ts +3 -3
  180. package/project/.sdk/src/cmp/zig/MainEntity_zig.ts +2 -2
  181. package/project/.sdk/src/cmp/zig/Package_zig.ts +10 -2
  182. package/project/.sdk/tm/cpp/test/primary_utility_test.cpp +8 -16
  183. package/project/.sdk/tm/csharp/Makefile +6 -6
  184. package/project/.sdk/tm/csharp/test/PrimaryUtilityTest.cs +10 -28
  185. package/project/.sdk/tm/dart/Makefile +3 -3
  186. package/project/.sdk/tm/dart/test/primary_test.dart +7 -0
  187. package/project/.sdk/tm/go/Makefile +6 -6
  188. package/project/.sdk/tm/go/feature/test_feature.go +33 -1
  189. package/project/.sdk/tm/go/test/primary_utility_test.go +46 -42
  190. package/project/.sdk/tm/go/test/runner_test.go +30 -1
  191. package/project/.sdk/tm/go/utility/make_options.go +48 -0
  192. package/project/.sdk/tm/java/Makefile +6 -6
  193. package/project/.sdk/tm/java/test/PrimaryUtilityTest.java +7 -24
  194. package/project/.sdk/tm/js/Makefile +6 -6
  195. package/project/.sdk/tm/js/src/feature/test/TestFeature.js +18 -1
  196. package/project/.sdk/tm/js/src/utility/MakeOptionsUtility.js +39 -1
  197. package/project/.sdk/tm/js/test/utility/PrimaryUtility.test.js +13 -0
  198. package/project/.sdk/tm/kotlin/Makefile +6 -6
  199. package/project/.sdk/tm/kotlin/test/PrimaryUtilityTest.kt +7 -20
  200. package/project/.sdk/tm/lean/LICENSE +21 -0
  201. package/project/.sdk/tm/lean/VERSION +1 -0
  202. package/project/.sdk/tm/lean/src/SdkFeature.lean +171 -0
  203. package/project/.sdk/tm/lean/src/SdkFeatures.lean +602 -0
  204. package/project/.sdk/tm/lean/src/SdkJson.lean +134 -0
  205. package/project/.sdk/tm/lean/src/SdkRuntime.lean +356 -0
  206. package/project/.sdk/tm/lean/src/SdkUtility.lean +617 -0
  207. package/project/.sdk/tm/lean/src/VoxgigStruct.lean +2880 -0
  208. package/project/.sdk/tm/lean/src/Vregex.lean +412 -0
  209. package/project/.sdk/tm/lean/src/feature/README.md +5 -0
  210. package/project/.sdk/tm/lean/src/feature/audit/.gitkeep +0 -0
  211. package/project/.sdk/tm/lean/src/feature/base/.gitkeep +0 -0
  212. package/project/.sdk/tm/lean/src/feature/cache/.gitkeep +0 -0
  213. package/project/.sdk/tm/lean/src/feature/clienttrack/.gitkeep +0 -0
  214. package/project/.sdk/tm/lean/src/feature/debug/.gitkeep +0 -0
  215. package/project/.sdk/tm/lean/src/feature/idempotency/.gitkeep +0 -0
  216. package/project/.sdk/tm/lean/src/feature/log/.gitkeep +0 -0
  217. package/project/.sdk/tm/lean/src/feature/metrics/.gitkeep +0 -0
  218. package/project/.sdk/tm/lean/src/feature/netsim/.gitkeep +0 -0
  219. package/project/.sdk/tm/lean/src/feature/paging/.gitkeep +0 -0
  220. package/project/.sdk/tm/lean/src/feature/proxy/.gitkeep +0 -0
  221. package/project/.sdk/tm/lean/src/feature/ratelimit/.gitkeep +0 -0
  222. package/project/.sdk/tm/lean/src/feature/rbac/.gitkeep +0 -0
  223. package/project/.sdk/tm/lean/src/feature/retry/.gitkeep +0 -0
  224. package/project/.sdk/tm/lean/src/feature/streaming/.gitkeep +0 -0
  225. package/project/.sdk/tm/lean/src/feature/telemetry/.gitkeep +0 -0
  226. package/project/.sdk/tm/lean/src/feature/test/.gitkeep +0 -0
  227. package/project/.sdk/tm/lean/src/feature/timeout/.gitkeep +0 -0
  228. package/project/.sdk/tm/lean/test/StructCorpus.lean +697 -0
  229. package/project/.sdk/tm/lean/test/TFeature.lean +268 -0
  230. package/project/.sdk/tm/lean/test/TPrimaryUtility.lean +349 -0
  231. package/project/.sdk/tm/lua/Makefile +7 -7
  232. package/project/.sdk/tm/lua/feature/test_feature.lua +29 -1
  233. package/project/.sdk/tm/lua/test/primary_utility_test.lua +14 -8
  234. package/project/.sdk/tm/lua/utility/make_options.lua +39 -0
  235. package/project/.sdk/tm/perl/Makefile +6 -6
  236. package/project/.sdk/tm/perl/t/primary_utility.t +8 -17
  237. package/project/.sdk/tm/php/Makefile +6 -6
  238. package/project/.sdk/tm/php/feature/TestFeature.php +30 -2
  239. package/project/.sdk/tm/php/test/PrimaryUtilityTest.php +14 -7
  240. package/project/.sdk/tm/php/utility/MakeOptions.php +44 -0
  241. package/project/.sdk/tm/py/Makefile +6 -6
  242. package/project/.sdk/tm/py/feature/test_feature.py +28 -1
  243. package/project/.sdk/tm/py/test/test_primary_utility.py +18 -18
  244. package/project/.sdk/tm/py/utility/make_options.py +42 -0
  245. package/project/.sdk/tm/rb/Makefile +6 -6
  246. package/project/.sdk/tm/rb/feature/test_feature.rb +24 -1
  247. package/project/.sdk/tm/rb/test/primary_utility_test.rb +11 -8
  248. package/project/.sdk/tm/rb/utility/make_options.rb +37 -0
  249. package/project/.sdk/tm/rust/Makefile +6 -6
  250. package/project/.sdk/tm/rust/tests/common/mod.rs +37 -1
  251. package/project/.sdk/tm/rust/tests/primary_utility_test.rs +12 -26
  252. package/project/.sdk/tm/swift/Makefile +6 -6
  253. package/project/.sdk/tm/swift/Tests/ProjectNameSDKTests/PrimaryUtilityTest.swift +7 -8
  254. package/project/.sdk/tm/ts/Makefile +6 -6
  255. package/project/.sdk/tm/ts/src/feature/test/TestFeature.ts +18 -1
  256. package/project/.sdk/tm/ts/src/utility/MakeOptionsUtility.ts +39 -1
  257. package/project/.sdk/tm/ts/test/utility/PrimaryUtility.test.ts +69 -21
  258. package/src/cmp/Deploy.ts +16 -16
  259. package/src/cmp/Entity.ts +5 -1
  260. package/src/cmp/Feature.ts +2 -1
  261. package/src/cmp/ReadmeTop.ts +13 -11
  262. package/src/helpers/canonType.ts +8 -3
  263. package/src/helpers/collectDeps.ts +39 -12
  264. package/src/helpers/naming.ts +130 -0
  265. package/src/helpers/opShape.ts +99 -12
  266. package/src/helpers/serverVars.ts +105 -0
  267. package/src/sdkgen.ts +12 -3
@@ -1,9 +1,9 @@
1
1
 
2
- // Go MCP server target — a Go program that *consumes* the sibling Go
3
- // SDK and exposes it as MCP tools. Like go-cli, it is not a language
4
- // SDK in its own right, so the standard per-entity / per-feature /
5
- // readme / test generation phases are switched off via the `phase`
6
- // map below.
2
+ # Go MCP server target — a Go program that *consumes* the sibling Go
3
+ # SDK and exposes it as MCP tools. Like go-cli, it is not a language
4
+ # SDK in its own right, so the standard per-entity / per-feature /
5
+ # readme / test generation phases are switched off via the `phase`
6
+ # map below.
7
7
 
8
8
  main: kit: target: 'go-mcp': {
9
9
 
@@ -12,7 +12,7 @@ main: kit: target: 'go-mcp': {
12
12
  comment: line: "//"
13
13
  module: name: '$$name$$'
14
14
 
15
- // Per-generation-phase activation. Mirrors go-cli — only Main runs.
15
+ # Per-generation-phase activation. Mirrors go-cli — only Main runs.
16
16
  phase: {
17
17
  entity: { active: false }
18
18
  feature: { active: false }
@@ -21,15 +21,15 @@ main: kit: target: 'go-mcp': {
21
21
  test: { active: false }
22
22
  }
23
23
 
24
- // No external module deps declared here. The generated go.mod uses
25
- // a relative replace to the sibling SDK at ../go and declares the
26
- // MCP Go SDK as a direct dep. See Main_go-mcp.ts.
24
+ # No external module deps declared here. The generated go.mod uses
25
+ # a relative replace to the sibling SDK at ../go and declares the
26
+ # MCP Go SDK as a direct dep. See Main_go-mcp.ts.
27
27
  deps: {}
28
28
  }
29
29
 
30
30
 
31
- // Feature-deps map slot — every target carries this so the same
32
- // feature can specify per-target dep variants.
31
+ # Feature-deps map slot — every target carries this so the same
32
+ # feature can specify per-target dep variants.
33
33
  main: kit: feature: &: target: 'go-mcp': deps: &: {
34
34
  kind: *'prod' | string
35
35
  }
@@ -11,7 +11,7 @@ main: kit: target: go: {
11
11
  kind: *'prod' | string
12
12
  }
13
13
 
14
- // struct is inlined under <gomodule>/utility/struct — no external dep.
14
+ # struct is inlined under <gomodule>/utility/struct — no external dep.
15
15
  deps: {}
16
16
  }
17
17
 
@@ -10,10 +10,10 @@ main: kit: target: java: {
10
10
  kind: *'prod' | string
11
11
  }
12
12
 
13
- // struct is inlined under utility/struct — no external runtime dep.
14
- // JSON parsing is the zero-dep utility/Json.java; HTTP transport is
15
- // java.net.http.HttpClient (JDK built-in). Tests need only JUnit,
16
- // declared directly in the generated pom.xml (test scope).
13
+ # struct is inlined under utility/struct — no external runtime dep.
14
+ # JSON parsing is the zero-dep utility/Json.java; HTTP transport is
15
+ # java.net.http.HttpClient (JDK built-in). Tests need only JUnit,
16
+ # declared directly in the generated pom.xml (test scope).
17
17
  deps: {}
18
18
  }
19
19
 
@@ -10,10 +10,10 @@ main: kit: target: kotlin: {
10
10
  kind: *'prod' | string
11
11
  }
12
12
 
13
- // struct is inlined under utility/struct — no external runtime dep.
14
- // JSON parsing is the zero-dep utility/Json.kt; HTTP transport is
15
- // java.net.http.HttpClient (JDK built-in). Tests need only JUnit,
16
- // declared directly in the generated build.gradle.kts (test scope).
13
+ # struct is inlined under utility/struct — no external runtime dep.
14
+ # JSON parsing is the zero-dep utility/Json.kt; HTTP transport is
15
+ # java.net.http.HttpClient (JDK built-in). Tests need only JUnit,
16
+ # declared directly in the generated build.gradle.kts (test scope).
17
17
  deps: {}
18
18
  }
19
19
 
@@ -0,0 +1,51 @@
1
+
2
+ main: kit: target: lean: {
3
+
4
+ title: Lean
5
+ ext: lean
6
+ comment: line: "--"
7
+ module: name: '$$name$$'
8
+ srcfeature: false
9
+
10
+ # Entities are generic (config-driven F.makeEntity), so no per-entity or
11
+ # per-feature generated modules — the same model as the Haskell target. The
12
+ # readme + agentguide phases read the API model directly (not per-entity
13
+ # generated code), so they are active; entity/feature generation stays off.
14
+ phase: {
15
+ entity: { active: false }
16
+ feature: { active: false }
17
+ readme: { active: true }
18
+ agentguide: { active: true }
19
+ test: { active: true }
20
+ }
21
+
22
+ deps: &: {
23
+ kind: *'prod' | string
24
+ }
25
+
26
+ # struct is vendored under src/ (VoxgigStruct.lean + Vregex.lean) and the
27
+ # runtime is dependency-free: it compiles with the stock Lean 4 toolchain
28
+ # (only the built-in prelude + Std), no Lake package dependencies. The HTTP
29
+ # transport shells out to `curl` via IO.Process, so there are no manifest
30
+ # deps.
31
+ deps: {}
32
+ }
33
+
34
+
35
+ main: kit: feature: &: target: lean: deps: &: {
36
+ kind: *'prod' | string
37
+ }
38
+
39
+
40
+ # Publication: Reservoir (Lean package index) — declared, publish pending
41
+ # (git-tag only for now).
42
+ main: kit: target: lean: publish: {
43
+ tag: { active: true }
44
+ registry: {
45
+ state: 'pending'
46
+ active: false
47
+ name: 'reservoir'
48
+ url: 'https://reservoir.lean-lang.org'
49
+ vault: { alias: 'reservoir', env: 'RESERVOIR_TOKEN' }
50
+ }
51
+ }
@@ -10,10 +10,10 @@ main: kit: target: scala: {
10
10
  kind: *'prod' | string
11
11
  }
12
12
 
13
- // struct is inlined under utility/struct — no external runtime dep.
14
- // JSON parsing is the zero-dep utility/Json.java; HTTP transport is
15
- // java.net.http.HttpClient (JDK built-in). The corpus runner and pipeline
16
- // tests are plain scala-cli mains (no test-framework dependency).
13
+ # struct is inlined under utility/struct — no external runtime dep.
14
+ # JSON parsing is the zero-dep utility/Json.java; HTTP transport is
15
+ # java.net.http.HttpClient (JDK built-in). The corpus runner and pipeline
16
+ # tests are plain scala-cli mains (no test-framework dependency).
17
17
  deps: {}
18
18
  }
19
19
 
@@ -28,11 +28,11 @@
28
28
  // <Name>RemoveMatch.
29
29
 
30
30
  import {
31
- cmp, each, names,
31
+ cmp, each,
32
32
  File, Content, Folder,
33
33
  } from '@voxgig/sdkgen'
34
34
 
35
- import { canonToType, opTypeName, opRequestShape, warnEntityTypeCollisions } from '@voxgig/sdkgen'
35
+ import { canonToType, opTypeName, opRequestShape, warnEntityTypeCollisions , deriveEntityNames } from '@voxgig/sdkgen'
36
36
 
37
37
  import {
38
38
  KIT,
@@ -93,8 +93,7 @@ const EntityTypes = cmp(function EntityTypes(props: any) {
93
93
  // Emit for every entity that gets an entity file (filter on `name`, always
94
94
  // present; derive `Name` here so the struct set is deterministic — parity
95
95
  // with the go/rust emitters' fix).
96
- const entityList = each(entity).filter((e: any) => e && null != e.name)
97
- entityList.forEach((e: any) => { if (null == e.Name) names(e, e.name) })
96
+ const entityList = deriveEntityNames(entity)
98
97
 
99
98
  // Surface duplicate generated type names (two entities with the same
100
99
  // PascalCase Name) — they would redeclare a type in statically-typed
@@ -4,7 +4,7 @@ import * as Path from 'node:path'
4
4
  import {
5
5
  cmp, camelify,
6
6
  File, Content, Folder, Fragment,
7
- entityClassName,
7
+ entityClassName, entityCollection,
8
8
  } from '@voxgig/sdkgen'
9
9
 
10
10
  import {
@@ -20,7 +20,7 @@ const Entity = cmp(function Entity(props: any) {
20
20
  const { model, stdrep } = props.ctx$
21
21
  const { target, entity } = props
22
22
 
23
- const entityColl = getModelPath(model, `main.${KIT}.entity`)
23
+ const entityColl = entityCollection(model)
24
24
  const cls = entityClassName(entity, entityColl)
25
25
  const evar = cVarName(entity.name)
26
26
 
@@ -34,7 +34,7 @@ const Entity = cmp(function Entity(props: any) {
34
34
 
35
35
  File({ name: evar + '.c' }, () => {
36
36
 
37
- const opnames = Object.keys(entity.op)
37
+ const opnames = Object.keys(entity.op || {})
38
38
 
39
39
  // For each CRUD op: splice the real implementation when the spec
40
40
  // defines it, otherwise emit a stub that errors at runtime (so the
@@ -67,22 +67,31 @@ static void ltrim_eq_buf(const char* start, const char* end, char* out, size_t c
67
67
  out[len] = '\\0';
68
68
  }
69
69
 
70
- // Balanced (), [], {} outside of string literals. Naive quote toggle: the
71
- // generated snippets never embed an escaped quote inside a string.
70
+ // Balanced (), [], {} outside of string literals, with each closer matching
71
+ // the most-recent opener (so "([)]" is rejected, not just counted). Naive
72
+ // quote toggle: the generated snippets never embed an escaped quote inside a
73
+ // string.
72
74
  static int is_balanced(const char* block, size_t len) {
73
75
  int in_str = 0;
74
- int depth = 0;
76
+ // Depth can never exceed len; a per-call heap stack keeps this reentrant.
77
+ char* stack = (char*)malloc(len + 1);
78
+ if (!stack) return 0;
79
+ size_t top = 0;
75
80
  for (size_t i = 0; i < len; i++) {
76
81
  char c = block[i];
77
82
  if (c == '"') { in_str = !in_str; continue; }
78
83
  if (in_str) continue;
79
- if (c == '(' || c == '[' || c == '{') depth++;
84
+ if (c == '(') stack[top++] = ')';
85
+ else if (c == '[') stack[top++] = ']';
86
+ else if (c == '{') stack[top++] = '}';
80
87
  else if (c == ')' || c == ']' || c == '}') {
81
- depth--;
82
- if (depth < 0) return 0;
88
+ if (top == 0 || stack[top - 1] != c) { free(stack); return 0; }
89
+ top--;
83
90
  }
84
91
  }
85
- return depth == 0 && !in_str;
92
+ int ok = (top == 0 && !in_str);
93
+ free(stack);
94
+ return ok;
86
95
  }
87
96
 
88
97
  // Scan one doc: for every \`\`\`c ... \`\`\` block, check non-empty + balanced.
@@ -126,6 +135,14 @@ static int check_doc(const char* label, const char* path) {
126
135
  p = nl + 1;
127
136
  }
128
137
 
138
+ // A fence opened but never closed is a malformed doc — fail rather than
139
+ // silently skipping the unterminated block.
140
+ {
141
+ char msg[128];
142
+ snprintf(msg, sizeof(msg), "%s: c fence closed", label);
143
+ CHECK(!in_block, msg);
144
+ }
145
+
129
146
  free(src);
130
147
  return blocks;
131
148
  }
@@ -64,15 +64,15 @@ const TestDirect = cmp(function TestDirect(props: any) {
64
64
  const evar = cVarName(entity.name)
65
65
  const Name = model.const.Name
66
66
 
67
- const opnames = Object.keys(entity.op)
67
+ const opnames = Object.keys(entity.op || {})
68
68
  const hasLoad = opnames.includes('load')
69
69
  const hasList = opnames.includes('list')
70
70
  if (!hasLoad && !hasList) {
71
71
  return
72
72
  }
73
73
 
74
- const loadOp = (entity.op as any).load
75
- const listOp = (entity.op as any).list
74
+ const loadOp = (entity.op as any)?.load
75
+ const listOp = (entity.op as any)?.list
76
76
 
77
77
  const loadPoint = loadOp?.points?.[0]
78
78
  const loadPath = loadPoint ? normalizePathParams(loadPoint.parts || [], loadPoint?.args?.params || [], loadPoint?.rename?.param) : ''
@@ -44,7 +44,7 @@ int main(void) {
44
44
  // The stream test drives the list op; only emit it when the entity has a
45
45
  // list op — a create/load-only entity has no list endpoint, so
46
46
  // stream("list") would error.
47
- const hasList = null != (entity.op && (entity.op as any).list)
47
+ const hasList = null != (entity.op && (entity.op as any)?.list)
48
48
  if (hasList) {
49
49
  Content(`
50
50
  // stream(): runs the list op through the full pipeline and returns a List
@@ -31,7 +31,7 @@ const Entity = cmp(function Entity(props: any) {
31
31
 
32
32
  File({ name: entity.name + '.' + target.ext }, () => {
33
33
 
34
- const opnames = Object.keys(entity.op)
34
+ const opnames = Object.keys(entity.op || {})
35
35
 
36
36
  // For each CRUD op: splice the real implementation when the spec
37
37
  // defines it; otherwise leave the slot empty (the fn is simply not
@@ -20,9 +20,10 @@ import { cmp, Content } from '@voxgig/sdkgen'
20
20
  // TS template literal needs no embedded backticks.
21
21
  const ReadmeExamplesTest = cmp(function ReadmeExamplesTest(_props: any) {
22
22
 
23
- Content(` (letfn [(clj-blocks [text]
24
- (let [fence (apply str (repeat 3 (char 96)))
25
- parts (clojure.string/split text (re-pattern fence))]
23
+ Content(` (letfn [(fence-pat [] (re-pattern (apply str (repeat 3 (char 96)))))
24
+ (fence-count [text] (count (re-seq (fence-pat) text)))
25
+ (clj-blocks [text]
26
+ (let [parts (clojure.string/split text (fence-pat))]
26
27
  (->> parts
27
28
  (map-indexed vector)
28
29
  (filter (fn [[i _]] (odd? i)))
@@ -40,11 +41,21 @@ const ReadmeExamplesTest = cmp(function ReadmeExamplesTest(_props: any) {
40
41
  (fn []
41
42
  (if-not (.exists (java.io.File. ^String path))
42
43
  (t/is-true true (str label " absent (skipped)"))
43
- (let [blocks (clj-blocks (slurp path))]
44
- (doseq [b blocks]
45
- (binding [*read-eval* false]
46
- (read-string (str "[\\n" b "\\n]"))))
47
- (t/is-true true (str label " clojure blocks parse cleanly"))))))))
44
+ (let [text (slurp path)]
45
+ ;; A code fence opened but never closed leaves an ODD number of
46
+ ;; fence markers; the split-on-fence then captures the trailing
47
+ ;; prose (everything after the last opener) as if it were a
48
+ ;; clojure block, which can parse cleanly and pass silently. Fail
49
+ ;; on the malformed doc instead. (Count markers directly rather
50
+ ;; than split parts: split drops trailing empty segments, so a
51
+ ;; closing fence at EOF would be miscounted.)
52
+ (t/is-true (even? (fence-count text))
53
+ (str label " code fences balanced (no unclosed fence)"))
54
+ (let [blocks (clj-blocks text)]
55
+ (doseq [b blocks]
56
+ (binding [*read-eval* false]
57
+ (read-string (str "[\\n" b "\\n]"))))
58
+ (t/is-true true (str label " clojure blocks parse cleanly")))))))))
48
59
  `)
49
60
  })
50
61
 
@@ -27,6 +27,7 @@ import {
27
27
  cmp, each, names,
28
28
  File, Content,
29
29
  canonToType, opTypeName, opRequestShape, warnEntityTypeCollisions,
30
+ deriveEntityNames,
30
31
  } from '@voxgig/sdkgen'
31
32
 
32
33
  import {
@@ -99,9 +100,8 @@ const EntityTypes = cmp(function EntityTypes(props: any) {
99
100
  // filter, so inactive entities still get class files referencing these
100
101
  // typed names. Filter on `name` (always present), NOT `active` — parity
101
102
  // with the go emitter's fix.
102
- const entityList = each(entity).filter((e: any) => e && null != e.name)
103
+ const entityList = deriveEntityNames(entity)
103
104
  // Derive the PascalCase Name up-front — it is set LAZILY by names().
104
- entityList.forEach((e: any) => { if (null == e.Name) names(e, e.name) })
105
105
 
106
106
  // Surface duplicate generated type names (two entities with the same
107
107
  // PascalCase Name) — they would redeclare a type in statically-typed
@@ -4,7 +4,7 @@ import * as Path from 'node:path'
4
4
  import {
5
5
  cmp, camelify,
6
6
  File, Content, Folder, Fragment,
7
- entityClassName,
7
+ entityClassName, entityCollection,
8
8
  } from '@voxgig/sdkgen'
9
9
 
10
10
  import {
@@ -20,7 +20,7 @@ const Entity = cmp(function Entity(props: any) {
20
20
  const { model, stdrep } = props.ctx$
21
21
  const { target, entity } = props
22
22
 
23
- const entityColl = getModelPath(model, `main.${KIT}.entity`)
23
+ const entityColl = entityCollection(model)
24
24
  const cls = entityClassName(entity, entityColl)
25
25
 
26
26
  const entrep = {
@@ -33,7 +33,7 @@ const Entity = cmp(function Entity(props: any) {
33
33
 
34
34
  File({ name: cppVarName(entity.name) + '.' + target.ext }, () => {
35
35
 
36
- const opnames = Object.keys(entity.op)
36
+ const opnames = Object.keys(entity.op || {})
37
37
 
38
38
  // For each CRUD op: splice the real method if the spec defines it, else
39
39
  // a stub that satisfies the SdkEntity interface but throws at runtime.
@@ -1,5 +1,5 @@
1
1
 
2
- import { cmp, Content, entityClassName } from '@voxgig/sdkgen'
2
+ import { cmp, Content, entityClassName, entityCollection } from '@voxgig/sdkgen'
3
3
 
4
4
  import {
5
5
  KIT,
@@ -16,7 +16,7 @@ const MainEntity = cmp(async function MainEntity(props: any) {
16
16
  const { entity } = props
17
17
  const { model } = props.ctx$
18
18
 
19
- const entityColl = getModelPath(model, `main.${KIT}.entity`)
19
+ const entityColl = entityCollection(model)
20
20
  const cls = entityClassName(entity, entityColl)
21
21
  const accessor = cppVarName(entity.name)
22
22
 
@@ -0,0 +1,136 @@
1
+
2
+ import { cmp, Content, File } from '@voxgig/sdkgen'
3
+
4
+
5
+ // Emits test/readme_examples_test.cpp — a structural gate over every ```cpp
6
+ // fenced block in the docs that ship C++ examples:
7
+ // - the root README.md (top-level, multi-language quick start)
8
+ // - the per-language cpp/README.md
9
+ // - the per-language cpp/REFERENCE.md
10
+ //
11
+ // DESIGN NOTE (mirrors ReadmeExamplesTest_c): the go gate shells out to
12
+ // `go build`/`go run` to COMPILE and RUN every block. A faithful C++ port
13
+ // would extract each snippet, wrap it in a translation unit, and drive the
14
+ // bundled Makefile / c++ against the header-only runtime — a large,
15
+ // environment-sensitive harness that cannot be authored safely here. This gate
16
+ // instead validates that every documented C++ block is PRESENT and
17
+ // STRUCTURALLY well-formed (balanced ()[]{}, non-empty). It is a real,
18
+ // always-passing test that keeps the docs honest about block structure;
19
+ // upgrading it to a true compile gate is left as a follow-up. Missing docs are
20
+ // tolerated (a run may generate a subset of phases).
21
+ //
22
+ // The test binary runs with the C++ project root as its working directory, so
23
+ // the doc paths resolve as "README.md", "REFERENCE.md", and "../README.md".
24
+ const ReadmeExamplesTest = cmp(function ReadmeExamplesTest(props: any) {
25
+ const { model } = props.ctx$
26
+
27
+ File({ name: 'readme_examples_test.cpp' }, () => {
28
+ Content(`// Structural gate over every \`\`\`cpp block in the ${model.const.Name} SDK docs
29
+ // (root README.md, cpp/README.md, cpp/REFERENCE.md). Generated by
30
+ // @voxgig/sdkgen — do not edit by hand.
31
+ //
32
+ // Validates that each documented C++ block is present, non-empty, and has
33
+ // balanced delimiters. Missing docs are tolerated. See ReadmeExamplesTest_cpp
34
+ // for why this is a structural gate rather than a full compile harness.
35
+
36
+ #include "testlib.hpp"
37
+
38
+ #include <fstream>
39
+ #include <sstream>
40
+ #include <string>
41
+ #include <vector>
42
+
43
+ using namespace sdk;
44
+
45
+ // Read an entire file into a string, or "" if absent.
46
+ static std::string read_file(const std::string& path) {
47
+ std::ifstream f(path, std::ios::binary);
48
+ if (!f) return std::string();
49
+ std::ostringstream ss;
50
+ ss << f.rdbuf();
51
+ return ss.str();
52
+ }
53
+
54
+ // Trim leading/trailing whitespace (fence lines are short).
55
+ static std::string trim(const std::string& s) {
56
+ size_t a = s.find_first_not_of(" \\t\\r\\n");
57
+ if (a == std::string::npos) return std::string();
58
+ size_t b = s.find_last_not_of(" \\t\\r\\n");
59
+ return s.substr(a, b - a + 1);
60
+ }
61
+
62
+ // Balanced (), [], {} outside of string literals, with each closer matching
63
+ // the most-recent opener (so "([)]" is rejected, not just counted). Naive
64
+ // quote toggle: the generated snippets never embed an escaped quote inside a
65
+ // string.
66
+ static bool is_balanced(const std::string& block) {
67
+ bool in_str = false;
68
+ std::vector<char> stack;
69
+ for (char c : block) {
70
+ if (c == '"') { in_str = !in_str; continue; }
71
+ if (in_str) continue;
72
+ if (c == '(') stack.push_back(')');
73
+ else if (c == '[') stack.push_back(']');
74
+ else if (c == '{') stack.push_back('}');
75
+ else if (c == ')' || c == ']' || c == '}') {
76
+ if (stack.empty() || stack.back() != c) return false;
77
+ stack.pop_back();
78
+ }
79
+ }
80
+ return stack.empty() && !in_str;
81
+ }
82
+
83
+ // Scan one doc: for every \`\`\`cpp ... \`\`\` block, check non-empty + balanced.
84
+ // Returns the number of blocks seen (0 if the file is absent).
85
+ static int check_doc(const std::string& label, const std::string& path) {
86
+ std::string src = read_file(path);
87
+ if (src.empty()) return 0; // doc not generated in this run — tolerate
88
+
89
+ int blocks = 0;
90
+ bool in_block = false;
91
+ std::string block;
92
+ std::istringstream in(src);
93
+ std::string line;
94
+ while (std::getline(in, line)) {
95
+ std::string t = trim(line);
96
+ if (!in_block) {
97
+ if (t == "\`\`\`cpp") { in_block = true; block.clear(); }
98
+ } else if (t == "\`\`\`") {
99
+ std::string body = trim(block);
100
+ ASSERT_TRUE(!body.empty(), label + ": cpp block " + std::to_string(blocks + 1) + " non-empty");
101
+ ASSERT_TRUE(is_balanced(body), label + ": cpp block " + std::to_string(blocks + 1) + " balanced");
102
+ blocks++;
103
+ in_block = false;
104
+ } else {
105
+ block += line;
106
+ block += '\\n';
107
+ }
108
+ }
109
+ // A fence opened but never closed is a malformed doc — fail rather than
110
+ // silently skipping the unterminated block.
111
+ ASSERT_TRUE(!in_block, label + ": cpp fence closed");
112
+ return blocks;
113
+ }
114
+
115
+ static void readme_examples_gate() {
116
+ int total = 0;
117
+ total += check_doc("root README", "../README.md");
118
+ total += check_doc("cpp/README", "README.md");
119
+ total += check_doc("cpp/REFERENCE", "REFERENCE.md");
120
+ // Missing docs are tolerated (a run may generate a subset of phases), so a
121
+ // zero total is not a failure — the per-block checks above carry the gate.
122
+ std::printf("readme_examples: scanned %d cpp block(s)\\n", total);
123
+ }
124
+
125
+ int main() {
126
+ T_RUN(readme_examples_gate);
127
+ return sdktest::summary("readme_examples_test");
128
+ }
129
+ `)
130
+ })
131
+ })
132
+
133
+
134
+ export {
135
+ ReadmeExamplesTest
136
+ }
@@ -60,15 +60,15 @@ const TestDirect = cmp(function TestDirect(props: any) {
60
60
 
61
61
  const ProjectName = model.const.Name
62
62
 
63
- const opnames = Object.keys(entity.op)
63
+ const opnames = Object.keys(entity.op || {})
64
64
  const hasLoad = opnames.includes('load')
65
65
  const hasList = opnames.includes('list')
66
66
  if (!hasLoad && !hasList) {
67
67
  return
68
68
  }
69
69
 
70
- const loadOp = (entity.op as any).load
71
- const listOp = (entity.op as any).list
70
+ const loadOp = (entity.op as any)?.load
71
+ const listOp = (entity.op as any)?.list
72
72
 
73
73
  const loadPoint = loadOp?.points?.[0]
74
74
  const loadPath = loadPoint ? normalizePathParams(loadPoint.parts || [], loadPoint?.args?.params || [], loadPoint?.rename?.param) : ''
@@ -13,6 +13,7 @@ import { cmp, each, Folder } from '@voxgig/sdkgen'
13
13
 
14
14
  import { TestEntity } from './TestEntity_cpp'
15
15
  import { TestDirect } from './TestDirect_cpp'
16
+ import { ReadmeExamplesTest } from './ReadmeExamplesTest_cpp'
16
17
 
17
18
 
18
19
  const Test = cmp(function Test(props: any) {
@@ -27,6 +28,9 @@ const Test = cmp(function Test(props: any) {
27
28
  TestEntity({ target, entity })
28
29
  TestDirect({ target, entity })
29
30
  })
31
+
32
+ // Validate the documented C++ examples in the READMEs are well-formed.
33
+ ReadmeExamplesTest({ target })
30
34
  })
31
35
  })
32
36
 
@@ -34,7 +34,7 @@ import {
34
34
  File, Content,
35
35
  } from '@voxgig/sdkgen'
36
36
 
37
- import { canonToType, opTypeName, opRequestShape, warnEntityTypeCollisions } from '@voxgig/sdkgen'
37
+ import { canonToType, opTypeName, opRequestShape, warnEntityTypeCollisions , deriveEntityNames } from '@voxgig/sdkgen'
38
38
 
39
39
  import {
40
40
  KIT,
@@ -133,11 +133,10 @@ const EntityTypes = cmp(function EntityTypes(props: any) {
133
133
  // filter, so inactive entities still get class files referencing these
134
134
  // typed names. Filter on `name` (always present), NOT `active` — parity
135
135
  // with the go emitter's fix.
136
- const entityList = each(entity).filter((e: any) => e && null != e.name)
136
+ const entityList = deriveEntityNames(entity)
137
137
  // Derive the PascalCase Name up-front — it is set LAZILY by names(), so an
138
138
  // entity not yet named (e.g. a fieldless placeholder) would otherwise read
139
139
  // `Name = undefined` below. Parity with the go/py emitter's fix.
140
- entityList.forEach((e: any) => { if (null == e.Name) names(e, e.name) })
141
140
 
142
141
  // Surface duplicate generated type names (two entities with the same
143
142
  // PascalCase Name) — they would redeclare a type in statically-typed
@@ -4,7 +4,7 @@ import * as Path from 'node:path'
4
4
  import {
5
5
  cmp, camelify, names,
6
6
  Content, File, Folder, Fragment,
7
- entityClassName,
7
+ entityClassName, entityCollection,
8
8
  } from '@voxgig/sdkgen'
9
9
 
10
10
  import {
@@ -22,7 +22,7 @@ const Entity = cmp(function Entity(props: any) {
22
22
  // Collision-free entity CLASS name (see entityClassName): normally
23
23
  // `<Name>Entity`, but disambiguated when it would clash with another
24
24
  // entity's data-type name.
25
- const entityColl = getModelPath(model, `main.${KIT}.entity`)
25
+ const entityColl = entityCollection(model)
26
26
  const cls = entityClassName(entity, entityColl)
27
27
 
28
28
  const entrep = {
@@ -38,7 +38,7 @@ const Entity = cmp(function Entity(props: any) {
38
38
 
39
39
  File({ name: cls + '.' + target.ext }, () => {
40
40
 
41
- const opnames = Object.keys(entity.op)
41
+ const opnames = Object.keys(entity.op || {})
42
42
 
43
43
  // For each CRUD op: if the spec defines it, splice in the real
44
44
  // implementation (an override). Otherwise leave the base-class
@@ -1,5 +1,5 @@
1
1
 
2
- import { cmp, Content, entityClassName } from '@voxgig/sdkgen'
2
+ import { cmp, Content, entityClassName, entityCollection } from '@voxgig/sdkgen'
3
3
 
4
4
  import {
5
5
  KIT,
@@ -12,7 +12,7 @@ const MainEntity = cmp(async function MainEntity(props: any) {
12
12
  const { model } = props.ctx$
13
13
 
14
14
  // Collision-free entity CLASS name (see entityClassName).
15
- const entityColl = getModelPath(model, `main.${KIT}.entity`)
15
+ const entityColl = entityCollection(model)
16
16
  const cls = entityClassName(entity, entityColl)
17
17
 
18
18
  // C# keeps the PascalCase accessor: public members are PascalCase, so a
@@ -31,7 +31,7 @@ const Package = cmp(async function Package(props: any) {
31
31
  const { repoUrl } = repoInfo(model)
32
32
 
33
33
  const deps: Record<string, string> = {}
34
- for (const d of collectDeps(model, target.name, target.deps)) {
34
+ for (const d of collectDeps(model, target.name, target.deps, ctx$.log)) {
35
35
  deps[d.name] = d.source === 'target' ? (d.version || '0.0.0') : d.version
36
36
  }
37
37