@voxgig/sdkgen 4.8.2 → 4.9.0

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 (407) hide show
  1. package/bin/voxgig-sdkgen +1 -1
  2. package/dist/action/doctor.d.ts +1 -0
  3. package/dist/action/doctor.js +50 -2
  4. package/dist/action/doctor.js.map +1 -1
  5. package/dist/helpers/naming.js +4 -2
  6. package/dist/helpers/naming.js.map +1 -1
  7. package/dist/tsconfig.tsbuildinfo +1 -1
  8. package/model/sdkgen.aon +21 -0
  9. package/package.json +1 -1
  10. package/project/.sdk/model/feature/secrets.aon +120 -18
  11. package/project/.sdk/model/target/c.aon +10 -0
  12. package/project/.sdk/model/target/clojure.aon +13 -0
  13. package/project/.sdk/model/target/cpp.aon +10 -0
  14. package/project/.sdk/model/target/csharp.aon +9 -0
  15. package/project/.sdk/model/target/dart.aon +10 -0
  16. package/project/.sdk/model/target/elixir.aon +9 -0
  17. package/project/.sdk/model/target/go.aon +13 -0
  18. package/project/.sdk/model/target/java.aon +9 -0
  19. package/project/.sdk/model/target/js.aon +7 -0
  20. package/project/.sdk/model/target/kotlin.aon +9 -0
  21. package/project/.sdk/model/target/lean.aon +17 -0
  22. package/project/.sdk/model/target/lua.aon +8 -0
  23. package/project/.sdk/model/target/ocaml.aon +9 -0
  24. package/project/.sdk/model/target/perl.aon +8 -0
  25. package/project/.sdk/model/target/php.aon +8 -0
  26. package/project/.sdk/model/target/py.aon +13 -0
  27. package/project/.sdk/model/target/rb.aon +8 -0
  28. package/project/.sdk/model/target/rust.aon +10 -0
  29. package/project/.sdk/model/target/scala.aon +21 -2
  30. package/project/.sdk/model/target/swift.aon +18 -0
  31. package/project/.sdk/model/target/ts.aon +13 -0
  32. package/project/.sdk/model/target/zig.aon +9 -0
  33. package/project/.sdk/src/cmp/clojure/Package_clojure.ts +9 -2
  34. package/project/.sdk/src/cmp/cpp/Gitignore_cpp.ts +3 -0
  35. package/project/.sdk/src/cmp/dart/Test_dart.ts +2 -0
  36. package/project/.sdk/src/cmp/elixir/Package_elixir.ts +4 -1
  37. package/project/.sdk/src/cmp/go/Config_go.ts +59 -2
  38. package/project/.sdk/src/cmp/go/Main_go.ts +8 -2
  39. package/project/.sdk/src/cmp/java/Test_java.ts +6 -5
  40. package/project/.sdk/src/cmp/kotlin/Test_kotlin.ts +6 -5
  41. package/project/.sdk/src/cmp/lean/Package_lean.ts +23 -0
  42. package/project/.sdk/src/cmp/lean/ReadmeInstall_lean.ts +1 -0
  43. package/project/.sdk/src/cmp/lean/ReadmeTopTest_lean.ts +1 -0
  44. package/project/.sdk/src/cmp/ocaml/Gitignore_ocaml.ts +1 -0
  45. package/project/.sdk/src/cmp/ocaml/Main_ocaml.ts +7 -3
  46. package/project/.sdk/src/cmp/py/Config_py.ts +82 -1
  47. package/project/.sdk/src/cmp/py/Main_py.ts +44 -0
  48. package/project/.sdk/src/cmp/py/fragment/Main.fragment.py +2 -0
  49. package/project/.sdk/src/cmp/swift/Main_swift.ts +10 -0
  50. package/project/.sdk/src/cmp/swift/Package_swift.ts +13 -1
  51. package/project/.sdk/src/cmp/ts/Config_ts.ts +42 -17
  52. package/project/.sdk/src/cmp/ts/fragment/Config.data.fragment.ts +13 -1
  53. package/project/.sdk/src/cmp/ts/fragment/Config.fragment.ts +13 -1
  54. package/project/.sdk/src/cmp/zig/Package_zig.ts +15 -11
  55. package/project/.sdk/src/cmp/zig/fragment/Entity.fragment.zig +3 -3
  56. package/project/.sdk/src/cmp/zig/fragment/EntityListOp.fragment.zig +3 -3
  57. package/project/.sdk/src/cmp/zig/fragment/Main.fragment.zig +3 -3
  58. package/project/.sdk/src/cmp/zig/utility_zig.ts +50 -1
  59. package/project/.sdk/tm/c/Makefile +38 -3
  60. package/project/.sdk/tm/c/tests/omni_resolver.h +361 -0
  61. package/project/.sdk/tm/c/tests/omni_smoke_test.c +237 -0
  62. package/project/.sdk/tm/c/tests/primary_corpus_test.c +205 -284
  63. package/project/.sdk/tm/c/tests/struct_corpus_test.c +292 -212
  64. package/project/.sdk/tm/c/tests/vendor/omni/json.c +811 -0
  65. package/project/.sdk/tm/c/tests/vendor/omni/omni.h +240 -0
  66. package/project/.sdk/tm/c/tests/vendor/omni/runner.c +940 -0
  67. package/project/.sdk/tm/c/tests/vendor/omni/util.c +351 -0
  68. package/project/.sdk/tm/c/utility/struct/utility.c +7 -2
  69. package/project/.sdk/tm/clojure/test/sdk/test/omni.clj +401 -0
  70. package/project/.sdk/tm/clojure/test/sdk/test/omni_smoke.clj +81 -0
  71. package/project/.sdk/tm/clojure/test/sdk/test/primary.clj +92 -58
  72. package/project/.sdk/tm/clojure/test/sdk/test/struct_corpus.clj +122 -149
  73. package/project/.sdk/tm/clojure/test/sdk/test_runner.clj +8 -3
  74. package/project/.sdk/tm/clojure/test/vendor/omni/voxgig/omni/json.clj +145 -0
  75. package/project/.sdk/tm/clojure/test/vendor/omni/voxgig/omni/runner.clj +445 -0
  76. package/project/.sdk/tm/clojure/test/vendor/omni/voxgig/omni/util.clj +145 -0
  77. package/project/.sdk/tm/cpp/Makefile +5 -1
  78. package/project/.sdk/tm/cpp/test/omni_resolver.hpp +473 -0
  79. package/project/.sdk/tm/cpp/test/omni_smoke_test.cpp +209 -0
  80. package/project/.sdk/tm/cpp/test/primary_utility_test.cpp +243 -184
  81. package/project/.sdk/tm/cpp/test/runner_support.hpp +68 -181
  82. package/project/.sdk/tm/cpp/test/struct_corpus_test.cpp +183 -56
  83. package/project/.sdk/tm/cpp/test/vendor/omni/json.hpp +406 -0
  84. package/project/.sdk/tm/cpp/test/vendor/omni/omni.hpp +751 -0
  85. package/project/.sdk/tm/cpp/test/vendor/omni/util.hpp +256 -0
  86. package/project/.sdk/tm/cpp/utility/pipeline.hpp +7 -1
  87. package/project/.sdk/tm/csharp/test/OmniResolver.cs +491 -0
  88. package/project/.sdk/tm/csharp/test/OmniSmokeTest.cs +106 -0
  89. package/project/.sdk/tm/csharp/test/PrimaryUtilityTest.cs +299 -316
  90. package/project/.sdk/tm/csharp/test/Runner.cs +104 -269
  91. package/project/.sdk/tm/csharp/test/StructUtilityTest.cs +535 -724
  92. package/project/.sdk/tm/csharp/test/vendor/omni/Runner.cs +864 -0
  93. package/project/.sdk/tm/csharp/test/vendor/omni/Util.cs +347 -0
  94. package/project/.sdk/tm/csharp/utility/MakeSpec.cs +3 -1
  95. package/project/.sdk/tm/csharp/utility/PrepareMethod.cs +6 -1
  96. package/project/.sdk/tm/csharp/utility/struct/Struct.cs +21 -5
  97. package/project/.sdk/tm/dart/test/omni.dart +520 -0
  98. package/project/.sdk/tm/dart/test/omni_smoke_test.dart +143 -0
  99. package/project/.sdk/tm/dart/test/primary_test.dart +86 -28
  100. package/project/.sdk/tm/dart/test/struct_test.dart +438 -11
  101. package/project/.sdk/tm/dart/test/vendor/omni/omni.dart +7 -0
  102. package/project/.sdk/tm/dart/test/vendor/omni/runner.dart +653 -0
  103. package/project/.sdk/tm/dart/test/vendor/omni/util.dart +232 -0
  104. package/project/.sdk/tm/elixir/Makefile +11 -3
  105. package/project/.sdk/tm/elixir/test/omni_smoke_test.exs +117 -0
  106. package/project/.sdk/tm/elixir/test/primary_utility_test.exs +341 -16
  107. package/project/.sdk/tm/elixir/test/struct_corpus_test.exs +554 -9
  108. package/project/.sdk/tm/elixir/test/support/omni.ex +377 -0
  109. package/project/.sdk/tm/elixir/test/vendor/omni/json.ex +122 -0
  110. package/project/.sdk/tm/elixir/test/vendor/omni/runner.ex +623 -0
  111. package/project/.sdk/tm/elixir/test/vendor/omni/util.ex +187 -0
  112. package/project/.sdk/tm/go/core/context.go +32 -16
  113. package/project/.sdk/tm/go/feature/secrets/plugin/capability.go +261 -0
  114. package/project/.sdk/tm/go/feature/secrets/plugin/catalog.go +78 -0
  115. package/project/.sdk/tm/go/feature/secrets/plugin/config.go +652 -0
  116. package/project/.sdk/tm/go/feature/secrets/plugin/depend.go +250 -0
  117. package/project/.sdk/tm/go/feature/secrets/plugin/env.go +194 -0
  118. package/project/.sdk/tm/go/feature/secrets/plugin/export.go +80 -0
  119. package/project/.sdk/tm/go/feature/secrets/plugin/graph.go +238 -0
  120. package/project/.sdk/tm/go/feature/secrets/plugin/host.go +1575 -0
  121. package/project/.sdk/tm/go/feature/secrets/plugin/order.go +248 -0
  122. package/project/.sdk/tm/go/feature/secrets/plugin/point.go +184 -0
  123. package/project/.sdk/tm/go/feature/secrets/plugin/ref.go +123 -0
  124. package/project/.sdk/tm/go/feature/secrets/plugin/resolve.go +79 -0
  125. package/project/.sdk/tm/go/feature/secrets/plugin/types.go +296 -0
  126. package/project/.sdk/tm/go/feature/secrets/plugin/util.go +87 -0
  127. package/project/.sdk/tm/go/feature/secrets/plugin/version.go +161 -0
  128. package/project/.sdk/tm/go/feature/secrets/plugins/aws/aws.go +292 -0
  129. package/project/.sdk/tm/go/feature/secrets/plugins/aws/sigv4.go +201 -0
  130. package/project/.sdk/tm/go/feature/secrets/plugins/azuresecrets/azuresecrets.go +187 -0
  131. package/project/.sdk/tm/go/feature/secrets/plugins/boru/boru.go +184 -0
  132. package/project/.sdk/tm/go/feature/secrets/plugins/doppler/doppler.go +114 -0
  133. package/project/.sdk/tm/go/feature/secrets/plugins/gcpsecrets/gcpsecrets.go +156 -0
  134. package/project/.sdk/tm/go/feature/secrets/plugins/hashicorp/hashicorp.go +208 -0
  135. package/project/.sdk/tm/go/feature/secrets/plugins/httpjson/httpjson.go +241 -0
  136. package/project/.sdk/tm/go/feature/secrets/plugins/infisical/infisical.go +150 -0
  137. package/project/.sdk/tm/go/feature/secrets/plugins/onepassword/onepassword.go +152 -0
  138. package/project/.sdk/tm/go/feature/secrets/plugins/secretspec/secretspec.go +143 -0
  139. package/project/.sdk/tm/go/feature/secrets/sekreto/addr.go +120 -0
  140. package/project/.sdk/tm/go/feature/secrets/sekreto/providers.go +442 -0
  141. package/project/.sdk/tm/go/feature/secrets/sekreto/sekreto.go +714 -0
  142. package/project/.sdk/tm/go/feature/secrets_feature.go +675 -0
  143. package/project/.sdk/tm/go/src/feature/secrets/.gitkeep +0 -0
  144. package/project/.sdk/tm/go/test/feature/secrets/secrets_feature_test.go +799 -0
  145. package/project/.sdk/tm/go/test/omni/omni.go +902 -0
  146. package/project/.sdk/tm/go/test/omni/util.go +381 -0
  147. package/project/.sdk/tm/go/test/omniresolver_test.go +748 -0
  148. package/project/.sdk/tm/go/test/omnismoke_test.go +112 -0
  149. package/project/.sdk/tm/go/test/primary_utility_test.go +123 -191
  150. package/project/.sdk/tm/go/test/struct_utility_test.go +323 -16
  151. package/project/.sdk/tm/go/test/testsupport_test.go +294 -0
  152. package/project/.sdk/tm/go/utility/make_options.go +8 -1
  153. package/project/.sdk/tm/go/utility/prepare_method.go +5 -1
  154. package/project/.sdk/tm/go/utility/struct/voxgigstruct.go +2 -2
  155. package/project/.sdk/tm/java/test/OmniResolver.java +355 -0
  156. package/project/.sdk/tm/java/test/OmniSmokeTest.java +99 -0
  157. package/project/.sdk/tm/java/test/PrimaryUtilityTest.java +254 -280
  158. package/project/.sdk/tm/java/test/RunnerSupport.java +9 -194
  159. package/project/.sdk/tm/java/test/StructCorpusTest.java +119 -42
  160. package/project/.sdk/tm/java/test/vendor/omni/Json.java +287 -0
  161. package/project/.sdk/tm/java/test/vendor/omni/Runner.java +851 -0
  162. package/project/.sdk/tm/java/test/vendor/omni/Util.java +322 -0
  163. package/project/.sdk/tm/java/utility/MakeSpec.java +3 -1
  164. package/project/.sdk/tm/java/utility/PrepareMethod.java +5 -5
  165. package/project/.sdk/tm/java/utility/struct/Struct.java +17 -4
  166. package/project/.sdk/tm/js/src/utility/StructUtility.js +3 -3
  167. package/project/.sdk/tm/js/test/omni.js +251 -0
  168. package/project/.sdk/tm/js/test/omni.test.js +105 -0
  169. package/project/.sdk/tm/js/test/utility/PrimaryUtility.test.js +6 -2
  170. package/project/.sdk/tm/js/test/utility/StructUtility.test.js +27 -2
  171. package/project/.sdk/tm/js/test/vendor/omni/index.js +77 -0
  172. package/project/.sdk/tm/js/test/vendor/omni/runner.js +628 -0
  173. package/project/.sdk/tm/js/test/vendor/omni/util.js +229 -0
  174. package/project/.sdk/tm/kotlin/core/Utility.kt +1 -1
  175. package/project/.sdk/tm/kotlin/test/OmniResolver.kt +343 -0
  176. package/project/.sdk/tm/kotlin/test/OmniSmokeTest.kt +100 -0
  177. package/project/.sdk/tm/kotlin/test/PrimaryUtilityTest.kt +244 -262
  178. package/project/.sdk/tm/kotlin/test/RunnerSupport.kt +9 -178
  179. package/project/.sdk/tm/kotlin/test/StructCorpusTest.kt +121 -32
  180. package/project/.sdk/tm/kotlin/test/vendor/omni/Json.kt +264 -0
  181. package/project/.sdk/tm/kotlin/test/vendor/omni/Runner.kt +615 -0
  182. package/project/.sdk/tm/kotlin/test/vendor/omni/Util.kt +139 -0
  183. package/project/.sdk/tm/kotlin/utility/MakeSpecUrl.kt +6 -3
  184. package/project/.sdk/tm/kotlin/utility/Prepare.kt +6 -6
  185. package/project/.sdk/tm/kotlin/utility/struct/Struct.kt +18 -2
  186. package/project/.sdk/tm/lean/Makefile +12 -5
  187. package/project/.sdk/tm/lean/src/SdkUtility.lean +14 -1
  188. package/project/.sdk/tm/lean/test/OmniResolver.lean +358 -0
  189. package/project/.sdk/tm/lean/test/OmniSmoke.lean +174 -0
  190. package/project/.sdk/tm/lean/test/StructCorpus.lean +245 -574
  191. package/project/.sdk/tm/lean/test/TPrimaryUtility.lean +155 -291
  192. package/project/.sdk/tm/lean/test/vendor/omni/Omni.lean +997 -0
  193. package/project/.sdk/tm/lua/test/omni.lua +456 -0
  194. package/project/.sdk/tm/lua/test/omni_smoke_test.lua +103 -0
  195. package/project/.sdk/tm/lua/test/primary_utility_test.lua +250 -509
  196. package/project/.sdk/tm/lua/test/struct_utility_test.lua +161 -70
  197. package/project/.sdk/tm/lua/test/vendor/omni/json.lua +268 -0
  198. package/project/.sdk/tm/lua/test/vendor/omni/regex.lua +385 -0
  199. package/project/.sdk/tm/lua/test/vendor/omni/runner.lua +641 -0
  200. package/project/.sdk/tm/lua/test/vendor/omni/util.lua +282 -0
  201. package/project/.sdk/tm/lua/utility/prepare_method.lua +5 -1
  202. package/project/.sdk/tm/lua/utility/struct/regex.lua +663 -0
  203. package/project/.sdk/tm/lua/utility/struct/struct.lua +660 -420
  204. package/project/.sdk/tm/ocaml/Makefile +37 -12
  205. package/project/.sdk/tm/ocaml/test/omni_resolver.ml +284 -0
  206. package/project/.sdk/tm/ocaml/test/omni_smoke_test.ml +169 -0
  207. package/project/.sdk/tm/ocaml/test/primary_utility_test.ml +84 -100
  208. package/project/.sdk/tm/ocaml/test/struct_corpus.ml +225 -201
  209. package/project/.sdk/tm/ocaml/test/vendor/omni/omni.ml +1157 -0
  210. package/project/.sdk/tm/perl/lib/Voxgig/Struct.pm +88 -12
  211. package/project/.sdk/tm/perl/t/omni.pm +647 -0
  212. package/project/.sdk/tm/perl/t/omni_smoke.t +87 -0
  213. package/project/.sdk/tm/perl/t/primary_utility.t +189 -487
  214. package/project/.sdk/tm/perl/t/struct_utility.t +455 -389
  215. package/project/.sdk/tm/perl/t/vendor/omni/Voxgig/Omni/Runner.pm +649 -0
  216. package/project/.sdk/tm/perl/t/vendor/omni/Voxgig/Omni/Util.pm +253 -0
  217. package/project/.sdk/tm/perl/t/vendor/omni/Voxgig/Omni.pm +24 -0
  218. package/project/.sdk/tm/perl/utility/prepare_method.pm +7 -2
  219. package/project/.sdk/tm/php/test/Omni.php +691 -0
  220. package/project/.sdk/tm/php/test/OmniSmokeTest.php +93 -0
  221. package/project/.sdk/tm/php/test/PrimaryUtilityTest.php +210 -571
  222. package/project/.sdk/tm/php/test/StructUtilityTest.php +320 -342
  223. package/project/.sdk/tm/php/test/vendor/omni/Runner.php +644 -0
  224. package/project/.sdk/tm/php/test/vendor/omni/Util.php +283 -0
  225. package/project/.sdk/tm/php/utility/MakeSpec.php +10 -3
  226. package/project/.sdk/tm/php/utility/PrepareBody.php +7 -1
  227. package/project/.sdk/tm/php/utility/PrepareMethod.php +6 -2
  228. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/__init__.py +36 -0
  229. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/capability.py +141 -0
  230. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/catalog.py +50 -0
  231. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/config.py +333 -0
  232. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/depend.py +198 -0
  233. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/env.py +147 -0
  234. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/export.py +52 -0
  235. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/graph.py +139 -0
  236. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/host.py +1053 -0
  237. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/order.py +171 -0
  238. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/point.py +95 -0
  239. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/ref.py +116 -0
  240. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/resolve.py +59 -0
  241. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/types.py +87 -0
  242. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/version.py +112 -0
  243. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/__init__.py +76 -0
  244. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/addr.py +116 -0
  245. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/aws.py +192 -0
  246. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/azuresecrets.py +120 -0
  247. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/boru.py +140 -0
  248. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/doppler.py +62 -0
  249. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/gcpsecrets.py +101 -0
  250. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/hashicorp.py +151 -0
  251. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/httpjson.py +115 -0
  252. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/infisical.py +90 -0
  253. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/onepassword.py +101 -0
  254. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/secretspec.py +119 -0
  255. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/sigv4.py +125 -0
  256. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/providers.py +211 -0
  257. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/sekreto.py +475 -0
  258. package/project/.sdk/tm/py/pkg/feature/secrets_feature.py +467 -0
  259. package/project/.sdk/tm/py/pkg/utility/prepare_method.py +5 -1
  260. package/project/.sdk/tm/py/pkg/utility/voxgig_struct/__init__.py +0 -2
  261. package/project/.sdk/tm/py/pkg/utility/voxgig_struct/voxgig_struct.py +780 -529
  262. package/project/.sdk/tm/py/src/feature/secrets/.gitkeep +0 -0
  263. package/project/.sdk/tm/py/test/feature/__init__.py +0 -0
  264. package/project/.sdk/tm/py/test/feature/secrets/__init__.py +0 -0
  265. package/project/.sdk/tm/py/test/feature/secrets/test_secrets.py +337 -0
  266. package/project/.sdk/tm/py/test/omni.py +415 -0
  267. package/project/.sdk/tm/py/test/test_omni_smoke.py +74 -0
  268. package/project/.sdk/tm/py/test/test_primary_utility.py +144 -668
  269. package/project/.sdk/tm/py/test/test_struct_utility.py +74 -27
  270. package/project/.sdk/tm/py/test/voxgig_omni/__init__.py +62 -0
  271. package/project/.sdk/tm/py/test/voxgig_omni/runner.py +580 -0
  272. package/project/.sdk/tm/py/test/voxgig_omni/util.py +252 -0
  273. package/project/.sdk/tm/rb/test/omni.rb +505 -0
  274. package/project/.sdk/tm/rb/test/omni_smoke_test.rb +72 -0
  275. package/project/.sdk/tm/rb/test/primary_utility_test.rb +174 -560
  276. package/project/.sdk/tm/rb/test/struct_utility_test.rb +13 -7
  277. package/project/.sdk/tm/rb/test/vendor/omni/runner.rb +493 -0
  278. package/project/.sdk/tm/rb/test/vendor/omni/util.rb +199 -0
  279. package/project/.sdk/tm/rb/test/vendor/omni/voxgig_omni.rb +15 -0
  280. package/project/.sdk/tm/rb/utility/prepare_method.rb +5 -1
  281. package/project/.sdk/tm/rust/tests/common/mod.rs +19 -242
  282. package/project/.sdk/tm/rust/tests/omni_resolver/mod.rs +888 -0
  283. package/project/.sdk/tm/rust/tests/omni_smoke_test.rs +286 -0
  284. package/project/.sdk/tm/rust/tests/primary_utility_test.rs +318 -312
  285. package/project/.sdk/tm/rust/tests/struct_utility_test.rs +66 -28
  286. package/project/.sdk/tm/rust/tests/vendor/omni/json.rs +412 -0
  287. package/project/.sdk/tm/rust/tests/vendor/omni/mod.rs +38 -0
  288. package/project/.sdk/tm/rust/tests/vendor/omni/regex.rs +392 -0
  289. package/project/.sdk/tm/rust/tests/vendor/omni/runner.rs +1001 -0
  290. package/project/.sdk/tm/rust/tests/vendor/omni/util.rs +161 -0
  291. package/project/.sdk/tm/rust/utility/prepare_method.rs +5 -1
  292. package/project/.sdk/tm/scala/Makefile +16 -6
  293. package/project/.sdk/tm/scala/sdktest/OmniResolver.scala +497 -0
  294. package/project/.sdk/tm/scala/sdktest/OmniSmoke.scala +192 -0
  295. package/project/.sdk/tm/scala/sdktest/PrimaryCorpus.scala +47 -19
  296. package/project/.sdk/tm/scala/sdktest/StructCorpus.scala +0 -0
  297. package/project/.sdk/tm/scala/sdktest/vendor/omni/Json.scala +229 -0
  298. package/project/.sdk/tm/scala/sdktest/vendor/omni/Runner.scala +552 -0
  299. package/project/.sdk/tm/scala/sdktest/vendor/omni/Util.scala +104 -0
  300. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/Constants.swift +10 -0
  301. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/Inject.swift +28 -5
  302. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/Injection.swift +5 -1
  303. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/Minor.swift +4 -1
  304. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/Validate.swift +15 -5
  305. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/utility/Prepare.swift +6 -1
  306. package/project/.sdk/tm/swift/Tests/ProjectNameSDKTests/OmniResolver.swift +474 -0
  307. package/project/.sdk/tm/swift/Tests/ProjectNameSDKTests/OmniSmokeTest.swift +107 -0
  308. package/project/.sdk/tm/swift/Tests/ProjectNameSDKTests/PrimaryUtilityTest.swift +141 -178
  309. package/project/.sdk/tm/swift/Tests/ProjectNameSDKTests/Runner.swift +17 -113
  310. package/project/.sdk/tm/swift/Tests/ProjectNameSDKTests/StructUtilityTest.swift +295 -446
  311. package/project/.sdk/tm/swift/Tests/vendor/omni/Json.swift +364 -0
  312. package/project/.sdk/tm/swift/Tests/vendor/omni/Runner.swift +730 -0
  313. package/project/.sdk/tm/swift/Tests/vendor/omni/Util.swift +162 -0
  314. package/project/.sdk/tm/ts/src/feature/secrets/SecretsFeature.ts +7 -0
  315. package/project/.sdk/tm/ts/src/feature/secrets/plugin/Capability.ts +148 -0
  316. package/project/.sdk/tm/ts/src/feature/secrets/plugin/Catalog.ts +55 -0
  317. package/project/.sdk/tm/ts/src/feature/secrets/plugin/Config.ts +344 -0
  318. package/project/.sdk/tm/ts/src/feature/secrets/plugin/Depend.ts +205 -0
  319. package/project/.sdk/tm/ts/src/feature/secrets/plugin/Env.ts +138 -0
  320. package/project/.sdk/tm/ts/src/feature/secrets/plugin/Export.ts +46 -0
  321. package/project/.sdk/tm/ts/src/feature/secrets/plugin/FeatureHost.ts +349 -0
  322. package/project/.sdk/tm/ts/src/feature/secrets/plugin/Graph.ts +181 -0
  323. package/project/.sdk/tm/ts/src/feature/secrets/plugin/Host.ts +1132 -0
  324. package/project/.sdk/tm/ts/src/feature/secrets/plugin/Order.ts +177 -0
  325. package/project/.sdk/tm/ts/src/feature/secrets/plugin/Point.ts +119 -0
  326. package/project/.sdk/tm/ts/src/feature/secrets/plugin/Ref.ts +102 -0
  327. package/project/.sdk/tm/ts/src/feature/secrets/plugin/Resolve.ts +61 -0
  328. package/project/.sdk/tm/ts/src/feature/secrets/plugin/Types.ts +112 -0
  329. package/project/.sdk/tm/ts/src/feature/secrets/plugin/Version.ts +100 -0
  330. package/project/.sdk/tm/ts/src/feature/secrets/plugin/index.ts +37 -0
  331. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/Sekreto.ts +163 -30
  332. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/index.ts +27 -22
  333. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/{provider → plugins}/aws.ts +26 -36
  334. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/{provider → plugins}/azuresecrets.ts +19 -21
  335. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/{provider → plugins}/boru.ts +36 -17
  336. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/{provider → plugins}/doppler.ts +14 -21
  337. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/{provider → plugins}/gcpsecrets.ts +27 -27
  338. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/{provider → plugins}/hashicorp.ts +25 -39
  339. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/plugins/httpjson.ts +99 -0
  340. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/{provider → plugins}/infisical.ts +14 -16
  341. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/{provider → plugins}/onepassword.ts +15 -22
  342. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/plugins/secretspec.ts +98 -0
  343. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/{Sigv4.ts → plugins/sigv4.ts} +7 -6
  344. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/addr.ts +97 -23
  345. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/builtin.ts +37 -0
  346. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/dotenv.ts +4 -17
  347. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/env.ts +4 -16
  348. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/file.ts +11 -25
  349. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/memory.ts +6 -23
  350. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/support.ts +106 -39
  351. package/project/.sdk/tm/ts/src/utility/StructUtility.ts +3 -3
  352. package/project/.sdk/tm/ts/test/omni.ts +104 -32
  353. package/project/.sdk/tm/ts/test/utility/StructUtility.test.ts +27 -0
  354. package/project/.sdk/tm/ts/test/vendor/omni/Runner.ts +32 -5
  355. package/project/.sdk/tm/ts/test/vendor/omni/Util.ts +2 -2
  356. package/project/.sdk/tm/ts/test/vendor/omni/index.ts +2 -2
  357. package/project/.sdk/tm/zig/Makefile +15 -1
  358. package/project/.sdk/tm/zig/build.zig +23 -5
  359. package/project/.sdk/tm/zig/core/helpers.zig +52 -11
  360. package/project/.sdk/tm/zig/core/mem.zig +17 -1
  361. package/project/.sdk/tm/zig/core/utility.zig +23 -19
  362. package/project/.sdk/tm/zig/feature/audit.zig +2 -2
  363. package/project/.sdk/tm/zig/feature/cache.zig +2 -2
  364. package/project/.sdk/tm/zig/feature/debug.zig +5 -5
  365. package/project/.sdk/tm/zig/feature/netsim.zig +2 -2
  366. package/project/.sdk/tm/zig/feature/paging.zig +2 -2
  367. package/project/.sdk/tm/zig/feature/proxy.zig +15 -8
  368. package/project/.sdk/tm/zig/feature/streaming.zig +5 -5
  369. package/project/.sdk/tm/zig/feature/support.zig +3 -3
  370. package/project/.sdk/tm/zig/feature/telemetry.zig +5 -5
  371. package/project/.sdk/tm/zig/feature/test.zig +10 -5
  372. package/project/.sdk/tm/zig/test/fh.zig +10 -10
  373. package/project/.sdk/tm/zig/test/gotcha_test.zig +5 -5
  374. package/project/.sdk/tm/zig/test/omniresolver.zig +515 -0
  375. package/project/.sdk/tm/zig/test/omnismoke_test.zig +284 -0
  376. package/project/.sdk/tm/zig/test/pipeline_test.zig +8 -8
  377. package/project/.sdk/tm/zig/test/primary_utility_test.zig +145 -155
  378. package/project/.sdk/tm/zig/test/struct_corpus.zig +264 -187
  379. package/project/.sdk/tm/zig/test/vendor/omni/omni.zig +1314 -0
  380. package/project/.sdk/tm/zig/test/vendor/omni/regex.zig +446 -0
  381. package/project/.sdk/tm/zig/utility/voxgigstruct/regex.zig +7 -4
  382. package/project/.sdk/tm/zig/utility/voxgigstruct/struct.zig +356 -157
  383. package/project/sdkgen-package.json +1 -1
  384. package/src/action/doctor.ts +66 -2
  385. package/src/helpers/naming.ts +4 -2
  386. package/project/.sdk/tm/c/tests/runner.h +0 -274
  387. package/project/.sdk/tm/cpp/test/struct_runner.hpp +0 -314
  388. package/project/.sdk/tm/csharp/test/StructRunner.cs +0 -276
  389. package/project/.sdk/tm/dart/test/runner.dart +0 -406
  390. package/project/.sdk/tm/dart/test/struct_corpus.dart +0 -531
  391. package/project/.sdk/tm/elixir/test/support/struct_corpus.ex +0 -1088
  392. package/project/.sdk/tm/go/test/runner_test.go +0 -629
  393. package/project/.sdk/tm/go/test/struct_runner_test.go +0 -1094
  394. package/project/.sdk/tm/java/test/StructRunner.java +0 -281
  395. package/project/.sdk/tm/js/test/runner.js +0 -387
  396. package/project/.sdk/tm/kotlin/test/StructRunner.kt +0 -177
  397. package/project/.sdk/tm/lua/test/struct_runner.lua +0 -602
  398. package/project/.sdk/tm/ocaml/test/corpus_runner.ml +0 -185
  399. package/project/.sdk/tm/perl/t/struct_runner.pm +0 -275
  400. package/project/.sdk/tm/php/test/StructRunner.php +0 -275
  401. package/project/.sdk/tm/py/test/struct_runner.py +0 -411
  402. package/project/.sdk/tm/rb/test/struct_runner.rb +0 -309
  403. package/project/.sdk/tm/rust/tests/struct_runner/mod.rs +0 -424
  404. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/Registry.ts +0 -90
  405. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/http.ts +0 -66
  406. package/project/.sdk/tm/ts/test/vendor/omni/compat.ts +0 -188
  407. package/project/.sdk/tm/zig/test/struct_runner.zig +0 -464
