@voxgig/sdkgen 4.8.2 → 4.8.3

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 (376) 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/src/cmp/clojure/Package_clojure.ts +9 -2
  33. package/project/.sdk/src/cmp/cpp/Gitignore_cpp.ts +3 -0
  34. package/project/.sdk/src/cmp/dart/Test_dart.ts +2 -0
  35. package/project/.sdk/src/cmp/elixir/Package_elixir.ts +4 -1
  36. package/project/.sdk/src/cmp/go/Config_go.ts +59 -2
  37. package/project/.sdk/src/cmp/go/Main_go.ts +8 -2
  38. package/project/.sdk/src/cmp/java/Test_java.ts +6 -5
  39. package/project/.sdk/src/cmp/kotlin/Test_kotlin.ts +6 -5
  40. package/project/.sdk/src/cmp/lean/Package_lean.ts +23 -0
  41. package/project/.sdk/src/cmp/lean/ReadmeInstall_lean.ts +1 -0
  42. package/project/.sdk/src/cmp/lean/ReadmeTopTest_lean.ts +1 -0
  43. package/project/.sdk/src/cmp/ocaml/Gitignore_ocaml.ts +1 -0
  44. package/project/.sdk/src/cmp/ocaml/Main_ocaml.ts +7 -3
  45. package/project/.sdk/src/cmp/py/Config_py.ts +82 -1
  46. package/project/.sdk/src/cmp/py/Main_py.ts +44 -0
  47. package/project/.sdk/src/cmp/py/fragment/Main.fragment.py +2 -0
  48. package/project/.sdk/src/cmp/swift/Main_swift.ts +10 -0
  49. package/project/.sdk/src/cmp/swift/Package_swift.ts +13 -1
  50. package/project/.sdk/src/cmp/ts/Config_ts.ts +42 -17
  51. package/project/.sdk/src/cmp/ts/fragment/Config.data.fragment.ts +13 -1
  52. package/project/.sdk/src/cmp/ts/fragment/Config.fragment.ts +13 -1
  53. package/project/.sdk/tm/c/Makefile +38 -3
  54. package/project/.sdk/tm/c/tests/omni_resolver.h +361 -0
  55. package/project/.sdk/tm/c/tests/omni_smoke_test.c +237 -0
  56. package/project/.sdk/tm/c/tests/primary_corpus_test.c +205 -284
  57. package/project/.sdk/tm/c/tests/struct_corpus_test.c +292 -212
  58. package/project/.sdk/tm/c/tests/vendor/omni/json.c +811 -0
  59. package/project/.sdk/tm/c/tests/vendor/omni/omni.h +240 -0
  60. package/project/.sdk/tm/c/tests/vendor/omni/runner.c +940 -0
  61. package/project/.sdk/tm/c/tests/vendor/omni/util.c +351 -0
  62. package/project/.sdk/tm/c/utility/struct/utility.c +7 -2
  63. package/project/.sdk/tm/clojure/test/sdk/test/omni.clj +401 -0
  64. package/project/.sdk/tm/clojure/test/sdk/test/omni_smoke.clj +81 -0
  65. package/project/.sdk/tm/clojure/test/sdk/test/primary.clj +92 -58
  66. package/project/.sdk/tm/clojure/test/sdk/test/struct_corpus.clj +122 -149
  67. package/project/.sdk/tm/clojure/test/sdk/test_runner.clj +8 -3
  68. package/project/.sdk/tm/clojure/test/vendor/omni/voxgig/omni/json.clj +145 -0
  69. package/project/.sdk/tm/clojure/test/vendor/omni/voxgig/omni/runner.clj +445 -0
  70. package/project/.sdk/tm/clojure/test/vendor/omni/voxgig/omni/util.clj +145 -0
  71. package/project/.sdk/tm/cpp/Makefile +5 -1
  72. package/project/.sdk/tm/cpp/test/omni_resolver.hpp +473 -0
  73. package/project/.sdk/tm/cpp/test/omni_smoke_test.cpp +209 -0
  74. package/project/.sdk/tm/cpp/test/primary_utility_test.cpp +243 -184
  75. package/project/.sdk/tm/cpp/test/runner_support.hpp +68 -181
  76. package/project/.sdk/tm/cpp/test/struct_corpus_test.cpp +183 -56
  77. package/project/.sdk/tm/cpp/test/vendor/omni/json.hpp +406 -0
  78. package/project/.sdk/tm/cpp/test/vendor/omni/omni.hpp +751 -0
  79. package/project/.sdk/tm/cpp/test/vendor/omni/util.hpp +256 -0
  80. package/project/.sdk/tm/cpp/utility/pipeline.hpp +7 -1
  81. package/project/.sdk/tm/csharp/test/OmniResolver.cs +491 -0
  82. package/project/.sdk/tm/csharp/test/OmniSmokeTest.cs +106 -0
  83. package/project/.sdk/tm/csharp/test/PrimaryUtilityTest.cs +299 -316
  84. package/project/.sdk/tm/csharp/test/Runner.cs +104 -269
  85. package/project/.sdk/tm/csharp/test/StructUtilityTest.cs +535 -724
  86. package/project/.sdk/tm/csharp/test/vendor/omni/Runner.cs +864 -0
  87. package/project/.sdk/tm/csharp/test/vendor/omni/Util.cs +347 -0
  88. package/project/.sdk/tm/csharp/utility/MakeSpec.cs +3 -1
  89. package/project/.sdk/tm/csharp/utility/PrepareMethod.cs +6 -1
  90. package/project/.sdk/tm/csharp/utility/struct/Struct.cs +21 -5
  91. package/project/.sdk/tm/dart/test/omni.dart +520 -0
  92. package/project/.sdk/tm/dart/test/omni_smoke_test.dart +143 -0
  93. package/project/.sdk/tm/dart/test/primary_test.dart +86 -28
  94. package/project/.sdk/tm/dart/test/struct_test.dart +438 -11
  95. package/project/.sdk/tm/dart/test/vendor/omni/omni.dart +7 -0
  96. package/project/.sdk/tm/dart/test/vendor/omni/runner.dart +653 -0
  97. package/project/.sdk/tm/dart/test/vendor/omni/util.dart +232 -0
  98. package/project/.sdk/tm/elixir/Makefile +11 -3
  99. package/project/.sdk/tm/elixir/test/omni_smoke_test.exs +117 -0
  100. package/project/.sdk/tm/elixir/test/primary_utility_test.exs +341 -16
  101. package/project/.sdk/tm/elixir/test/struct_corpus_test.exs +554 -9
  102. package/project/.sdk/tm/elixir/test/support/omni.ex +377 -0
  103. package/project/.sdk/tm/elixir/test/vendor/omni/json.ex +122 -0
  104. package/project/.sdk/tm/elixir/test/vendor/omni/runner.ex +623 -0
  105. package/project/.sdk/tm/elixir/test/vendor/omni/util.ex +187 -0
  106. package/project/.sdk/tm/go/core/context.go +32 -16
  107. package/project/.sdk/tm/go/feature/secrets/plugin/capability.go +261 -0
  108. package/project/.sdk/tm/go/feature/secrets/plugin/catalog.go +78 -0
  109. package/project/.sdk/tm/go/feature/secrets/plugin/config.go +652 -0
  110. package/project/.sdk/tm/go/feature/secrets/plugin/depend.go +250 -0
  111. package/project/.sdk/tm/go/feature/secrets/plugin/env.go +194 -0
  112. package/project/.sdk/tm/go/feature/secrets/plugin/export.go +80 -0
  113. package/project/.sdk/tm/go/feature/secrets/plugin/graph.go +238 -0
  114. package/project/.sdk/tm/go/feature/secrets/plugin/host.go +1575 -0
  115. package/project/.sdk/tm/go/feature/secrets/plugin/order.go +248 -0
  116. package/project/.sdk/tm/go/feature/secrets/plugin/point.go +184 -0
  117. package/project/.sdk/tm/go/feature/secrets/plugin/ref.go +123 -0
  118. package/project/.sdk/tm/go/feature/secrets/plugin/resolve.go +79 -0
  119. package/project/.sdk/tm/go/feature/secrets/plugin/types.go +296 -0
  120. package/project/.sdk/tm/go/feature/secrets/plugin/util.go +87 -0
  121. package/project/.sdk/tm/go/feature/secrets/plugin/version.go +161 -0
  122. package/project/.sdk/tm/go/feature/secrets/plugins/aws/aws.go +292 -0
  123. package/project/.sdk/tm/go/feature/secrets/plugins/aws/sigv4.go +201 -0
  124. package/project/.sdk/tm/go/feature/secrets/plugins/azuresecrets/azuresecrets.go +187 -0
  125. package/project/.sdk/tm/go/feature/secrets/plugins/boru/boru.go +184 -0
  126. package/project/.sdk/tm/go/feature/secrets/plugins/doppler/doppler.go +114 -0
  127. package/project/.sdk/tm/go/feature/secrets/plugins/gcpsecrets/gcpsecrets.go +156 -0
  128. package/project/.sdk/tm/go/feature/secrets/plugins/hashicorp/hashicorp.go +209 -0
  129. package/project/.sdk/tm/go/feature/secrets/plugins/httpjson/httpjson.go +241 -0
  130. package/project/.sdk/tm/go/feature/secrets/plugins/infisical/infisical.go +151 -0
  131. package/project/.sdk/tm/go/feature/secrets/plugins/onepassword/onepassword.go +152 -0
  132. package/project/.sdk/tm/go/feature/secrets/plugins/secretspec/secretspec.go +143 -0
  133. package/project/.sdk/tm/go/feature/secrets/sekreto/addr.go +120 -0
  134. package/project/.sdk/tm/go/feature/secrets/sekreto/providers.go +439 -0
  135. package/project/.sdk/tm/go/feature/secrets/sekreto/sekreto.go +685 -0
  136. package/project/.sdk/tm/go/feature/secrets_feature.go +675 -0
  137. package/project/.sdk/tm/go/src/feature/secrets/.gitkeep +0 -0
  138. package/project/.sdk/tm/go/test/feature/secrets/secrets_feature_test.go +799 -0
  139. package/project/.sdk/tm/go/test/omni/omni.go +897 -0
  140. package/project/.sdk/tm/go/test/omni/util.go +360 -0
  141. package/project/.sdk/tm/go/test/omniresolver_test.go +748 -0
  142. package/project/.sdk/tm/go/test/omnismoke_test.go +112 -0
  143. package/project/.sdk/tm/go/test/primary_utility_test.go +123 -191
  144. package/project/.sdk/tm/go/test/struct_utility_test.go +323 -16
  145. package/project/.sdk/tm/go/test/testsupport_test.go +294 -0
  146. package/project/.sdk/tm/go/utility/make_options.go +8 -1
  147. package/project/.sdk/tm/go/utility/prepare_method.go +5 -1
  148. package/project/.sdk/tm/go/utility/struct/voxgigstruct.go +2 -2
  149. package/project/.sdk/tm/java/test/OmniResolver.java +355 -0
  150. package/project/.sdk/tm/java/test/OmniSmokeTest.java +99 -0
  151. package/project/.sdk/tm/java/test/PrimaryUtilityTest.java +254 -280
  152. package/project/.sdk/tm/java/test/RunnerSupport.java +9 -194
  153. package/project/.sdk/tm/java/test/StructCorpusTest.java +119 -42
  154. package/project/.sdk/tm/java/test/vendor/omni/Json.java +287 -0
  155. package/project/.sdk/tm/java/test/vendor/omni/Runner.java +851 -0
  156. package/project/.sdk/tm/java/test/vendor/omni/Util.java +322 -0
  157. package/project/.sdk/tm/java/utility/MakeSpec.java +3 -1
  158. package/project/.sdk/tm/java/utility/PrepareMethod.java +5 -5
  159. package/project/.sdk/tm/java/utility/struct/Struct.java +17 -4
  160. package/project/.sdk/tm/js/src/utility/StructUtility.js +3 -3
  161. package/project/.sdk/tm/js/test/omni.js +251 -0
  162. package/project/.sdk/tm/js/test/omni.test.js +105 -0
  163. package/project/.sdk/tm/js/test/utility/PrimaryUtility.test.js +6 -2
  164. package/project/.sdk/tm/js/test/utility/StructUtility.test.js +27 -2
  165. package/project/.sdk/tm/js/test/vendor/omni/index.js +77 -0
  166. package/project/.sdk/tm/js/test/vendor/omni/runner.js +613 -0
  167. package/project/.sdk/tm/js/test/vendor/omni/util.js +212 -0
  168. package/project/.sdk/tm/kotlin/core/Utility.kt +1 -1
  169. package/project/.sdk/tm/kotlin/test/OmniResolver.kt +343 -0
  170. package/project/.sdk/tm/kotlin/test/OmniSmokeTest.kt +100 -0
  171. package/project/.sdk/tm/kotlin/test/PrimaryUtilityTest.kt +244 -262
  172. package/project/.sdk/tm/kotlin/test/RunnerSupport.kt +9 -178
  173. package/project/.sdk/tm/kotlin/test/StructCorpusTest.kt +121 -32
  174. package/project/.sdk/tm/kotlin/test/vendor/omni/Json.kt +264 -0
  175. package/project/.sdk/tm/kotlin/test/vendor/omni/Runner.kt +615 -0
  176. package/project/.sdk/tm/kotlin/test/vendor/omni/Util.kt +139 -0
  177. package/project/.sdk/tm/kotlin/utility/MakeSpecUrl.kt +6 -3
  178. package/project/.sdk/tm/kotlin/utility/Prepare.kt +6 -6
  179. package/project/.sdk/tm/kotlin/utility/struct/Struct.kt +18 -2
  180. package/project/.sdk/tm/lean/Makefile +12 -5
  181. package/project/.sdk/tm/lean/src/SdkUtility.lean +14 -1
  182. package/project/.sdk/tm/lean/test/OmniResolver.lean +358 -0
  183. package/project/.sdk/tm/lean/test/OmniSmoke.lean +174 -0
  184. package/project/.sdk/tm/lean/test/StructCorpus.lean +245 -574
  185. package/project/.sdk/tm/lean/test/TPrimaryUtility.lean +155 -291
  186. package/project/.sdk/tm/lean/test/vendor/omni/Omni.lean +997 -0
  187. package/project/.sdk/tm/lua/test/omni.lua +456 -0
  188. package/project/.sdk/tm/lua/test/omni_smoke_test.lua +103 -0
  189. package/project/.sdk/tm/lua/test/primary_utility_test.lua +250 -509
  190. package/project/.sdk/tm/lua/test/struct_utility_test.lua +161 -70
  191. package/project/.sdk/tm/lua/test/vendor/omni/json.lua +268 -0
  192. package/project/.sdk/tm/lua/test/vendor/omni/regex.lua +385 -0
  193. package/project/.sdk/tm/lua/test/vendor/omni/runner.lua +641 -0
  194. package/project/.sdk/tm/lua/test/vendor/omni/util.lua +282 -0
  195. package/project/.sdk/tm/lua/utility/prepare_method.lua +5 -1
  196. package/project/.sdk/tm/lua/utility/struct/regex.lua +663 -0
  197. package/project/.sdk/tm/lua/utility/struct/struct.lua +660 -420
  198. package/project/.sdk/tm/ocaml/Makefile +37 -12
  199. package/project/.sdk/tm/ocaml/test/omni_resolver.ml +284 -0
  200. package/project/.sdk/tm/ocaml/test/omni_smoke_test.ml +169 -0
  201. package/project/.sdk/tm/ocaml/test/primary_utility_test.ml +84 -100
  202. package/project/.sdk/tm/ocaml/test/struct_corpus.ml +225 -201
  203. package/project/.sdk/tm/ocaml/test/vendor/omni/omni.ml +1157 -0
  204. package/project/.sdk/tm/perl/lib/Voxgig/Struct.pm +88 -12
  205. package/project/.sdk/tm/perl/t/omni.pm +647 -0
  206. package/project/.sdk/tm/perl/t/omni_smoke.t +87 -0
  207. package/project/.sdk/tm/perl/t/primary_utility.t +189 -487
  208. package/project/.sdk/tm/perl/t/struct_utility.t +455 -389
  209. package/project/.sdk/tm/perl/t/vendor/omni/Voxgig/Omni/Runner.pm +649 -0
  210. package/project/.sdk/tm/perl/t/vendor/omni/Voxgig/Omni/Util.pm +253 -0
  211. package/project/.sdk/tm/perl/t/vendor/omni/Voxgig/Omni.pm +24 -0
  212. package/project/.sdk/tm/perl/utility/prepare_method.pm +7 -2
  213. package/project/.sdk/tm/php/test/Omni.php +691 -0
  214. package/project/.sdk/tm/php/test/OmniSmokeTest.php +93 -0
  215. package/project/.sdk/tm/php/test/PrimaryUtilityTest.php +210 -571
  216. package/project/.sdk/tm/php/test/StructUtilityTest.php +320 -342
  217. package/project/.sdk/tm/php/test/vendor/omni/Runner.php +644 -0
  218. package/project/.sdk/tm/php/test/vendor/omni/Util.php +283 -0
  219. package/project/.sdk/tm/php/utility/MakeSpec.php +10 -3
  220. package/project/.sdk/tm/php/utility/PrepareBody.php +7 -1
  221. package/project/.sdk/tm/php/utility/PrepareMethod.php +6 -2
  222. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/__init__.py +36 -0
  223. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/capability.py +141 -0
  224. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/catalog.py +50 -0
  225. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/config.py +333 -0
  226. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/depend.py +198 -0
  227. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/env.py +147 -0
  228. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/export.py +52 -0
  229. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/graph.py +139 -0
  230. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/host.py +1053 -0
  231. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/order.py +171 -0
  232. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/point.py +95 -0
  233. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/ref.py +116 -0
  234. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/resolve.py +59 -0
  235. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/types.py +87 -0
  236. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/version.py +112 -0
  237. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/__init__.py +74 -0
  238. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/addr.py +116 -0
  239. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/aws.py +192 -0
  240. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/azuresecrets.py +120 -0
  241. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/boru.py +140 -0
  242. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/doppler.py +62 -0
  243. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/gcpsecrets.py +101 -0
  244. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/hashicorp.py +152 -0
  245. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/httpjson.py +115 -0
  246. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/infisical.py +92 -0
  247. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/onepassword.py +101 -0
  248. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/secretspec.py +119 -0
  249. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/sigv4.py +125 -0
  250. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/providers.py +211 -0
  251. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/sekreto.py +455 -0
  252. package/project/.sdk/tm/py/pkg/feature/secrets_feature.py +467 -0
  253. package/project/.sdk/tm/py/pkg/utility/prepare_method.py +5 -1
  254. package/project/.sdk/tm/py/pkg/utility/voxgig_struct/__init__.py +0 -2
  255. package/project/.sdk/tm/py/pkg/utility/voxgig_struct/voxgig_struct.py +780 -529
  256. package/project/.sdk/tm/py/src/feature/secrets/.gitkeep +0 -0
  257. package/project/.sdk/tm/py/test/feature/__init__.py +0 -0
  258. package/project/.sdk/tm/py/test/feature/secrets/__init__.py +0 -0
  259. package/project/.sdk/tm/py/test/feature/secrets/test_secrets.py +337 -0
  260. package/project/.sdk/tm/py/test/omni.py +415 -0
  261. package/project/.sdk/tm/py/test/test_omni_smoke.py +74 -0
  262. package/project/.sdk/tm/py/test/test_primary_utility.py +144 -668
  263. package/project/.sdk/tm/py/test/test_struct_utility.py +74 -27
  264. package/project/.sdk/tm/py/test/voxgig_omni/__init__.py +62 -0
  265. package/project/.sdk/tm/py/test/voxgig_omni/runner.py +566 -0
  266. package/project/.sdk/tm/py/test/voxgig_omni/util.py +237 -0
  267. package/project/.sdk/tm/rb/test/omni.rb +505 -0
  268. package/project/.sdk/tm/rb/test/omni_smoke_test.rb +72 -0
  269. package/project/.sdk/tm/rb/test/primary_utility_test.rb +174 -560
  270. package/project/.sdk/tm/rb/test/struct_utility_test.rb +13 -7
  271. package/project/.sdk/tm/rb/test/vendor/omni/runner.rb +493 -0
  272. package/project/.sdk/tm/rb/test/vendor/omni/util.rb +199 -0
  273. package/project/.sdk/tm/rb/test/vendor/omni/voxgig_omni.rb +15 -0
  274. package/project/.sdk/tm/rb/utility/prepare_method.rb +5 -1
  275. package/project/.sdk/tm/rust/tests/common/mod.rs +19 -242
  276. package/project/.sdk/tm/rust/tests/omni_resolver/mod.rs +888 -0
  277. package/project/.sdk/tm/rust/tests/omni_smoke_test.rs +286 -0
  278. package/project/.sdk/tm/rust/tests/primary_utility_test.rs +318 -312
  279. package/project/.sdk/tm/rust/tests/struct_utility_test.rs +66 -28
  280. package/project/.sdk/tm/rust/tests/vendor/omni/json.rs +412 -0
  281. package/project/.sdk/tm/rust/tests/vendor/omni/mod.rs +38 -0
  282. package/project/.sdk/tm/rust/tests/vendor/omni/regex.rs +392 -0
  283. package/project/.sdk/tm/rust/tests/vendor/omni/runner.rs +1001 -0
  284. package/project/.sdk/tm/rust/tests/vendor/omni/util.rs +161 -0
  285. package/project/.sdk/tm/rust/utility/prepare_method.rs +5 -1
  286. package/project/.sdk/tm/scala/Makefile +16 -6
  287. package/project/.sdk/tm/scala/sdktest/OmniResolver.scala +497 -0
  288. package/project/.sdk/tm/scala/sdktest/OmniSmoke.scala +192 -0
  289. package/project/.sdk/tm/scala/sdktest/PrimaryCorpus.scala +47 -19
  290. package/project/.sdk/tm/scala/sdktest/StructCorpus.scala +0 -0
  291. package/project/.sdk/tm/scala/sdktest/vendor/omni/Json.scala +229 -0
  292. package/project/.sdk/tm/scala/sdktest/vendor/omni/Runner.scala +552 -0
  293. package/project/.sdk/tm/scala/sdktest/vendor/omni/Util.scala +104 -0
  294. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/Constants.swift +10 -0
  295. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/Inject.swift +28 -5
  296. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/Injection.swift +5 -1
  297. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/Minor.swift +4 -1
  298. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/Validate.swift +15 -5
  299. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/utility/Prepare.swift +6 -1
  300. package/project/.sdk/tm/swift/Tests/ProjectNameSDKTests/OmniResolver.swift +474 -0
  301. package/project/.sdk/tm/swift/Tests/ProjectNameSDKTests/OmniSmokeTest.swift +107 -0
  302. package/project/.sdk/tm/swift/Tests/ProjectNameSDKTests/PrimaryUtilityTest.swift +141 -178
  303. package/project/.sdk/tm/swift/Tests/ProjectNameSDKTests/Runner.swift +17 -113
  304. package/project/.sdk/tm/swift/Tests/ProjectNameSDKTests/StructUtilityTest.swift +295 -446
  305. package/project/.sdk/tm/swift/Tests/vendor/omni/Json.swift +364 -0
  306. package/project/.sdk/tm/swift/Tests/vendor/omni/Runner.swift +730 -0
  307. package/project/.sdk/tm/swift/Tests/vendor/omni/Util.swift +162 -0
  308. package/project/.sdk/tm/ts/src/feature/secrets/SecretsFeature.ts +7 -0
  309. package/project/.sdk/tm/ts/src/feature/secrets/plugin/Capability.ts +148 -0
  310. package/project/.sdk/tm/ts/src/feature/secrets/plugin/Catalog.ts +55 -0
  311. package/project/.sdk/tm/ts/src/feature/secrets/plugin/Config.ts +344 -0
  312. package/project/.sdk/tm/ts/src/feature/secrets/plugin/Depend.ts +205 -0
  313. package/project/.sdk/tm/ts/src/feature/secrets/plugin/Env.ts +138 -0
  314. package/project/.sdk/tm/ts/src/feature/secrets/plugin/Export.ts +46 -0
  315. package/project/.sdk/tm/ts/src/feature/secrets/plugin/FeatureHost.ts +349 -0
  316. package/project/.sdk/tm/ts/src/feature/secrets/plugin/Graph.ts +181 -0
  317. package/project/.sdk/tm/ts/src/feature/secrets/plugin/Host.ts +1132 -0
  318. package/project/.sdk/tm/ts/src/feature/secrets/plugin/Order.ts +177 -0
  319. package/project/.sdk/tm/ts/src/feature/secrets/plugin/Point.ts +119 -0
  320. package/project/.sdk/tm/ts/src/feature/secrets/plugin/Ref.ts +102 -0
  321. package/project/.sdk/tm/ts/src/feature/secrets/plugin/Resolve.ts +61 -0
  322. package/project/.sdk/tm/ts/src/feature/secrets/plugin/Types.ts +112 -0
  323. package/project/.sdk/tm/ts/src/feature/secrets/plugin/Version.ts +100 -0
  324. package/project/.sdk/tm/ts/src/feature/secrets/plugin/index.ts +37 -0
  325. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/Sekreto.ts +163 -30
  326. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/index.ts +27 -22
  327. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/{provider → plugins}/aws.ts +26 -36
  328. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/{provider → plugins}/azuresecrets.ts +19 -21
  329. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/{provider → plugins}/boru.ts +36 -17
  330. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/{provider → plugins}/doppler.ts +14 -21
  331. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/{provider → plugins}/gcpsecrets.ts +27 -27
  332. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/{provider → plugins}/hashicorp.ts +25 -39
  333. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/plugins/httpjson.ts +99 -0
  334. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/{provider → plugins}/infisical.ts +14 -16
  335. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/{provider → plugins}/onepassword.ts +15 -22
  336. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/plugins/secretspec.ts +98 -0
  337. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/{Sigv4.ts → plugins/sigv4.ts} +7 -6
  338. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/addr.ts +97 -23
  339. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/builtin.ts +37 -0
  340. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/dotenv.ts +4 -17
  341. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/env.ts +4 -16
  342. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/file.ts +11 -25
  343. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/memory.ts +6 -23
  344. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/support.ts +106 -39
  345. package/project/.sdk/tm/ts/src/utility/StructUtility.ts +3 -3
  346. package/project/.sdk/tm/ts/test/omni.ts +104 -32
  347. package/project/.sdk/tm/ts/test/utility/StructUtility.test.ts +27 -0
  348. package/project/.sdk/tm/ts/test/vendor/omni/Runner.ts +32 -5
  349. package/project/.sdk/tm/ts/test/vendor/omni/Util.ts +2 -2
  350. package/project/.sdk/tm/ts/test/vendor/omni/index.ts +2 -2
  351. package/project/.sdk/tm/zig/test/primary_utility_test.zig +1 -1
  352. package/project/.sdk/tm/zig/test/struct_runner.zig +5 -4
  353. package/project/sdkgen-package.json +1 -1
  354. package/src/action/doctor.ts +66 -2
  355. package/src/helpers/naming.ts +4 -2
  356. package/project/.sdk/tm/c/tests/runner.h +0 -274
  357. package/project/.sdk/tm/cpp/test/struct_runner.hpp +0 -314
  358. package/project/.sdk/tm/csharp/test/StructRunner.cs +0 -276
  359. package/project/.sdk/tm/dart/test/runner.dart +0 -406
  360. package/project/.sdk/tm/dart/test/struct_corpus.dart +0 -531
  361. package/project/.sdk/tm/elixir/test/support/struct_corpus.ex +0 -1088
  362. package/project/.sdk/tm/go/test/runner_test.go +0 -629
  363. package/project/.sdk/tm/go/test/struct_runner_test.go +0 -1094
  364. package/project/.sdk/tm/java/test/StructRunner.java +0 -281
  365. package/project/.sdk/tm/js/test/runner.js +0 -387
  366. package/project/.sdk/tm/kotlin/test/StructRunner.kt +0 -177
  367. package/project/.sdk/tm/lua/test/struct_runner.lua +0 -602
  368. package/project/.sdk/tm/ocaml/test/corpus_runner.ml +0 -185
  369. package/project/.sdk/tm/perl/t/struct_runner.pm +0 -275
  370. package/project/.sdk/tm/php/test/StructRunner.php +0 -275
  371. package/project/.sdk/tm/py/test/struct_runner.py +0 -411
  372. package/project/.sdk/tm/rb/test/struct_runner.rb +0 -309
  373. package/project/.sdk/tm/rust/tests/struct_runner/mod.rs +0 -424
  374. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/Registry.ts +0 -90
  375. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/http.ts +0 -66
  376. package/project/.sdk/tm/ts/test/vendor/omni/compat.ts +0 -188