@@ -1,8 +1,25 @@
1
1
  #!perl
2
2
  # ProjectName SDK primary utility test
3
3
  #
4
- # Drives the primary utility test corpus (.sdk/test/test.json "primary")
5
- # through the client's utility view, mirroring the rb primary_utility_test.
4
+ # Corpus sections run through the vendored omni runner, via the resolver
5
+ # in t/omni.pm (struct-runner shape over native Voxgig::Omni). The inline
6
+ # corpus engine this file used to carry is retired: omni resolves
7
+ # arguments, applies the null rules, and enforces out/err/match - the
8
+ # subjects below only adapt each utility's calling convention.
9
+ #
10
+ # Three conventions to know when adding a section:
11
+ #
12
+ # - Subjects receive the contextified entry as a map-face VIEW; unwrap the
13
+ # live blessed context with ProjectNameOmni::livectx before calling a
14
+ # utility (utilities call methods on it - `$ctx->make_error`).
15
+ #
16
+ # - Utilities that answer as a (value, err) PAIR go through _unwrap, which
17
+ # dies with the err so omni can match it against `err:` expectations.
18
+ # Utilities that answer bare values (or die) are passed straight in.
19
+ #
20
+ # - `match: {ctx: ...}` assertions read the LIVE context after the subject
21
+ # ran - the resolver's view presents the context object as the map omni
22
+ # walks, camelCase keys included.
6
23
 
7
24
  use strict;
8
25
  use warnings;
@@ -15,23 +32,37 @@ use Cwd ();
15
32
 
16
33
  use ProjectNameSDK;
17
34
 
35
+ require(Cwd::abs_path("$FindBin::Bin/omni.pm"));
36
+
18
37
  my $TEST_JSON = Cwd::abs_path("$FindBin::Bin/../../.sdk/test/test.json");
19
38
 
20
39
  unless (defined $TEST_JSON && -e $TEST_JSON) {
21
40
  plan skip_all => 'test.json corpus not found';
22
41
  }
23
42
 
24
- my $SPEC = do {
25
- open my $fh, '<:raw', $TEST_JSON or die "Cannot open $TEST_JSON: $!";
26
- local $/;
27
- Voxgig::Struct::parse_json(<$fh>);
28
- };
29
- my $PRIMARY = get_spec($SPEC, 'primary');
30
- ok(Voxgig::Struct::ismap($PRIMARY), 'primary section found in test.json');
43
+ my $_runner = ProjectNameOmni::make_runner($TEST_JSON, ProjectNameSDK->test(undef, undef));
44
+ my $_run = $_runner->('primary');
45
+
46
+ my $spec = $_run->{spec};
47
+ my $runset = $_run->{runset};
48
+ my $runsetflags = $_run->{runsetflags};
31
49
 