@@ -1,7 +1,13 @@
1
1
  // Primary utility test suite - drives every utility on the client utility
2
- // object, partly via the shared corpus in ../../.sdk/test/test.json
3
- // ("primary" section) and partly via direct checks. C# twin of
2
+ // object against the shared corpus in ../../.sdk/test/test.json ("primary"
3
+ // section) through the VENDORED omni runner (OmniResolver over
4
+ // test/vendor/omni), plus direct checks. C# twin of
4
5
  // tm/go/test/primary_utility_test.go.
6
+ //
7
+ // Subjects receive omni's native argument list: a ctx entry arrives as
8
+ // args[0], a MAP - OmniResolver.OmniCtx builds the typed Context a
9
+ // generated utility takes, and OmniResolver.OmniSyncCtx writes the
10
+ // observable ctx state back for `match: {ctx: ...}` assertions.
5
11
 
6
12
  using Xunit;
7
13
 
@@ -34,21 +40,79 @@ internal class TestInitFeature : BaseFeature
34
40
 
35
41
  public class PrimaryUtilityTest
36
42
  {
37
- private readonly Dictionary<string, object?> _primary;
38
- private readonly ProjectNameSDK _client;
39
- private readonly Utility _utility;
43
+ // PENDING sections are the ones deliberately left empty in the shared
44
+ // corpus (.sdk/test/primary/<name>.aon). Everything else MUST
45
+ // contribute cases.
46
+ private static readonly HashSet<string> Pending = new()
47
+ {
48
+ "fetcher", "makeFetchDef", "makeResult",
49
+ "featureAdd", "featureHook", "featureInit",
50
+ };
51
+
52
+ // One client + one corpus runner for the whole suite (the go shape).
53
+ private static ProjectNameSDK? CLIENT;
54
+ private static Utility? UTILITY;
55
+ private static OmniResolver.Run? RUN;
56
+ private static readonly object RunLock = new();
57
+
58
+ private static OmniResolver.Run Run()
59
+ {
60
+ lock (RunLock)
61
+ {
62
+ if (RUN == null)
63
+ {
64
+ CLIENT = ProjectNameSDK.TestSDK(null, null);
65
+ UTILITY = CLIENT.GetUtility();
66
+ RUN = OmniResolver.MakeRunner(StructRunner.TestJsonPath(), CLIENT)("primary");
67
+ Assert.True(0 < RUN.Spec.Count,
68
+ "primary section not found in test.json");
69
+ }
70
+ return RUN;
71
+ }
72
+ }
40
73
 
41
- public PrimaryUtilityTest()
74
+ private static ProjectNameSDK GetClient()
42
75
  {
43
- var spec = TestRunner.LoadTestSpec();
44
- _primary = TestRunner.GetSpec(spec, "primary")
45
- ?? throw new InvalidOperationException("primary section not found in test.json");
46
- _client = ProjectNameSDK.TestSDK(null, null);
47
- _utility = _client.GetUtility();
76
+ Run();
77
+ return CLIENT!;
78
+ }
79
+
80
+ private static Utility GetUtil()
81
+ {
82
+ Run();
83
+ return UTILITY!;
84
+ }
85
+
86
+ // Run one corpus section, failing loudly when it would run ZERO cases.
87
+ // A renamed section, a fixture that failed to compile, or an empty set
88
+ // used to report PASS while running zero assertions - the whole point
89
+ // of a shared oracle lost without a single red test. (The guard lives
90
+ // here rather than in the runner, which is vendored verbatim; the
91
+ // shared corpus is a v0 spec, and v0 tolerates an empty set.)
92
+ private static void runsection(string name, OmniResolver.Subject subject)
93
+ {
94
+ var run = Run();
95
+ var section = run.Spec.TryGetValue(name, out var s)
96
+ ? s as Dictionary<string, object?> : null;
97
+ Assert.True(null != section, "test corpus section \"" + name +
98
+ "\" missing - check the name against .sdk/test/primary/");
99
+ var basic = section!.TryGetValue("basic", out var b)
100
+ ? b as Dictionary<string, object?> : null;
101
+ var set = basic != null && basic.TryGetValue("set", out var sv)
102
+ ? sv as List<object?> : null;
103
+ Assert.True(null != set, "test corpus section \"" + name +
104
+ "\" has no basic.set list - zero cases would run");
105
+ if (0 == set!.Count && !Pending.Contains(name))
106
+ {
107
+ Assert.Fail("test corpus section \"" + name + "\" is EMPTY - " +
108
+ "zero cases would run; add cases, or mark the fixture " +
109
+ "PENDING in .sdk/test/primary/");
110
+ }
111
+ run.RunSet(basic, subject);
48
112
  }
49
113
 
50
114
  // Helper: create basic test context.
51
- private Context MakeTestCtx(ProjectNameSDK client, Utility utility,
115
+ private static Context MakeTestCtx(ProjectNameSDK client, Utility utility,
52
116
  Dictionary<string, object?>? overrides)
53
117
  {
54
118
  var ctxmap = new Dictionary<string, object?>
@@ -68,7 +132,7 @@ public class PrimaryUtilityTest
68
132
  }
69
133
 
70
134
  // Helper: create full test context with point and match.
71
- private Context MakeTestFullCtx(ProjectNameSDK client, Utility utility)
135
+ private static Context MakeTestFullCtx(ProjectNameSDK client, Utility utility)
72
136
  {
73
137
  var ctx = MakeTestCtx(client, utility, null);
74
138
  ctx.Point = new Dictionary<string, object?>
@@ -99,95 +163,98 @@ public class PrimaryUtilityTest
99
163
  [Fact]
100
164
  public void Exists()
101
165
  {
102
- Assert.NotNull(_utility.Clean);
103
- Assert.NotNull(_utility.Done);
104
- Assert.NotNull(_utility.MakeError);
105
- Assert.NotNull(_utility.FeatureAdd);
106
- Assert.NotNull(_utility.FeatureHook);
107
- Assert.NotNull(_utility.FeatureInit);
108
- Assert.NotNull(_utility.Fetcher);
109
- Assert.NotNull(_utility.MakeFetchDef);
110
- Assert.NotNull(_utility.MakeContext);
111
- Assert.NotNull(_utility.MakeOptions);
112
- Assert.NotNull(_utility.MakeRequest);
113
- Assert.NotNull(_utility.MakeResponse);
114
- Assert.NotNull(_utility.MakeResult);
115
- Assert.NotNull(_utility.MakePoint);
116
- Assert.NotNull(_utility.MakeSpec);
117
- Assert.NotNull(_utility.MakeUrl);
118
- Assert.NotNull(_utility.Param);
119
- Assert.NotNull(_utility.PrepareAuth);
120
- Assert.NotNull(_utility.PrepareBody);
121
- Assert.NotNull(_utility.PrepareHeaders);
122
- Assert.NotNull(_utility.PrepareMethod);
123
- Assert.NotNull(_utility.PrepareParams);
124
- Assert.NotNull(_utility.PreparePath);
125
- Assert.NotNull(_utility.PrepareQuery);
126
- Assert.NotNull(_utility.ResultBasic);
127
- Assert.NotNull(_utility.ResultBody);
128
- Assert.NotNull(_utility.ResultHeaders);
129
- Assert.NotNull(_utility.TransformRequest);
130
- Assert.NotNull(_utility.TransformResponse);
166
+ var utility = GetUtil();
167
+ Assert.NotNull(utility.Clean);
168
+ Assert.NotNull(utility.Done);
169
+ Assert.NotNull(utility.MakeError);
170
+ Assert.NotNull(utility.FeatureAdd);
171
+ Assert.NotNull(utility.FeatureHook);
172
+ Assert.NotNull(utility.FeatureInit);
173
+ Assert.NotNull(utility.Fetcher);
174
+ Assert.NotNull(utility.MakeFetchDef);
175
+ Assert.NotNull(utility.MakeContext);
176
+ Assert.NotNull(utility.MakeOptions);
177
+ Assert.NotNull(utility.MakeRequest);
178
+ Assert.NotNull(utility.MakeResponse);
179
+ Assert.NotNull(utility.MakeResult);
180
+ Assert.NotNull(utility.MakePoint);
181
+ Assert.NotNull(utility.MakeSpec);
182
+ Assert.NotNull(utility.MakeUrl);
183
+ Assert.NotNull(utility.Param);
184
+ Assert.NotNull(utility.PrepareAuth);
185
+ Assert.NotNull(utility.PrepareBody);
186
+ Assert.NotNull(utility.PrepareHeaders);
187
+ Assert.NotNull(utility.PrepareMethod);
188
+ Assert.NotNull(utility.PrepareParams);
189
+ Assert.NotNull(utility.PreparePath);
190
+ Assert.NotNull(utility.PrepareQuery);
191
+ Assert.NotNull(utility.ResultBasic);
192
+ Assert.NotNull(utility.ResultBody);
193
+ Assert.NotNull(utility.ResultHeaders);
194
+ Assert.NotNull(utility.TransformRequest);
195
+ Assert.NotNull(utility.TransformResponse);
131
196
  }
132
197
 
133
198
  [Fact]
134
199
  public void CleanBasic()
135
200
  {
136
- var ctx = MakeTestCtx(_client, _utility, null);
201
+ var ctx = MakeTestCtx(GetClient(), GetUtil(), null);
137
202
  var val = new Dictionary<string, object?>
138
203
  {
139
204
  ["key"] = "secret123",
140
205
  ["name"] = "test",
141
206
  };
142
- var cleaned = _utility.Clean(ctx, val);
207
+ var cleaned = GetUtil().Clean(ctx, val);
143
208
  Assert.NotNull(cleaned);
144
209
  }
145
210
 
211
+ [Fact]
212
+ public void CleanCorpus()
213
+ {
214
+ runsection("clean", args =>
215
+ {
216
+ if (2 != args.Length)
217
+ {
218
+ throw new InvalidOperationException(
219
+ "clean: expected 2 args, got " + args.Length);
220
+ }
221
+ var ctx = OmniResolver.OmniCtx(args[0], GetClient(), GetUtil());
222
+ return GetUtil().Clean(ctx, args[1]);
223
+ });
224
+ }
225
+
146
226
  [Fact]
147
227
  public void DoneBasic()
148
228
  {
149
- TestRunner.RunSet(TestRunner.GetSpec(_primary, "done", "basic"), entry =>
229
+ runsection("done", args =>
150
230
  {
151
- var ctxmap = entry.TryGetValue("ctx", out var c)
152
- ? c as Dictionary<string, object?> : null;
153
- var ctx = TestRunner.MakeCtxFromMap(ctxmap, _client, _utility);
154
- TestRunner.FixCtx(ctx, _client);
155
- return _utility.Done(ctx);
231
+ var ctx = OmniResolver.OmniCtx(args[0], GetClient(), GetUtil());
232
+ return GetUtil().Done(ctx);
156
233
  });
157
234
  }
158
235
 
159
236
  [Fact]
160
237
  public void MakeErrorBasic()
161
238
  {
162
- TestRunner.RunSet(TestRunner.GetSpec(_primary, "makeError", "basic"), entry =>
239
+ runsection("makeError", args =>
163
240
  {
164
- var args = entry.TryGetValue("args", out var a)
165
- ? a as List<object?> : null;
166
- args ??= new List<object?> { new Dictionary<string, object?>() };
167
- if (args.Count == 0)
168
- {
169
- args = new List<object?> { new Dictionary<string, object?>() };
170
- }
171
-
172
- var ctxmap = args[0] as Dictionary<string, object?>
173
- ?? new Dictionary<string, object?>();
174
- var ctx = TestRunner.MakeCtxFromMap(ctxmap, _client, _utility);
175
- TestRunner.FixCtx(ctx, _client);
241
+ var ctxarg = 0 < args.Length ? args[0] : null;
242
+ var ctx = OmniResolver.OmniCtx(ctxarg, GetClient(), GetUtil());
176
243
 
177
244
  Exception? err = null;
178
- if (args.Count > 1 && args[1] is Dictionary<string, object?> errMap)
245
+ if (1 < args.Length && args[1] is Dictionary<string, object?> errMap)
179
246
  {
180
247
  err = TestRunner.ErrFromMap(errMap);
181
248
  }
182
249
 
183
- return _utility.MakeError(ctx, err);
250
+ return GetUtil().MakeError(ctx, err);
184
251
  });
185
252
  }
186
253
 
187
254
  [Fact]
188
255
  public void MakeErrorNoThrow()
189
256
  {
190
- var ctx = MakeTestFullCtx(_client, _utility);
257
+ var ctx = MakeTestFullCtx(GetClient(), GetUtil());
191
258
  ctx.Ctrl.Throw = false;
192
259
  ctx.Result = new Result(new Dictionary<string, object?>
193
260
  {
@@ -195,7 +262,7 @@ public class PrimaryUtilityTest
195
262
  ["resdata"] = new Dictionary<string, object?> { ["id"] = "safe01" },
196
263
  });
197
264
 
198
- var result = _utility.MakeError(ctx, ctx.MakeError("test_code", "test message"));
265
+ var result = GetUtil().MakeError(ctx, ctx.MakeError("test_code", "test message"));
199
266
  var om = result as Dictionary<string, object?>;
200
267
  Assert.True(om != null && Equals(om["id"], "safe01"),
201
268
  $"expected id=safe01, got {result}");
@@ -204,13 +271,14 @@ public class PrimaryUtilityTest
204
271
  [Fact]
205
272
  public void FeatureAddBasic()
206
273
  {
207
- var ctx = MakeTestCtx(_client, _utility, null);
208
- var startLen = _client.Features.Count;
274
+ var client = GetClient();
275
+ var ctx = MakeTestCtx(client, GetUtil(), null);
276
+ var startLen = client.Features.Count;
209
277
 
210
278
  var feature = new BaseFeature();
211
- _utility.FeatureAdd(ctx, feature);
279
+ GetUtil().FeatureAdd(ctx, feature);
212
280
 
213
- Assert.Equal(startLen + 1, _client.Features.Count);
281
+ Assert.Equal(startLen + 1, client.Features.Count);
214
282
  }
215
283
 
216
284
  [Fact]
@@ -278,8 +346,12 @@ public class PrimaryUtilityTest
278
346
  public void FetcherLive()
279
347
  {
280
348
  var calls = new List<Dictionary<string, object?>>();
349
+ // Concrete base: a live construction must satisfy any server
350
+ // variables a templated base URL declares; a literal base
351
+ // sidesteps the requirement.
281
352
  var liveClient = new ProjectNameSDK(new Dictionary<string, object?>
282
353
  {
354
+ ["base"] = "http://localhost:8080",
283
355
  ["system"] = new Dictionary<string, object?>
284
356
  {
285
357
  ["fetch"] = (Func<string, Dictionary<string, object?>, Dictionary<string, object?>>)
@@ -320,9 +392,10 @@ public class PrimaryUtilityTest
320
392
  public void FetcherBlockedTestMode()
321
393
  {
322
394
  // Create a live SDK then set mode to test (not using TestSDK, which
323
- // installs the test feature).
395
+ // installs the test feature). Concrete base: see FetcherLive.
324
396
  var blockedClient = new ProjectNameSDK(new Dictionary<string, object?>
325
397
  {
398
+ ["base"] = "http://localhost:8080",
326
399
  ["system"] = new Dictionary<string, object?>
327
400
  {
328
401
  ["fetch"] = (Func<string, Dictionary<string, object?>, Dictionary<string, object?>>)
@@ -352,12 +425,11 @@ public class PrimaryUtilityTest
352
425
  [Fact]
353
426
  public void MakeContextBasic()
354
427
  {
355
- TestRunner.RunSet(TestRunner.GetSpec(_primary, "makeContext", "basic"), entry =>
428
+ runsection("makeContext", args =>
356
429
  {
357
- if (entry.TryGetValue("in", out var inRaw) &&
358
- inRaw is Dictionary<string, object?> inMap)
430
+ if (args[0] is Dictionary<string, object?> inMap)
359
431
  {
360
- var ctx = _utility.MakeContext(inMap, null);
432
+ var ctx = GetUtil().MakeContext(inMap, null);
361
433
  var result = new Dictionary<string, object?>
362
434
  {
363
435
  ["id"] = ctx.Id,
@@ -379,7 +451,7 @@ public class PrimaryUtilityTest
379
451
  [Fact]
380
452
  public void MakeFetchDefBasic()
381
453
  {
382
- var ctx = MakeTestFullCtx(_client, _utility);
454
+ var ctx = MakeTestFullCtx(GetClient(), GetUtil());
383
455
  ctx.Spec = new Spec(new Dictionary<string, object?>
384
456
  {
385
457
  ["base"] = "http://localhost:8080",
@@ -397,7 +469,7 @@ public class PrimaryUtilityTest
397
469
  });
398
470
  ctx.Result = new Result(new Dictionary<string, object?>());
399
471
 
400
- var fetchdef = _utility.MakeFetchDef(ctx);
472
+ var fetchdef = GetUtil().MakeFetchDef(ctx);
401
473
  Assert.Equal("GET", fetchdef["method"]);
402
474
  var url = fetchdef["url"] as string ?? "";
403
475
  Assert.Contains("/api/items/item01", url);
@@ -410,7 +482,7 @@ public class PrimaryUtilityTest
410
482
  [Fact]
411
483
  public void MakeFetchDefWithBody()
412
484
  {
413
- var ctx = MakeTestFullCtx(_client, _utility);
485
+ var ctx = MakeTestFullCtx(GetClient(), GetUtil());
414
486
  ctx.Spec = new Spec(new Dictionary<string, object?>
415
487
  {
416
488
  ["base"] = "http://localhost:8080",
@@ -426,7 +498,7 @@ public class PrimaryUtilityTest
426
498
  });
427
499
  ctx.Result = new Result(new Dictionary<string, object?>());
428
500
 
429
- var fetchdef = _utility.MakeFetchDef(ctx);
501
+ var fetchdef = GetUtil().MakeFetchDef(ctx);
430
502
  Assert.Equal("POST", fetchdef["method"]);
431
503
  var bodyStr = Assert.IsType<string>(fetchdef["body"]);
432
504
  Assert.Contains("\"name\"", bodyStr);
@@ -435,46 +507,34 @@ public class PrimaryUtilityTest
435
507
  [Fact]
436
508
  public void MakeOptionsBasic()
437
509
  {
438
- TestRunner.RunSet(TestRunner.GetSpec(_primary, "makeOptions", "basic"), entry =>
510
+ runsection("makeOptions", args =>
439
511
  {
440
- var inMap = entry.TryGetValue("in", out var i)
441
- ? i as Dictionary<string, object?> : null;
442
- inMap ??= new Dictionary<string, object?>();
443
- var ctx = _utility.MakeContext(new Dictionary<string, object?>
512
+ var inMap = args[0] as Dictionary<string, object?>;
513
+ var ctxmap = new Dictionary<string, object?>();
514
+ if (inMap != null)
444
515
  {
445
- ["options"] = inMap.TryGetValue("options", out var o) ? o : null,
446
- ["config"] = inMap.TryGetValue("config", out var c) ? c : null,
447
- }, null);
448
- ctx.Client = _client;
449
- ctx.Utility = _utility;
450
- return _utility.MakeOptions(ctx);
516
+ ctxmap["options"] = inMap.TryGetValue("options", out var o) ? o : null;
517
+ ctxmap["config"] = inMap.TryGetValue("config", out var c) ? c : null;
518
+ }
519
+ var ctx = GetUtil().MakeContext(ctxmap, null);
520
+ ctx.Client = GetClient();
521
+ ctx.Utility = GetUtil();
522
+ return GetUtil().MakeOptions(ctx);
451
523
  });
452
524
  }
453
525
 
454
526
  [Fact]
455
527
  public void MakeRequestBasic()
456
528
  {
457
- TestRunner.RunSet(TestRunner.GetSpec(_primary, "makeRequest", "basic"), entry =>
529
+ runsection("makeRequest", args =>
458
530
  {
459
- var ctxmap = entry.TryGetValue("ctx", out var c)
460
- ? c as Dictionary<string, object?> : null;
461
- var ctx = TestRunner.MakeCtxFromMap(ctxmap, _client, _utility);
462
- ctx.Options = _client.OptionsMap();
531
+ var ctx = OmniResolver.OmniCtx(args[0], GetClient(), GetUtil());
532
+ ctx.Options = GetClient().OptionsMap();
463
533
 
464
- _utility.MakeRequest(ctx);
534
+ GetUtil().MakeRequest(ctx);
465
535
 
466
- // Update entry ctx for match checking.
467
- if (ctxmap != null)
468
- {
469
- if (ctx.Response != null)
470
- {
471
- ctxmap["response"] = "exists";
472
- }
473
- if (ctx.Result != null)
474
- {
475
- ctxmap["result"] = "exists";
476
- }
477
- }
536
+ // Expose response/result existence for the match assertions.
537
+ OmniResolver.OmniSyncCtx(args[0], ctx);
478
538
 
479
539
  return null;
480
540
  });
@@ -483,27 +543,13 @@ public class PrimaryUtilityTest
483
543
  [Fact]
484
544
  public void MakeResponseBasic()
485
545
  {
486
- TestRunner.RunSet(TestRunner.GetSpec(_primary, "makeResponse", "basic"), entry =>
546
+ runsection("makeResponse", args =>
487
547
  {
488
- var ctxmap = entry.TryGetValue("ctx", out var c)
489
- ? c as Dictionary<string, object?> : null;
490
- var ctx = TestRunner.MakeCtxFromMap(ctxmap, _client, _utility);
491
- TestRunner.FixCtx(ctx, _client);
548
+ var ctx = OmniResolver.OmniCtx(args[0], GetClient(), GetUtil());
492
549
 
493
- _utility.MakeResponse(ctx);
550
+ GetUtil().MakeResponse(ctx);
494
551
 
495
- // Update entry ctx for match checking with result data.
496
- if (ctxmap != null && ctx.Result != null)
497
- {
498
- ctxmap["result"] = new Dictionary<string, object?>
499
- {
500
- ["ok"] = ctx.Result.Ok,
501
- ["status"] = ctx.Result.Status,
502
- ["statusText"] = ctx.Result.StatusText,
503
- ["headers"] = ctx.Result.Headers,
504
- ["body"] = ctx.Result.Body,
505
- };
506
- }
552
+ OmniResolver.OmniSyncCtx(args[0], ctx);
507
553
 
508
554
  return null;
509
555
  });
@@ -512,7 +558,7 @@ public class PrimaryUtilityTest
512
558
  [Fact]
513
559
  public void MakeResultBasic()
514
560
  {
515
- var ctx = MakeTestFullCtx(_client, _utility);
561
+ var ctx = MakeTestFullCtx(GetClient(), GetUtil());
516
562
  ctx.Spec = new Spec(new Dictionary<string, object?>
517
563
  {
518
564
  ["base"] = "http://localhost:8080",
@@ -538,14 +584,14 @@ public class PrimaryUtilityTest
538
584
  },
539
585
  });
540
586
 
541
- var result = _utility.MakeResult(ctx);
587
+ var result = GetUtil().MakeResult(ctx);
542
588
  Assert.Equal(200, result.Status);
543
589
  }
544
590
 
545
591
  [Fact]
546
592
  public void MakeResultNoSpec()
547
593
  {
548
- var ctx = MakeTestFullCtx(_client, _utility);
594
+ var ctx = MakeTestFullCtx(GetClient(), GetUtil());
549
595
  ctx.Spec = null;
550
596
  ctx.Result = new Result(new Dictionary<string, object?>
551
597
  {
@@ -555,98 +601,118 @@ public class PrimaryUtilityTest
555
601
  ["headers"] = new Dictionary<string, object?>(),
556
602
  });
557
603
 
558
- Assert.ThrowsAny<Exception>(() => _utility.MakeResult(ctx));
604
+ Assert.ThrowsAny<Exception>(() => GetUtil().MakeResult(ctx));
559
605
  }
560
606
 
561
607
  [Fact]
562
608
  public void MakeResultNoResult()
563
609
  {
564
- var ctx = MakeTestFullCtx(_client, _utility);
610
+ var ctx = MakeTestFullCtx(GetClient(), GetUtil());
565
611
  ctx.Spec = new Spec(new Dictionary<string, object?> { ["step"] = "start" });
566
612
  ctx.Result = null;
567
613
 
568
- Assert.ThrowsAny<Exception>(() => _utility.MakeResult(ctx));
614
+ Assert.ThrowsAny<Exception>(() => GetUtil().MakeResult(ctx));
569
615
  }
570
616
 
571
617
  [Fact]
572
618
  public void MakeSpecBasic()
573
619
  {
574
- var setupOpts = TestRunner.GetSpec(_primary, "makeSpec", "DEF", "setup", "a");
620
+ var setupOpts = TestRunner.GetSpec(Run().Spec, "makeSpec", "DEF", "setup", "a");
575
621
  var specClient = ProjectNameSDK.TestSDK(null, setupOpts);
576
622
  var specUtility = specClient.GetUtility();
577
623
 
578
- TestRunner.RunSet(TestRunner.GetSpec(_primary, "makeSpec", "basic"), entry =>
624
+ runsection("makeSpec", args =>
579
625
  {
580
- var ctxmap = entry.TryGetValue("ctx", out var c)
581
- ? c as Dictionary<string, object?> : null;
582
- var ctx = TestRunner.MakeCtxFromMap(ctxmap, specClient, specUtility);
626
+ var ctx = OmniResolver.OmniCtx(args[0], specClient, specUtility);
583
627
  ctx.Options = specClient.OptionsMap();
584
628
 
585
- _utility.MakeSpec(ctx);
629
+ specUtility.MakeSpec(ctx);
586
630
 
587
- // Update entry ctx for match.
588
- if (ctxmap != null && ctx.Spec != null)
589
- {
590
- ctxmap["spec"] = new Dictionary<string, object?>
591
- {
592
- ["base"] = ctx.Spec.Base,
593
- ["prefix"] = ctx.Spec.Prefix,
594
- ["suffix"] = ctx.Spec.Suffix,
595
- ["method"] = ctx.Spec.Method,
596
- ["params"] = ctx.Spec.Params,
597
- ["query"] = ctx.Spec.Query,
598
- ["headers"] = ctx.Spec.Headers,
599
- ["step"] = ctx.Spec.Step,
600
- };
601
- }
631
+ OmniResolver.OmniSyncCtx(args[0], ctx);
602
632
 
603
633
  return null;
604
634
  });
605
635
  }
606
636
 
637
+ // A minimal IEntity: Context resolves the op through the entity
638
+ // interface, and a literal {name: ...} map from the fixture is not one
639
+ // - entname would be "" and every lookup would miss, reporting
640
+ // point_no_points for all cases. TS reads the same field with getprop
641
+ // and accepts the plain map. (The go peer is plEntity.)
642
+ private sealed class PlEntity : IEntity
643
+ {
644
+ private readonly string name;
645
+
646
+ public PlEntity(string name)
647
+ {
648
+ this.name = name;
649
+ }
650
+
651
+ public string GetName() => name;
652
+
653
+ public IEntity Make() => new PlEntity(name);
654
+
655
+ public object? Data(object? data = null) => null;
656
+
657
+ public object? Match(object? match = null) => null;
658
+
659
+ public void MarkDeleted() { }
660
+
661
+ public bool Deleted() => false;
662
+ }
663
+
664
+ // Corpus-driven, like go: TS returns the error AS the value; C# throws
665
+ // ProjectNameError. The corpus says `match: out: code` for both, so
666
+ // the error is normalised to a map carrying its code here rather than
667
+ // forking the fixture per language.
607
668
  [Fact]
608
669
  public void MakePointBasic()
609
670
  {
610
- var ctx = MakeTestCtx(_client, _utility, null);
611
- var point = new Dictionary<string, object?>
671
+ runsection("makePoint", args =>
612
672
  {
613
- ["parts"] = new List<object?> { "items", "{id}" },
614
- ["args"] = new Dictionary<string, object?>
673
+ var ctxmap = args[0] as Dictionary<string, object?>
674
+ ?? new Dictionary<string, object?>();
675
+
676
+ if (ctxmap.TryGetValue("entity", out var em) &&
677
+ em is Dictionary<string, object?> entityMap)
615
678
  {
616
- ["params"] = new List<object?>(),
617
- },
618
- ["params"] = new List<object?>(),
619
- ["alias"] = new Dictionary<string, object?>(),
620
- ["select"] = new Dictionary<string, object?>(),
621
- ["active"] = true,
622
- ["transform"] = new Dictionary<string, object?>(),
623
- };
624
- ctx.Op!.Points = new List<Dictionary<string, object?>> { point };
679
+ var name = entityMap.TryGetValue("name", out var n)
680
+ ? n as string ?? "" : "";
681
+ ctxmap = new Dictionary<string, object?>(ctxmap)
682
+ {
683
+ ["entity"] = new PlEntity(name),
684
+ };
685
+ }
625
686
 
626
- _utility.MakePoint(ctx);
627
- Assert.NotNull(ctx.Point);
687
+ var ctx = OmniResolver.OmniCtx(ctxmap, GetClient(), GetUtil());
688
+ try
689
+ {
690
+ return GetUtil().MakePoint(ctx);
691
+ }
692
+ catch (ProjectNameError e)
693
+ {
694
+ return new Dictionary<string, object?> { ["code"] = e.Code };
695
+ }
696
+ });
628
697
  }
629
698
 
630
699
  [Fact]
631
700
  public void MakeUrlBasic()
632
701
  {
633
- TestRunner.RunSet(TestRunner.GetSpec(_primary, "makeUrl", "basic"), entry =>
702
+ runsection("makeUrl", args =>
634
703
  {
635
- var ctxmap = entry.TryGetValue("ctx", out var c)
636
- ? c as Dictionary<string, object?> : null;
637
- var ctx = TestRunner.MakeCtxFromMap(ctxmap, _client, _utility);
704
+ var ctx = OmniResolver.OmniCtx(args[0], GetClient(), GetUtil());
638
705
  ctx.Result ??= new Result(new Dictionary<string, object?>());
639
- return _utility.MakeUrl(ctx);
706
+ return GetUtil().MakeUrl(ctx);
640
707
  });
641
708
  }
642
709
 
643
710
  [Fact]
644
711
  public void OperatorBasic()
645
712
  {
646
- TestRunner.RunSet(TestRunner.GetSpec(_primary, "operator", "basic"), entry =>
713
+ runsection("operator", args =>
647
714
  {
648
- var inMap = entry.TryGetValue("in", out var i)
649
- ? i as Dictionary<string, object?> : null;
715
+ var inMap = args[0] as Dictionary<string, object?>;
650
716
  var op = new Operation(inMap ?? new Dictionary<string, object?>());
651
717
  return new Dictionary<string, object?>
652
718
  {
@@ -661,51 +727,20 @@ public class PrimaryUtilityTest
661
727
  [Fact]
662
728
  public void ParamBasic()
663
729
  {
664
- TestRunner.RunSet(TestRunner.GetSpec(_primary, "param", "basic"), entry =>
730
+ runsection("param", args =>
665
731
  {
666
- var args = entry.TryGetValue("args", out var a)
667
- ? a as List<object?> : null;
668
- if (args == null || args.Count < 2)
732
+ if (args.Length < 2)
669
733
  {
670
734
  return null;
671
735
  }
672
736
 
673
- var ctxmap = args[0] as Dictionary<string, object?>
674
- ?? new Dictionary<string, object?>();
675
- var ctx = TestRunner.MakeCtxFromMap(ctxmap, _client, _utility);
737
+ var ctx = OmniResolver.OmniCtx(args[0], GetClient(), GetUtil());
676
738
  var paramdef = args[1];
677
739
 
678
- var result = _utility.Param(ctx, paramdef);
679
-
680
- // Copy spec alias back to entry ctx for matching.
681
- if (entry.TryGetValue("match", out var msRaw) &&
682
- msRaw is Dictionary<string, object?> matchSpec &&
683
- matchSpec.TryGetValue("ctx", out var cmRaw) &&
684
- cmRaw is Dictionary<string, object?> ctxMatch &&
685
- ctxMatch.TryGetValue("spec", out var smRaw) &&
686
- smRaw is Dictionary<string, object?> specMatch &&
687
- specMatch.ContainsKey("alias") &&
688
- ctx.Spec != null)
689
- {
690
- if (entry.TryGetValue("ctx", out var ec) &&
691
- ec is Dictionary<string, object?> entryCtx)
692
- {
693
- entryCtx["spec"] = new Dictionary<string, object?>
694
- {
695
- ["alias"] = ctx.Spec.Alias,
696
- };
697
- }
698
- else
699
- {
700
- entry["ctx"] = new Dictionary<string, object?>
701
- {
702
- ["spec"] = new Dictionary<string, object?>
703
- {
704
- ["alias"] = ctx.Spec.Alias,
705
- },
706
- };
707
- }
708
- }
740
+ var result = GetUtil().Param(ctx, paramdef);
741
+
742
+ // The spec alias mutation is what the match assertions read.
743
+ OmniResolver.OmniSyncCtx(args[0], ctx);
709
744
 
710
745
  return result;
711
746
  });
@@ -714,27 +749,17 @@ public class PrimaryUtilityTest
714
749
  [Fact]
715
750
  public void PrepareAuthBasic()
716
751
  {
717
- var setupOpts = TestRunner.GetSpec(_primary, "prepareAuth", "DEF", "setup", "a");
752
+ var setupOpts = TestRunner.GetSpec(Run().Spec, "prepareAuth", "DEF", "setup", "a");
718
753
  var authClient = ProjectNameSDK.TestSDK(null, setupOpts);
719
754
  var authUtility = authClient.GetUtility();
720
755
 
721
- TestRunner.RunSet(TestRunner.GetSpec(_primary, "prepareAuth", "basic"), entry =>
756
+ runsection("prepareAuth", args =>
722
757
  {
723
- var ctxmap = entry.TryGetValue("ctx", out var c)
724
- ? c as Dictionary<string, object?> : null;
725
- var ctx = TestRunner.MakeCtxFromMap(ctxmap, authClient, authUtility);
726
- TestRunner.FixCtx(ctx, authClient);
758
+ var ctx = OmniResolver.OmniCtx(args[0], authClient, authUtility);
727
759
 
728
- _utility.PrepareAuth(ctx);
760
+ authUtility.PrepareAuth(ctx);
729
761
 
730
- // Update entry ctx for match.
731
- if (ctxmap != null && ctx.Spec != null)
732
- {
733
- ctxmap["spec"] = new Dictionary<string, object?>
734
- {
735
- ["headers"] = ctx.Spec.Headers,
736
- };
737
- }
762
+ OmniResolver.OmniSyncCtx(args[0], ctx);
738
763
 
739
764
  return null;
740
765
  });
@@ -743,91 +768,79 @@ public class PrimaryUtilityTest
743
768
  [Fact]
744
769
  public void PrepareBodyBasic()
745
770
  {
746
- TestRunner.RunSet(TestRunner.GetSpec(_primary, "prepareBody", "basic"), entry =>
771
+ runsection("prepareBody", args =>
747
772
  {
748
- var ctxmap = entry.TryGetValue("ctx", out var c)
749
- ? c as Dictionary<string, object?> : null;
750
- var ctx = TestRunner.MakeCtxFromMap(ctxmap, _client, _utility);
751
- TestRunner.FixCtx(ctx, _client);
752
- return _utility.PrepareBody(ctx);
773
+ var ctx = OmniResolver.OmniCtx(args[0], GetClient(), GetUtil());
774
+ return GetUtil().PrepareBody(ctx);
753
775
  });
754
776
  }
755
777
 
756
778
  [Fact]
757
779
  public void PrepareHeadersBasic()
758
780
  {
759
- TestRunner.RunSet(TestRunner.GetSpec(_primary, "prepareHeaders", "basic"), entry =>
781
+ runsection("prepareHeaders", args =>
760
782
  {
761
- var ctxmap = entry.TryGetValue("ctx", out var c)
762
- ? c as Dictionary<string, object?> : null;
763
- var ctx = TestRunner.MakeCtxFromMap(ctxmap, _client, _utility);
764
- return _utility.PrepareHeaders(ctx);
783
+ var ctx = OmniResolver.OmniCtx(args[0], GetClient(), GetUtil());
784
+ return GetUtil().PrepareHeaders(ctx);
765
785
  });
766
786
  }
767
787
 
768
788
  [Fact]
769
789
  public void PrepareMethodBasic()
770
790
  {
771
- TestRunner.RunSet(TestRunner.GetSpec(_primary, "prepareMethod", "basic"), entry =>
791
+ runsection("prepareMethod", args =>
772
792
  {
773
- var ctxmap = entry.TryGetValue("ctx", out var c)
774
- ? c as Dictionary<string, object?> : null;
775
- var ctx = TestRunner.MakeCtxFromMap(ctxmap, _client, _utility);
776
- return _utility.PrepareMethod(ctx);
793
+ var ctx = OmniResolver.OmniCtx(args[0], GetClient(), GetUtil());
794
+ // An op the API does not define resolves NO method; ts answers
795
+ // undefined there and C# answers null - both are "no value" to
796
+ // the corpus.
797
+ var method = GetUtil().PrepareMethod(ctx);
798
+ return string.IsNullOrEmpty(method) ? null : method;
777
799
  });
778
800
  }
779
801
 
780
802
  [Fact]
781
803
  public void PrepareParamsBasic()
782
804
  {
783
- TestRunner.RunSet(TestRunner.GetSpec(_primary, "prepareParams", "basic"), entry =>
805
+ runsection("prepareParams", args =>
784
806
  {
785
- var ctxmap = entry.TryGetValue("ctx", out var c)
786
- ? c as Dictionary<string, object?> : null;
787
- var ctx = TestRunner.MakeCtxFromMap(ctxmap, _client, _utility);
788
- return _utility.PrepareParams(ctx);
807
+ var ctx = OmniResolver.OmniCtx(args[0], GetClient(), GetUtil());
808
+ return GetUtil().PrepareParams(ctx);
789
809
  });
790
810
  }
791
811
 
792
812
  // Was two hand-written cases that had drifted out of the shared corpus
793
- // (the preparePath fixture shipped as an empty `set: []`). Now driven by
794
- // the corpus like every other section, so all ports assert the same
813
+ // (the preparePath fixture shipped as an empty `set: []`). Now driven
814
+ // by the corpus like every other section, so all ports assert the same
795
815
  // separator / blank-segment behaviour.
796
816
  [Fact]
797
817
  public void PreparePathBasic()
798
818
  {
799
- TestRunner.RunSet(TestRunner.GetSpec(_primary, "preparePath", "basic"), entry =>
819
+ runsection("preparePath", args =>
800
820
  {
801
- var ctxmap = entry.TryGetValue("ctx", out var c)
802
- ? c as Dictionary<string, object?> : null;
803
- var ctx = TestRunner.MakeCtxFromMap(ctxmap, _client, _utility);
804
- return _utility.PreparePath(ctx);
821
+ var ctx = OmniResolver.OmniCtx(args[0], GetClient(), GetUtil());
822
+ return GetUtil().PreparePath(ctx);
805
823
  });
806
824
  }
807
825
 
808
826
  [Fact]
809
827
  public void PrepareQueryBasic()
810
828
  {
811
- TestRunner.RunSet(TestRunner.GetSpec(_primary, "prepareQuery", "basic"), entry =>
829
+ runsection("prepareQuery", args =>
812
830
  {
813
- var ctxmap = entry.TryGetValue("ctx", out var c)
814
- ? c as Dictionary<string, object?> : null;
815
- var ctx = TestRunner.MakeCtxFromMap(ctxmap, _client, _utility);
816
- return _utility.PrepareQuery(ctx);
831
+ var ctx = OmniResolver.OmniCtx(args[0], GetClient(), GetUtil());
832
+ return GetUtil().PrepareQuery(ctx);
817
833
  });
818
834
  }
819
835
 
820
836
  [Fact]
821
837
  public void ResultBasicBasic()
822
838
  {
823
- TestRunner.RunSet(TestRunner.GetSpec(_primary, "resultBasic", "basic"), entry =>
839
+ runsection("resultBasic", args =>
824
840
  {
825
- var ctxmap = entry.TryGetValue("ctx", out var c)
826
- ? c as Dictionary<string, object?> : null;
827
- var ctx = TestRunner.MakeCtxFromMap(ctxmap, _client, _utility);
828
- TestRunner.FixCtx(ctx, _client);
841
+ var ctx = OmniResolver.OmniCtx(args[0], GetClient(), GetUtil());
829
842
 
830
- var result = _utility.ResultBasic(ctx);
843
+ var result = GetUtil().ResultBasic(ctx);
831
844
 
832
845
  var res = new Dictionary<string, object?>
833
846
  {
@@ -849,21 +862,13 @@ public class PrimaryUtilityTest
849
862
  [Fact]
850
863
  public void ResultBodyBasic()
851
864
  {
852
- TestRunner.RunSet(TestRunner.GetSpec(_primary, "resultBody", "basic"), entry =>
865
+ runsection("resultBody", args =>
853
866
  {
854
- var ctxmap = entry.TryGetValue("ctx", out var c)
855
- ? c as Dictionary<string, object?> : null;
856
- var ctx = TestRunner.MakeCtxFromMap(ctxmap, _client, _utility);
867
+ var ctx = OmniResolver.OmniCtx(args[0], GetClient(), GetUtil());
857
868
 
858
- _utility.ResultBody(ctx);
869
+ GetUtil().ResultBody(ctx);
859
870
 
860
- if (ctxmap != null && ctx.Result != null)
861
- {
862
- ctxmap["result"] = new Dictionary<string, object?>
863
- {
864
- ["body"] = ctx.Result.Body,
865
- };
866
- }
871
+ OmniResolver.OmniSyncCtx(args[0], ctx);
867
872
 
868
873
  return null;
869
874
  });
@@ -872,21 +877,13 @@ public class PrimaryUtilityTest
872
877
  [Fact]
873
878
  public void ResultHeadersBasic()
874
879
  {
875
- TestRunner.RunSet(TestRunner.GetSpec(_primary, "resultHeaders", "basic"), entry =>
880
+ runsection("resultHeaders", args =>
876
881
  {
877
- var ctxmap = entry.TryGetValue("ctx", out var c)
878
- ? c as Dictionary<string, object?> : null;
879
- var ctx = TestRunner.MakeCtxFromMap(ctxmap, _client, _utility);
882
+ var ctx = OmniResolver.OmniCtx(args[0], GetClient(), GetUtil());
880
883
 
881
- _utility.ResultHeaders(ctx);
884
+ GetUtil().ResultHeaders(ctx);
882
885
 
883
- if (ctxmap != null && ctx.Result != null)
884
- {
885
- ctxmap["result"] = new Dictionary<string, object?>
886
- {
887
- ["headers"] = ctx.Result.Headers,
888
- };
889
- }
886
+ OmniResolver.OmniSyncCtx(args[0], ctx);
890
887
 
891
888
  return null;
892
889
  });
@@ -895,21 +892,14 @@ public class PrimaryUtilityTest
895
892
  [Fact]
896
893
  public void TransformRequestBasic()
897
894
  {
898
- TestRunner.RunSet(TestRunner.GetSpec(_primary, "transformRequest", "basic"), entry =>
895
+ runsection("transformRequest", args =>
899
896
  {
900
- var ctxmap = entry.TryGetValue("ctx", out var c)
901
- ? c as Dictionary<string, object?> : null;
902
- var ctx = TestRunner.MakeCtxFromMap(ctxmap, _client, _utility);
897
+ var ctx = OmniResolver.OmniCtx(args[0], GetClient(), GetUtil());
903
898
 
904
- var result = _utility.TransformRequest(ctx);
899
+ var result = GetUtil().TransformRequest(ctx);
905
900
 
906
- // Update entry ctx for match (step changed).
907
- if (ctxmap != null && ctx.Spec != null &&
908
- ctxmap.TryGetValue("spec", out var smRaw) &&
909
- smRaw is Dictionary<string, object?> specMap)
910
- {
911
- specMap["step"] = ctx.Spec.Step;
912
- }
901
+ // The step advance is what the match assertion reads.
902
+ OmniResolver.OmniSyncCtx(args[0], ctx);
913
903
 
914
904
  return result;
915
905
  });
@@ -918,20 +908,13 @@ public class PrimaryUtilityTest
918
908
  [Fact]
919
909
  public void TransformResponseBasic()
920
910
  {
921
- TestRunner.RunSet(TestRunner.GetSpec(_primary, "transformResponse", "basic"), entry =>
911
+ runsection("transformResponse", args =>
922
912
  {
923
- var ctxmap = entry.TryGetValue("ctx", out var c)
924
- ? c as Dictionary<string, object?> : null;
925
- var ctx = TestRunner.MakeCtxFromMap(ctxmap, _client, _utility);
913
+ var ctx = OmniResolver.OmniCtx(args[0], GetClient(), GetUtil());
926
914
 
927
- var result = _utility.TransformResponse(ctx);
915
+ var result = GetUtil().TransformResponse(ctx);
928
916
 
929
- if (ctxmap != null && ctx.Spec != null &&
930
- ctxmap.TryGetValue("spec", out var smRaw) &&
931
- smRaw is Dictionary<string, object?> specMap)
932
- {
933
- specMap["step"] = ctx.Spec.Step;
934
- }
917
+ OmniResolver.OmniSyncCtx(args[0], ctx);
935
918
 
936
919
  return result;
937
920
  });