32
- my $client = ProjectNameSDK->test(undef, undef);
50
+ # Under the old inline runner the suite drove the SDK directly; under omni
51
+ # the runpack's client is the provider wrapping it. This suite treats the
52
+ # client as the SDK - so unwrap the real instance (mirrors ts/py).
53
+ my $client = $_run->{client}{sdk};
33
54
  my $utility = $client->get_utility;
34
55
 
56
+ ok(Voxgig::Struct::ismap($spec), 'primary section found in test.json');
57
+
58
+
59
+ # Sections deliberately left empty in the shared corpus
60
+ # (.sdk/test/primary/<name>.aon carries a PENDING header). Everything else
61
+ # MUST contribute cases.
62
+ my %PENDING = map { $_ => 1 } qw(
63
+ fetcher makeFetchDef makeResult featureAdd featureHook featureInit
64
+ );
65
+
35
66
 
36
67
  # === Helper packages ===
37
68
 
@@ -76,170 +107,57 @@ my $utility = $client->get_utility;
76
107
 
77
108
  # === Helpers ===
78
109
 
79
- sub get_spec {
80
- my ($spec, @keys) = @_;
81
- my $cur = $spec;
82
- for my $key (@keys) {
83
- return undef unless Voxgig::Struct::ismap($cur);
84
- $cur = $cur->{$key};
85
- }
86
- return Voxgig::Struct::ismap($cur) ? $cur : undef;
87
- }
88
-
89
- sub canon {
90
- my ($v) = @_;
91
- return Voxgig::Struct::_stringify_inner($v, 1);
92
- }
93
-
94
- sub match_string {
95
- my ($pattern, $val) = @_;
96
- if (length($pattern) >= 2 && '/' eq substr($pattern, 0, 1)
97
- && '/' eq substr($pattern, -1)) {
98
- my $re = substr($pattern, 1, length($pattern) - 2);
99
- return ("$val" =~ /$re/) ? 1 : 0;
100
- }
101
- return (index(lc "$val", lc $pattern) >= 0) ? 1 : 0;
102
- }
103
-
104
- sub match_deep {
105
- my ($label, $check, $base, $path) = @_;
106
- return 1 unless defined $check;
107
-
108
- if (Voxgig::Struct::ismap($check)) {
109
- for my $key (keys %$check) {
110
- my $base_val = Voxgig::Struct::ismap($base) ? $base->{$key} : undef;
111
- return 0 unless match_deep($label, $check->{$key}, $base_val, "$path.$key");
112
- }
113
- return 1;
114
- }
115
- if (Voxgig::Struct::islist($check)) {
116
- for my $ci (0 .. $#$check) {
117
- my $base_val = (Voxgig::Struct::islist($base) && $ci < @$base)
118
- ? $base->[$ci] : undef;
119
- return 0 unless match_deep($label, $check->[$ci], $base_val, "$path\[$ci\]");
120
- }
121
- return 1;
122
- }
123
-
124
- if (defined $check && !ref $check && '__EXISTS__' eq $check) {
125
- return 1 if defined $base;
126
- fail("$label: match $path: expected value to exist but got undef");
127
- return 0;
128
- }
129
- if (defined $check && !ref $check && '__UNDEF__' eq $check) {
130
- return 1 if !defined $base;
131
- fail("$label: match $path: expected undef but got " . canon($base));
132
- return 0;
133
- }
134
-
135
- return 1 if canon($check) eq canon($base);
136
-
137
- if (defined $check && !ref($check) && !Voxgig::Struct::is_jbool($check)
138
- && !Voxgig::Struct::is_jnull($check) && '' ne "$check") {
139
- my $base_str = defined $base ? "$base" : '';
140
- return 1 if match_string("$check", $base_str);
110
+ # Run one corpus section, failing loudly when it would run ZERO cases. A
111
+ # renamed section or a fixture that compiled to an empty `set` used to
112
+ # pass silently, which defeats the point of a shared oracle. EVERY
113
+ # corpus-backed test goes through here (mirrors ts/py). Each section is
114
+ # one assertion; omni's failure message carries the entry index, the entry
115
+ # and both values.
116
+ sub runsection {
117
+ my ($name, $subject) = @_;
118
+
119
+ my $section = (ref($spec) eq 'HASH') ? $spec->{$name} : undef;
120
+ unless (ref($section) eq 'HASH') {
121
+ fail("corpus section '$name' missing - check the name against .sdk/test/primary/");
122
+ return;
141
123
  }
142
-
143
- fail("$label: match $path: got " . canon($base) . ', want ' . canon($check));
144
- return 0;
145
- }
146
-
147
- # Run each entry of a test set through $subject (called with the entry;
148
- # returns the result and may die). Expected errors are matched by
149
- # substring / regex; "match" clauses are checked over {in,out,args,ctx}.
150
- sub runset {
151
- my ($label, $testspec, $subject) = @_;
152
- unless ($testspec) {
153
- pass("$label: no test set");
124
+ my $basic = $section->{basic};
125
+ unless (ref($basic) eq 'HASH' && ref($basic->{set}) eq 'ARRAY') {
126
+ fail("corpus section '$name' has no basic.set list");
154
127
  return;
155
128
  }
156
- my $set = $testspec->{set};
157
- unless (Voxgig::Struct::islist($set)) {
158
- pass("$label: empty test set");
129
+ if (0 == scalar(@{ $basic->{set} }) && !$PENDING{$name}) {
130
+ fail("corpus section '$name' is EMPTY - zero cases would run; add cases, "
131
+ . 'or mark the fixture PENDING in .sdk/test/primary/');
159
132
  return;
160
133
  }
161
134
 
162
- my $i = -1;
163
- for my $entry (@$set) {
164
- $i++;
165
- next unless Voxgig::Struct::ismap($entry);
166
- my $mark = defined $entry->{mark} ? " (mark=$entry->{mark})" : '';
167
- my $elabel = "$label entry $i$mark";
168
-
169
- my $result = eval { $subject->($entry) };
135
+ my $ok = eval { $runset->($basic, $subject); 1 };
136
+ if ($ok) { pass("$name.basic") }
137
+ else {
170
138
  my $err = $@;
171
-
172
- my $expected_err = $entry->{err};
173
-
174
- if ($err) {
175
- if (defined $expected_err) {
176
- my $err_msg = "$err";
177
- if (!ref $expected_err && !Voxgig::Struct::is_jbool($expected_err)) {
178
- unless (match_string("$expected_err", $err_msg)) {
179
- fail("$elabel: error mismatch: got [$err_msg], want contains [$expected_err]");
180
- next;
181
- }
182
- }
183
- # err: true means any error is acceptable
184
- if (Voxgig::Struct::ismap($entry->{match})) {
185
- my $result_map = {
186
- 'in' => $entry->{in},
187
- 'out' => undef,
188
- 'err' => { 'message' => "$err" },
189
- };
190
- $result_map->{ctx} = $entry->{ctx} if defined $entry->{ctx};
191
- next unless match_deep($elabel, $entry->{match}, $result_map, '');
192
- }
193
- pass($elabel);
194
- next;
195
- }
196
- fail("$elabel: unexpected error: $err");
197
- next;
198
- }
199
-
200
- if (defined $expected_err) {
201
- fail("$elabel: expected error containing " . canon($expected_err)
202
- . ' but got result: ' . canon($result));
203
- next;
204
- }
205
-
206
- my $matched = 0;
207
- if (Voxgig::Struct::ismap($entry->{match})) {
208
- my $result_map = {
209
- 'in' => $entry->{in},
210
- 'out' => $result,
211
- };
212
- if (defined $entry->{args}) {
213
- $result_map->{args} = $entry->{args};
214
- }
215
- elsif (defined $entry->{in}) {
216
- $result_map->{args} = [$entry->{in}];
217
- }
218
- $result_map->{ctx} = $entry->{ctx} if defined $entry->{ctx};
219
- next unless match_deep($elabel, $entry->{match}, $result_map, '');
220
- $matched = 1;
221
- }
222
-
223
- my $has_out = exists $entry->{out}
224
- && defined $entry->{out} && !Voxgig::Struct::is_jnull($entry->{out});
225
- if (!$has_out && $matched) {
226
- pass($elabel);
227
- next;
228
- }
229
-
230
- if ($has_out) {
231
- unless (canon($result) eq canon($entry->{out})) {
232
- fail("$elabel: output mismatch:\n got: " . canon($result)
233
- . "\n want: " . canon($entry->{out}));
234
- next;
235
- }
236
- }
237
-
238
- pass($elabel);
139
+ fail("$name.basic");
140
+ diag("$name.basic: $err");
239
141
  }
240
142
  return;
241
143
  }
242
144
 
145
+ # (value, err) pair convention -> value-or-die, omni's shape.
146
+ sub _unwrap {
147
+ my ($val, $err) = @_;
148
+ die $err if defined $err;
149
+ return $val;
150
+ }
151
+
152
+ sub _err_from_map {
153
+ my ($m) = @_;
154
+ return undef unless ref($m) eq 'HASH';
155
+ my $msg = $m->{message};
156
+ return undef unless defined $msg && !ref $msg && '' ne $msg;
157
+ my $code = defined $m->{code} ? $m->{code} : '';
158
+ return ProjectNameError->new($code, $msg);
159
+ }
160
+
243
161
  sub make_test_ctx {
244
162
  my ($c, $u, $overrides) = @_;
245
163
  my $ctxmap = {
@@ -270,68 +188,15 @@ sub make_test_full_ctx {
270
188
  return $ctx;
271
189
  }
272
190
 
273
- sub make_ctx_from_map {
274
- my ($ctxmap, $c, $u) = @_;
275
- $ctxmap = {} unless Voxgig::Struct::ismap($ctxmap);
276
-
277
- my $ctx = ProjectNameContext->new($ctxmap, undef);
278
-
279
- if ($c) {
280
- $ctx->{client} = $c;
281
- $ctx->{utility} = $u;
282
- }
283
- if (!defined $ctx->{options} && $c) {
284
- $ctx->{options} = $c->options_map;
285
- }
286
-
287
- # Handle spec from JSON map
288
- if (Voxgig::Struct::ismap($ctxmap->{spec})) {
289
- $ctx->{spec} = ProjectNameSpec->new($ctxmap->{spec});
290
- }
291
-
292
- # Handle result from JSON map
293
- if (Voxgig::Struct::ismap($ctxmap->{result})) {
294
- my $res_map = $ctxmap->{result};
295
- $ctx->{result} = ProjectNameResult->new($res_map);
296
- if (Voxgig::Struct::ismap($res_map->{err})
297
- && defined $res_map->{err}{message} && !ref $res_map->{err}{message}) {
298
- $ctx->{result}{err} = ProjectNameError->new('', $res_map->{err}{message});
299
- }
300
- }
301
-
302
- # Handle response from JSON map
303
- if (Voxgig::Struct::ismap($ctxmap->{response})) {
304
- my $resp_map = $ctxmap->{response};
305
- $ctx->{response} = ProjectNameResponse->new($resp_map);
306
- if (ProjectNameHelpers::rb_truthy($resp_map->{body})) {
307
- my $body_copy = $resp_map->{body};
308
- $ctx->{response}{json_func} = sub { $body_copy };
309
- }
310
- if (Voxgig::Struct::ismap($resp_map->{headers})) {
311
- my $lower = {};
312
- $lower->{lc $_} = $resp_map->{headers}{$_} for keys %{ $resp_map->{headers} };
313
- $ctx->{response}{headers} = $lower;
314
- }
315
- }
316
-
317
- return $ctx;
318
- }
319
-
320
- sub fixctx {
321
- my ($ctx, $c) = @_;
322
- if ($ctx && $ctx->{client} && !defined $ctx->{options}) {
323
- $ctx->{options} = $ctx->{client}->options_map;
324
- }
325
- return;
326
- }
327
-
328
- sub err_from_map {
329
- my ($m) = @_;
330
- return undef unless Voxgig::Struct::ismap($m);
331
- my $msg = $m->{message};
332
- return undef unless defined $msg && !ref $msg && '' ne $msg;
333
- my $code = defined $m->{code} ? $m->{code} : '';
334
- return ProjectNameError->new($code, $msg);
191
+ # DEF blocks are read from the LOADED spec, so clone before the in-place
192
+ # model conversion.
193
+ sub _def_setup {
194
+ my ($name) = @_;
195
+ my $section = (ref($spec) eq 'HASH') ? $spec->{$name} : undef;
196
+ my $setup = (ref($section) eq 'HASH' && ref($section->{DEF}) eq 'HASH'
197
+ && ref($section->{DEF}{setup}) eq 'HASH') ? $section->{DEF}{setup}{a} : undef;
198
+ return undef unless ref($setup) eq 'HASH';
199
+ return ProjectNameOmni::tostruct(Voxgig::Omni::Util::clone($setup));
335
200
  }
336
201
 
337
202
 
@@ -360,30 +225,20 @@ for my $name (qw(
360
225
 
361
226
  # === done ===
362
227
 
363
- runset('done.basic', get_spec($PRIMARY, 'done', 'basic'), sub {
364
- my ($entry) = @_;
365
- my $ctxmap = $entry->{ctx} || {};
366
- my $ctx = make_ctx_from_map($ctxmap, $client, $utility);
367
- fixctx($ctx, $client);
368
- return $utility->{done}->($ctx);
228
+ runsection('done', sub {
229
+ my ($view) = @_;
230
+ return $utility->{done}->(ProjectNameOmni::livectx($view));
369
231
  });
370
232
 
371
233
 
372
234
  # === makeError ===
373
235
 
374
- runset('makeError.basic', get_spec($PRIMARY, 'makeError', 'basic'), sub {
375
- my ($entry) = @_;
376
- my $args = $entry->{args} || [{}];
377
-
378
- my $ctxmap = Voxgig::Struct::ismap($args->[0]) ? $args->[0] : {};
379
- my $ctx = make_ctx_from_map($ctxmap, $client, $utility);
380
- fixctx($ctx, $client);
381
-
382
- my $err;
383
- if (@$args > 1 && Voxgig::Struct::ismap($args->[1])) {
384
- $err = err_from_map($args->[1]);
385
- }
386
-
236
+ runsection('makeError', sub {
237
+ my ($view, $errmap) = @_;
238
+ my $ctx = ProjectNameOmni::livectx($view);
239
+ my $err = _err_from_map($errmap);
240
+ # make_error dies with the constructed error on the default (throw)
241
+ # path; omni matches it against the entry's err.
387
242
  return $utility->{make_error}->($ctx, $err);
388
243
  });
389
244
 
@@ -469,6 +324,10 @@ runset('makeError.basic', get_spec($PRIMARY, 'makeError', 'basic'), sub {
469
324
  {
470
325
  my $calls = [];
471
326
  my $live_client = ProjectNameSDK->new({
327
+ # Concrete base: a live construction must satisfy any server variables
328
+ # a templated base URL declares; a literal base sidesteps the
329
+ # requirement.
330
+ 'base' => 'http://localhost:8080',
472
331
  'system' => {
473
332
  'fetch' => sub {
474
333
  my ($url, $fetchdef) = @_;
@@ -493,6 +352,7 @@ runset('makeError.basic', get_spec($PRIMARY, 'makeError', 'basic'), sub {
493
352
 
494
353
  {
495
354
  my $blocked_client = ProjectNameSDK->new({
355
+ 'base' => 'http://localhost:8080',
496
356
  'system' => {
497
357
  'fetch' => sub { return ({}, undef) },
498
358
  },
@@ -515,11 +375,10 @@ runset('makeError.basic', get_spec($PRIMARY, 'makeError', 'basic'), sub {
515
375
 
516
376
  # === makeContext ===
517
377
 
518
- runset('makeContext.basic', get_spec($PRIMARY, 'makeContext', 'basic'), sub {
519
- my ($entry) = @_;
520
- my $in_val = $entry->{in};
521
- return undef unless Voxgig::Struct::ismap($in_val);
522
- my $ctx = $utility->{make_context}->($in_val, undef);
378
+ runsection('makeContext', sub {
379
+ my ($vin) = @_;
380
+ return undef unless ref($vin) eq 'HASH';
381
+ my $ctx = $utility->{make_context}->($vin, undef);
523
382
  my $out = { 'id' => $ctx->{id} };
524
383
  if ($ctx->{op}) {
525
384
  $out->{op} = {
@@ -584,12 +443,12 @@ runset('makeContext.basic', get_spec($PRIMARY, 'makeContext', 'basic'), sub {
584
443
 
585
444
  # === makeOptions ===
586
445
 
587
- runset('makeOptions.basic', get_spec($PRIMARY, 'makeOptions', 'basic'), sub {
588
- my ($entry) = @_;
589
- my $in_val = $entry->{in} || {};
446
+ runsection('makeOptions', sub {
447
+ my ($vin) = @_;
448
+ $vin = {} unless ref($vin) eq 'HASH';
590
449
  my $ctx = $utility->{make_context}->({
591
- 'options' => $in_val->{options},
592
- 'config' => $in_val->{config},
450
+ 'options' => $vin->{options},
451
+ 'config' => $vin->{config},
593
452
  }, undef);
594
453
  $ctx->{client} = $client;
595
454
  $ctx->{utility} = $utility;
@@ -599,50 +458,19 @@ runset('makeOptions.basic', get_spec($PRIMARY, 'makeOptions', 'basic'), sub {
599
458
 
600
459
  # === makeRequest ===
601
460
 
602
- runset('makeRequest.basic', get_spec($PRIMARY, 'makeRequest', 'basic'), sub {
603
- my ($entry) = @_;
604
- my $ctxmap = $entry->{ctx} || {};
605
- my $ctx = make_ctx_from_map($ctxmap, $client, $utility);
461
+ runsection('makeRequest', sub {
462
+ my ($view) = @_;
463
+ my $ctx = ProjectNameOmni::livectx($view);
606
464
  $ctx->{options} = $client->options_map;
607
-
608
- my (undef, $err) = $utility->{make_request}->($ctx);
609
- die $err if $err;
610
-
611
- # Update entry ctx for match checking
612
- my $entry_ctx = $entry->{ctx};
613
- if (Voxgig::Struct::ismap($entry_ctx)) {
614
- $entry_ctx->{response} = 'exists' if $ctx->{response};
615
- $entry_ctx->{result} = 'exists' if $ctx->{result};
616
- }
617
-
618
- return undef;
465
+ return _unwrap($utility->{make_request}->($ctx));
619
466
  });
620
467
 
621
468
 
622
469
  # === makeResponse ===
623
470
 
624
- runset('makeResponse.basic', get_spec($PRIMARY, 'makeResponse', 'basic'), sub {
625
- my ($entry) = @_;
626
- my $ctxmap = $entry->{ctx} || {};
627
- my $ctx = make_ctx_from_map($ctxmap, $client, $utility);
628
- fixctx($ctx, $client);
629
-
630
- my (undef, $err) = $utility->{make_response}->($ctx);
631
- die $err if $err;
632
-
633
- # Update entry ctx for match checking with result data
634
- my $entry_ctx = $entry->{ctx};
635
- if (Voxgig::Struct::ismap($entry_ctx) && $ctx->{result}) {
636
- $entry_ctx->{result} = {
637
- 'ok' => Voxgig::Struct::jbool($ctx->{result}{ok} ? 1 : 0),
638
- 'status' => $ctx->{result}{status},
639
- 'statusText' => $ctx->{result}{status_text},
640
- 'headers' => $ctx->{result}{headers},
641
- 'body' => $ctx->{result}{body},
642
- };
643
- }
644
-
645
- return undef;
471
+ runsection('makeResponse', sub {
472
+ my ($view) = @_;
473
+ return _unwrap($utility->{make_response}->(ProjectNameOmni::livectx($view)));
646
474
  });
647
475
 
648
476
 
@@ -696,41 +524,31 @@ runset('makeResponse.basic', get_spec($PRIMARY, 'makeResponse', 'basic'), sub {
696
524
  # === makeSpec ===
697
525
 
698
526
  {
699
- my $setup_opts = get_spec($PRIMARY, 'makeSpec', 'DEF', 'setup', 'a');
700
- my $spec_client = ProjectNameSDK->test(undef, $setup_opts);
701
- my $spec_utility = $spec_client->get_utility;
702
-
703
- runset('makeSpec.basic', get_spec($PRIMARY, 'makeSpec', 'basic'), sub {
704
- my ($entry) = @_;
705
- my $ctxmap = $entry->{ctx} || {};
706
- my $ctx = make_ctx_from_map($ctxmap, $spec_client, $spec_utility);
707
- $ctx->{options} = $spec_client->options_map;
527
+ my $spec_client = ProjectNameSDK->test(undef, _def_setup('makeSpec'));
708
528
 
709
- my (undef, $err) = $utility->{make_spec}->($ctx);
710
- die $err if $err;
711
-
712
- # Update entry ctx for match
713
- my $entry_ctx = $entry->{ctx};
714
- if (Voxgig::Struct::ismap($entry_ctx) && $ctx->{spec}) {
715
- $entry_ctx->{spec} = {
716
- 'base' => $ctx->{spec}{base},
717
- 'prefix' => $ctx->{spec}{prefix},
718
- 'suffix' => $ctx->{spec}{suffix},
719
- 'method' => $ctx->{spec}{method},
720
- 'params' => $ctx->{spec}{params},
721
- 'query' => $ctx->{spec}{query},
722
- 'headers' => $ctx->{spec}{headers},
723
- 'step' => $ctx->{spec}{step},
724
- };
725
- }
726
-
727
- return undef;
529
+ runsection('makeSpec', sub {
530
+ my ($view) = @_;
531
+ my $ctx = ProjectNameOmni::livectx($view);
532
+ $ctx->{client} = $spec_client;
533
+ $ctx->{options} = $spec_client->options_map;
534
+ return _unwrap($utility->{make_spec}->($ctx));
728
535
  });
729
536
  }
730
537
 
731
538
 
732
539
  # === makePoint ===
733
540
 
541
+ # Driven from the corpus like every other section; the single-point
542
+ # sanity case is kept below.
543
+ runsection('makePoint', sub {
544
+ my ($view) = @_;
545
+ my ($point, $err) = $utility->{make_point}->(ProjectNameOmni::livectx($view));
546
+ # The corpus asserts refusals by code (`match: {out: {code: ...}}`), so
547
+ # an error is the RESULT here, flattened to the map the corpus reads.
548
+ return ProjectNameOmni::errify($err) if defined $err;
549
+ return $point;
550
+ });
551
+
734
552
  {
735
553
  my $ctx = make_test_ctx($client, $utility, undef);
736
554
  my $point = {
@@ -752,23 +570,20 @@ runset('makeResponse.basic', get_spec($PRIMARY, 'makeResponse', 'basic'), sub {
752
570
 
753
571
  # === makeUrl ===
754
572
 
755
- runset('makeUrl.basic', get_spec($PRIMARY, 'makeUrl', 'basic'), sub {
756
- my ($entry) = @_;
757
- my $ctxmap = $entry->{ctx} || {};
758
- my $ctx = make_ctx_from_map($ctxmap, $client, $utility);
573
+ runsection('makeUrl', sub {
574
+ my ($view) = @_;
575
+ my $ctx = ProjectNameOmni::livectx($view);
759
576
  $ctx->{result} = ProjectNameResult->new({}) unless $ctx->{result};
760
- my ($url, $err) = $utility->{make_url}->($ctx);
761
- die $err if $err;
762
- return $url;
577
+ return _unwrap($utility->{make_url}->($ctx));
763
578
  });
764
579
 
765
580
 
766
581
  # === operator ===
767
582
 
768
- runset('operator.basic', get_spec($PRIMARY, 'operator', 'basic'), sub {
769
- my ($entry) = @_;
770
- my $in_val = $entry->{in} || {};
771
- my $op = ProjectNameOperation->new($in_val);
583
+ runsection('operator', sub {
584
+ my ($vin) = @_;
585
+ $vin = {} unless ref($vin) eq 'HASH';
586
+ my $op = ProjectNameOperation->new($vin);
772
587
  return {
773
588
  'entity' => $op->{entity},
774
589
  'name' => $op->{name},
@@ -780,143 +595,79 @@ runset('operator.basic', get_spec($PRIMARY, 'operator', 'basic'), sub {
780
595
 
781
596
  # === param ===
782
597
 
783
- runset('param.basic', get_spec($PRIMARY, 'param', 'basic'), sub {
784
- my ($entry) = @_;
785
- my $args = $entry->{args} || [];
786
- return undef if @$args < 2;
787
-
788
- my $ctxmap = Voxgig::Struct::ismap($args->[0]) ? $args->[0] : {};
789
- my $ctx = make_ctx_from_map($ctxmap, $client, $utility);
790
- my $paramdef = $args->[1];
791
-
792
- my $result = $utility->{param}->($ctx, $paramdef);
793
-
794
- # Update entry ctx for match
795
- if (Voxgig::Struct::ismap($entry->{match})) {
796
- my $ctx_match = $entry->{match}{ctx};
797
- if (Voxgig::Struct::ismap($ctx_match)) {
798
- my $entry_ctx = $entry->{ctx};
799
- if (!defined $entry_ctx) {
800
- $entry_ctx = {};
801
- $entry->{ctx} = $entry_ctx;
802
- }
803
- my $spec_match = $ctx_match->{spec};
804
- if (Voxgig::Struct::ismap($spec_match) && $ctx->{spec}) {
805
- $entry_ctx->{spec} = {} unless $entry_ctx->{spec};
806
- if ($spec_match->{alias}) {
807
- $entry_ctx->{spec} = {
808
- 'alias' => $ctx->{spec}{alias},
809
- };
810
- }
811
- }
812
- }
813
- }
814
-
815
- return $result;
598
+ runsection('param', sub {
599
+ my ($view, $paramdef) = @_;
600
+ return $utility->{param}->(ProjectNameOmni::livectx($view), $paramdef);
816
601
  });
817
602
 
818
603
 
819
604
  # === prepareAuth ===
820
605
 
821
606
  {
822
- my $setup_opts = get_spec($PRIMARY, 'prepareAuth', 'DEF', 'setup', 'a');
823
- my $auth_client = ProjectNameSDK->test(undef, $setup_opts);
824
- my $auth_utility = $auth_client->get_utility;
825
-
826
- runset('prepareAuth.basic', get_spec($PRIMARY, 'prepareAuth', 'basic'), sub {
827
- my ($entry) = @_;
828
- my $ctxmap = $entry->{ctx} || {};
829
- my $ctx = make_ctx_from_map($ctxmap, $auth_client, $auth_utility);
830
- fixctx($ctx, $auth_client);
831
-
832
- my (undef, $err) = $utility->{prepare_auth}->($ctx);
833
- die $err if $err;
834
-
835
- # Update entry ctx for match
836
- my $entry_ctx = $entry->{ctx};
837
- if (Voxgig::Struct::ismap($entry_ctx) && $ctx->{spec}) {
838
- $entry_ctx->{spec} = {
839
- 'headers' => $ctx->{spec}{headers},
840
- };
841
- }
842
-
843
- return undef;
607
+ my $auth_client = ProjectNameSDK->test(undef, _def_setup('prepareAuth'));
608
+
609
+ runsection('prepareAuth', sub {
610
+ my ($view) = @_;
611
+ my $ctx = ProjectNameOmni::livectx($view);
612
+ $ctx->{client} = $auth_client;
613
+ return _unwrap($utility->{prepare_auth}->($ctx));
844
614
  });
845
615
  }
846
616
 
847
617
 
848
618
  # === prepareBody ===
849
619
 
850
- runset('prepareBody.basic', get_spec($PRIMARY, 'prepareBody', 'basic'), sub {
851
- my ($entry) = @_;
852
- my $ctxmap = $entry->{ctx} || {};
853
- my $ctx = make_ctx_from_map($ctxmap, $client, $utility);
854
- fixctx($ctx, $client);
855
- return $utility->{prepare_body}->($ctx);
620
+ runsection('prepareBody', sub {
621
+ my ($view) = @_;
622
+ return $utility->{prepare_body}->(ProjectNameOmni::livectx($view));
856
623
  });
857
624
 
858
625
 
859
626
  # === prepareHeaders ===
860
627
 
861
- runset('prepareHeaders.basic', get_spec($PRIMARY, 'prepareHeaders', 'basic'), sub {
862
- my ($entry) = @_;
863
- my $ctxmap = $entry->{ctx} || {};
864
- my $ctx = make_ctx_from_map($ctxmap, $client, $utility);
865
- return $utility->{prepare_headers}->($ctx);
628
+ runsection('prepareHeaders', sub {
629
+ my ($view) = @_;
630
+ return $utility->{prepare_headers}->(ProjectNameOmni::livectx($view));
866
631
  });
867
632
 
868
633
 
869
634
  # === prepareMethod ===
870
635
 
871
- runset('prepareMethod.basic', get_spec($PRIMARY, 'prepareMethod', 'basic'), sub {
872
- my ($entry) = @_;
873
- my $ctxmap = $entry->{ctx} || {};
874
- my $ctx = make_ctx_from_map($ctxmap, $client, $utility);
875
- return $utility->{prepare_method}->($ctx);
636
+ runsection('prepareMethod', sub {
637
+ my ($view) = @_;
638
+ return $utility->{prepare_method}->(ProjectNameOmni::livectx($view));
876
639
  });
877
640
 
878
641
 
879
642
  # === prepareParams ===
880
643
 
881
- runset('prepareParams.basic', get_spec($PRIMARY, 'prepareParams', 'basic'), sub {
882
- my ($entry) = @_;
883
- my $ctxmap = $entry->{ctx} || {};
884
- my $ctx = make_ctx_from_map($ctxmap, $client, $utility);
885
- return $utility->{prepare_params}->($ctx);
644
+ runsection('prepareParams', sub {
645
+ my ($view) = @_;
646
+ return $utility->{prepare_params}->(ProjectNameOmni::livectx($view));
886
647
  });
887
648
 
888
649
 
889
650
  # === preparePath ===
890
651
 
891
- # Was two hand-written cases that had drifted out of the shared corpus
892
- # (the preparePath fixture shipped as an empty `set: []`).
893
- runset('preparePath.basic', get_spec($PRIMARY, 'preparePath', 'basic'), sub {
894
- my ($entry) = @_;
895
- my $ctxmap = $entry->{ctx} || {};
896
- my $ctx = make_ctx_from_map($ctxmap, $client, $utility);
897
- return $utility->{prepare_path}->($ctx);
652
+ runsection('preparePath', sub {
653
+ my ($view) = @_;
654
+ return $utility->{prepare_path}->(ProjectNameOmni::livectx($view));
898
655
  });
899
656
 
900
657
 
901
658
  # === prepareQuery ===
902
659
 
903
- runset('prepareQuery.basic', get_spec($PRIMARY, 'prepareQuery', 'basic'), sub {
904
- my ($entry) = @_;
905
- my $ctxmap = $entry->{ctx} || {};
906
- my $ctx = make_ctx_from_map($ctxmap, $client, $utility);
907
- return $utility->{prepare_query}->($ctx);
660
+ runsection('prepareQuery', sub {
661
+ my ($view) = @_;
662
+ return $utility->{prepare_query}->(ProjectNameOmni::livectx($view));
908
663
  });
909
664
 
910
665
 
911
666
  # === resultBasic ===
912
667
 
913
- runset('resultBasic.basic', get_spec($PRIMARY, 'resultBasic', 'basic'), sub {
914
- my ($entry) = @_;
915
- my $ctxmap = $entry->{ctx} || {};
916
- my $ctx = make_ctx_from_map($ctxmap, $client, $utility);
917
- fixctx($ctx, $client);
918
-
919
- my $result = $utility->{result_basic}->($ctx);
668
+ runsection('resultBasic', sub {
669
+ my ($view) = @_;
670
+ my $result = $utility->{result_basic}->(ProjectNameOmni::livectx($view));
920
671
 
921
672
  my $out = {
922
673
  'status' => $result->{status},
@@ -927,88 +678,39 @@ runset('resultBasic.basic', get_spec($PRIMARY, 'resultBasic', 'basic'), sub {
927
678
  'message' => '' . $result->{err},
928
679
  };
929
680
  }
930
-
931
681
  return $out;
932
682
  });
933
683
 
934
684
 
935
685
  # === resultBody ===
936
686
 
937
- runset('resultBody.basic', get_spec($PRIMARY, 'resultBody', 'basic'), sub {
938
- my ($entry) = @_;
939
- my $ctxmap = $entry->{ctx} || {};
940
- my $ctx = make_ctx_from_map($ctxmap, $client, $utility);
941
-
942
- $utility->{result_body}->($ctx);
943
-
944
- my $entry_ctx = $entry->{ctx};
945
- if (Voxgig::Struct::ismap($entry_ctx) && $ctx->{result}) {
946
- $entry_ctx->{result} = {
947
- 'body' => $ctx->{result}{body},
948
- };
949
- }
950
-
951
- return undef;
687
+ runsection('resultBody', sub {
688
+ my ($view) = @_;
689
+ return $utility->{result_body}->(ProjectNameOmni::livectx($view));
952
690
  });
953
691
 
954
692
 
955
693
  # === resultHeaders ===
956
694
 
957
- runset('resultHeaders.basic', get_spec($PRIMARY, 'resultHeaders', 'basic'), sub {
958
- my ($entry) = @_;
959
- my $ctxmap = $entry->{ctx} || {};
960
- my $ctx = make_ctx_from_map($ctxmap, $client, $utility);
961
-
962
- $utility->{result_headers}->($ctx);
963
-
964
- my $entry_ctx = $entry->{ctx};
965
- if (Voxgig::Struct::ismap($entry_ctx) && $ctx->{result}) {
966
- $entry_ctx->{result} = {
967
- 'headers' => $ctx->{result}{headers},
968
- };
969
- }
970
-
971
- return undef;
695
+ runsection('resultHeaders', sub {
696
+ my ($view) = @_;
697
+ return $utility->{result_headers}->(ProjectNameOmni::livectx($view));
972
698
  });
973
699
 
974
700
 
975
701
  # === transformRequest ===
976
702
 
977
- runset('transformRequest.basic', get_spec($PRIMARY, 'transformRequest', 'basic'), sub {
978
- my ($entry) = @_;
979
- my $ctxmap = $entry->{ctx} || {};
980
- my $ctx = make_ctx_from_map($ctxmap, $client, $utility);
981
-
982
- my $result = $utility->{transform_request}->($ctx);
983
-
984
- # Update entry ctx for match (step changed)
985
- my $entry_ctx = $entry->{ctx};
986
- if (Voxgig::Struct::ismap($entry_ctx) && $ctx->{spec}) {
987
- my $spec_map = $entry_ctx->{spec};
988
- $spec_map->{step} = $ctx->{spec}{step} if Voxgig::Struct::ismap($spec_map);
989
- }
990
-
991
- return $result;
703
+ runsection('transformRequest', sub {
704
+ my ($view) = @_;
705
+ return $utility->{transform_request}->(ProjectNameOmni::livectx($view));
992
706
  });
993
707
 
994
708
 
995
709
  # === transformResponse ===
996
710
 
997
- runset('transformResponse.basic', get_spec($PRIMARY, 'transformResponse', 'basic'), sub {
998
- my ($entry) = @_;
999
- my $ctxmap = $entry->{ctx} || {};
1000
- my $ctx = make_ctx_from_map($ctxmap, $client, $utility);
1001
-
1002
- my $result = $utility->{transform_response}->($ctx);
1003
-
1004
- # Update entry ctx for match (step changed)
1005
- my $entry_ctx = $entry->{ctx};
1006
- if (Voxgig::Struct::ismap($entry_ctx) && $ctx->{spec}) {
1007
- my $spec_map = $entry_ctx->{spec};
1008
- $spec_map->{step} = $ctx->{spec}{step} if Voxgig::Struct::ismap($spec_map);
1009
- }
1010
-
1011
- return $result;
711
+ runsection('transformResponse', sub {
712
+ my ($view) = @_;
713
+ return $utility->{transform_response}->(ProjectNameOmni::livectx($view));
1012
714
  });
1013
715
 
1014
716
  done_testing();