@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,8 +1,14 @@
1
1
  package JAVAPACKAGE.sdktest;
2
2
 
3
3
  // Drives the primary utility functions against the shared test.json spec
4
- // (../.sdk/test/test.json, section "primary"). Mirrors
4
+ // (../.sdk/test/test.json, section "primary") through the VENDORED omni
5
+ // runner (OmniResolver over test/vendor/omni). Mirrors
5
6
  // tm/go/test/primary_utility_test.go.
7
+ //
8
+ // Subjects receive omni's native argument list: a ctx entry arrives as
9
+ // args[0], a MAP - OmniResolver.omniCtx builds the typed Context a
10
+ // generated utility takes, and OmniResolver.omniSyncCtx writes the
11
+ // observable ctx state back for `match: {ctx: ...}` assertions.
6
12
 
7
13
  import static org.junit.jupiter.api.Assertions.assertEquals;
8
14
  import static org.junit.jupiter.api.Assertions.assertFalse;
@@ -12,24 +18,23 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
12
18
  import static org.junit.jupiter.api.Assertions.fail;
13
19
 
14
20
  import static JAVAPACKAGE.sdktest.FeatureHarness.fhMap;
15
- import static JAVAPACKAGE.sdktest.RunnerSupport.getSpec;
16
- import static JAVAPACKAGE.sdktest.RunnerSupport.loadTestSpec;
17
- import static JAVAPACKAGE.sdktest.RunnerSupport.makeCtxFromMap;
18
- import static JAVAPACKAGE.sdktest.RunnerSupport.runset;
19
21
 
20
22
  import java.util.ArrayList;
21
23
  import java.util.LinkedHashMap;
22
24
  import java.util.List;
23
25
  import java.util.Map;
26
+ import java.util.Set;
24
27
  import java.util.function.BiFunction;
25
28
 
26
29
  import org.junit.jupiter.api.Test;
27
30
 
28
31
  import JAVAPACKAGE.core.Context;
32
+ import JAVAPACKAGE.core.Entity;
29
33
  import JAVAPACKAGE.core.Helpers;
30
34
  import JAVAPACKAGE.core.Operation;
31
35
  import JAVAPACKAGE.core.ProjectNameSDK;
32
36
  import JAVAPACKAGE.core.Result;
37
+ import JAVAPACKAGE.core.SdkError;
33
38
  import JAVAPACKAGE.core.Spec;
34
39
  import JAVAPACKAGE.core.Utility;
35
40
  import JAVAPACKAGE.feature.BaseFeature;
@@ -37,15 +42,62 @@ import JAVAPACKAGE.feature.BaseFeature;
37
42
  @SuppressWarnings({"unchecked"})
38
43
  public class PrimaryUtilityTest {
39
44
 
40
- static Map<String, Object> primary() {
41
- Map<String, Object> spec = loadTestSpec();
42
- Map<String, Object> primary = getSpec(spec, "primary");
43
- assertNotNull(primary, "primary section not found in test.json");
44
- return primary;
45
+ static final String TEST_JSON_FILE = "../.sdk/test/test.json";
46
+
47
+ // PENDING sections are the ones deliberately left empty in the shared
48
+ // corpus (.sdk/test/primary/<name>.aon). Everything else MUST contribute
49
+ // cases.
50
+ static final Set<String> PENDING = Set.of(
51
+ "fetcher", "makeFetchDef", "makeResult",
52
+ "featureAdd", "featureHook", "featureInit");
53
+
54
+ // One client + one corpus runner for the whole suite (the go shape).
55
+ private static ProjectNameSDK CLIENT;
56
+ private static Utility UTILITY;
57
+ private static OmniResolver.Run RUN;
58
+
59
+ static synchronized OmniResolver.Run run() {
60
+ if (RUN == null) {
61
+ CLIENT = ProjectNameSDK.testSDK();
62
+ UTILITY = CLIENT.getUtility();
63
+ RUN = OmniResolver.makeRunner(TEST_JSON_FILE, CLIENT).runner("primary", null);
64
+ assertNotNull(RUN.spec, "primary section not found in test.json");
65
+ }
66
+ return RUN;
45
67
  }
46
68
 
47
69
  static ProjectNameSDK client() {
48
- return ProjectNameSDK.testSDK();
70
+ run();
71
+ return CLIENT;
72
+ }
73
+
74
+ static Utility utility() {
75
+ run();
76
+ return UTILITY;
77
+ }
78
+
79
+ // Run one corpus section, failing loudly when it would run ZERO cases.
80
+ // A renamed section, a fixture that failed to compile, or an empty set
81
+ // used to report PASS while running zero assertions - the whole point of
82
+ // a shared oracle lost without a single red test. (The guard lives here
83
+ // rather than in the runner, which is vendored verbatim; the shared
84
+ // corpus is a v0 spec, and v0 tolerates an empty set.)
85
+ static void runsection(String name, OmniResolver.Subject subject) {
86
+ OmniResolver.Run run = run();
87
+ Map<String, Object> section = Helpers.toMapAny(run.spec.get(name));
88
+ assertNotNull(section, "test corpus section \"" + name
89
+ + "\" missing - check the name against .sdk/test/primary/");
90
+ Map<String, Object> basic = Helpers.toMapAny(section.get("basic"));
91
+ Object set = basic == null ? null : basic.get("set");
92
+ if (!(set instanceof List)) {
93
+ fail("test corpus section \"" + name
94
+ + "\" has no basic.set list - zero cases would run");
95
+ }
96
+ if (((List<Object>) set).isEmpty() && !PENDING.contains(name)) {
97
+ fail("test corpus section \"" + name + "\" is EMPTY - zero cases "
98
+ + "would run; add cases, or mark the fixture PENDING in .sdk/test/primary/");
99
+ }
100
+ run.runset(basic, subject);
49
101
  }
50
102
 
51
103
  // Helper: create basic test context.
@@ -86,8 +138,7 @@ public class PrimaryUtilityTest {
86
138
 
87
139
  @Test
88
140
  public void exists() {
89
- ProjectNameSDK client = client();
90
- Utility utility = client.getUtility();
141
+ Utility utility = utility();
91
142
 
92
143
  assertNotNull(utility.clean, "clean");
93
144
  assertNotNull(utility.done, "done");
@@ -123,55 +174,53 @@ public class PrimaryUtilityTest {
123
174
  @Test
124
175
  public void cleanBasic() {
125
176
  ProjectNameSDK client = client();
126
- Utility utility = client.getUtility();
177
+ Utility utility = utility();
127
178
  Context ctx = makeTestCtx(client, utility, null);
128
179
  Object cleaned = utility.clean.apply(ctx, fhMap("key", "secret123", "name", "test"));
129
180
  assertNotNull(cleaned, "cleaned should not be null");
130
181
  }
131
182
 
183
+ @Test
184
+ public void cleanCorpus() {
185
+ runsection("clean", (args) -> {
186
+ if (2 != args.length) {
187
+ throw new RuntimeException("clean: expected 2 args, got " + args.length);
188
+ }
189
+ Context ctx = OmniResolver.omniCtx(args[0], client(), utility());
190
+ return utility().clean.apply(ctx, args[1]);
191
+ });
192
+ }
193
+
132
194
  @Test
133
195
  public void doneBasic() {
134
- ProjectNameSDK client = client();
135
- Utility utility = client.getUtility();
136
- runset(getSpec(primary(), "done", "basic"), (entry) -> {
137
- Map<String, Object> ctxmap = Helpers.toMapAny(entry.get("ctx"));
138
- Context ctx = makeCtxFromMap(ctxmap, client, utility);
139
- RunnerSupport.fixctx(ctx, client);
140
- return utility.done.apply(ctx);
196
+ runsection("done", (args) -> {
197
+ Context ctx = OmniResolver.omniCtx(args[0], client(), utility());
198
+ return utility().done.apply(ctx);
141
199
  });
142
200
  }
143
201
 
144
202
  @Test
145
203
  public void makeErrorBasic() {
146
- ProjectNameSDK client = client();
147
- Utility utility = client.getUtility();
148
- runset(getSpec(primary(), "makeError", "basic"), (entry) -> {
149
- List<Object> args = entry.get("args") instanceof List
150
- ? (List<Object>) entry.get("args") : new ArrayList<>();
151
- if (args.isEmpty()) {
152
- args.add(new LinkedHashMap<String, Object>());
204
+ runsection("makeError", (args) -> {
205
+ if (0 == args.length) {
206
+ args = new Object[] { new LinkedHashMap<String, Object>() };
153
207
  }
154
208
 
155
- Map<String, Object> ctxmap = Helpers.toMapAny(args.get(0));
156
- if (ctxmap == null) {
157
- ctxmap = new LinkedHashMap<>();
158
- }
159
- Context ctx = makeCtxFromMap(ctxmap, client, utility);
160
- RunnerSupport.fixctx(ctx, client);
209
+ Context ctx = OmniResolver.omniCtx(args[0], client(), utility());
161
210
 
162
211
  RuntimeException err = null;
163
- if (args.size() > 1) {
164
- err = RunnerSupport.errFromMap(Helpers.toMapAny(args.get(1)));
212
+ if (args.length > 1) {
213
+ err = RunnerSupport.errFromMap(Helpers.toMapAny(args[1]));
165
214
  }
166
215
 
167
- return utility.makeError.apply(ctx, err);
216
+ return utility().makeError.apply(ctx, err);
168
217
  });
169
218
  }
170
219
 
171
220
  @Test
172
221
  public void makeErrorNoThrow() {
173
222
  ProjectNameSDK client = client();
174
- Utility utility = client.getUtility();
223
+ Utility utility = utility();
175
224
  Context ctx = makeTestFullCtx(client, utility);
176
225
  ctx.ctrl.throwing = false;
177
226
  Map<String, Object> resmap = new LinkedHashMap<>();
@@ -189,7 +238,7 @@ public class PrimaryUtilityTest {
189
238
  @Test
190
239
  public void featureAddBasic() {
191
240
  ProjectNameSDK client = client();
192
- Utility utility = client.getUtility();
241
+ Utility utility = utility();
193
242
  Context ctx = makeTestCtx(client, utility, null);
194
243
  int startLen = client.features.size();
195
244
 
@@ -210,7 +259,7 @@ public class PrimaryUtilityTest {
210
259
 
211
260
  @Test
212
261
  public void featureHookBasic() {
213
- ProjectNameSDK hookClient = client();
262
+ ProjectNameSDK hookClient = ProjectNameSDK.testSDK();
214
263
  Utility hookUtility = hookClient.getUtility();
215
264
  Context ctx = makeTestCtx(hookClient, hookUtility, null);
216
265
 
@@ -236,7 +285,7 @@ public class PrimaryUtilityTest {
236
285
 
237
286
  @Test
238
287
  public void featureInitBasic() {
239
- ProjectNameSDK initClient = client();
288
+ ProjectNameSDK initClient = ProjectNameSDK.testSDK();
240
289
  Utility initUtility = initClient.getUtility();
241
290
  Context ctx = makeTestCtx(initClient, initUtility, null);
242
291
  ctx.options.put("feature", fhMap("initfeat", fhMap("active", true)));
@@ -253,7 +302,7 @@ public class PrimaryUtilityTest {
253
302
 
254
303
  @Test
255
304
  public void featureInitInactive() {
256
- ProjectNameSDK initClient = client();
305
+ ProjectNameSDK initClient = ProjectNameSDK.testSDK();
257
306
  Utility initUtility = initClient.getUtility();
258
307
  Context ctx = makeTestCtx(initClient, initUtility, null);
259
308
  ctx.options.put("feature", fhMap("nofeat", fhMap("active", false)));
@@ -329,12 +378,10 @@ public class PrimaryUtilityTest {
329
378
 
330
379
  @Test
331
380
  public void makeContextBasic() {
332
- ProjectNameSDK client = client();
333
- Utility utility = client.getUtility();
334
- runset(getSpec(primary(), "makeContext", "basic"), (entry) -> {
335
- Map<String, Object> in = Helpers.toMapAny(entry.get("in"));
381
+ runsection("makeContext", (args) -> {
382
+ Map<String, Object> in = Helpers.toMapAny(args[0]);
336
383
  if (in != null) {
337
- Context ctx = utility.makeContext.apply(in, null);
384
+ Context ctx = utility().makeContext.apply(in, null);
338
385
  Map<String, Object> out = new LinkedHashMap<>();
339
386
  out.put("id", ctx.id);
340
387
  if (ctx.op != null) {
@@ -349,7 +396,7 @@ public class PrimaryUtilityTest {
349
396
  @Test
350
397
  public void makeFetchDefBasic() {
351
398
  ProjectNameSDK client = client();
352
- Utility utility = client.getUtility();
399
+ Utility utility = utility();
353
400
  Context ctx = makeTestFullCtx(client, utility);
354
401
  ctx.spec = new Spec(fhMap(
355
402
  "base", "http://localhost:8080",
@@ -376,7 +423,7 @@ public class PrimaryUtilityTest {
376
423
  @Test
377
424
  public void makeFetchDefWithBody() {
378
425
  ProjectNameSDK client = client();
379
- Utility utility = client.getUtility();
426
+ Utility utility = utility();
380
427
  Context ctx = makeTestFullCtx(client, utility);
381
428
  ctx.spec = new Spec(fhMap(
382
429
  "base", "http://localhost:8080",
@@ -401,43 +448,30 @@ public class PrimaryUtilityTest {
401
448
 
402
449
  @Test
403
450
  public void makeOptionsBasic() {
404
- ProjectNameSDK client = client();
405
- Utility utility = client.getUtility();
406
- runset(getSpec(primary(), "makeOptions", "basic"), (entry) -> {
407
- Map<String, Object> in = Helpers.toMapAny(entry.get("in"));
451
+ runsection("makeOptions", (args) -> {
452
+ Map<String, Object> in = Helpers.toMapAny(args[0]);
408
453
  Map<String, Object> ctxmap = new LinkedHashMap<>();
409
454
  if (in != null) {
410
455
  ctxmap.put("options", in.get("options"));
411
456
  ctxmap.put("config", in.get("config"));
412
457
  }
413
- Context ctx = utility.makeContext.apply(ctxmap, null);
414
- ctx.client = client;
415
- ctx.utility = utility;
416
- return utility.makeOptions.apply(ctx);
458
+ Context ctx = utility().makeContext.apply(ctxmap, null);
459
+ ctx.client = client();
460
+ ctx.utility = utility();
461
+ return utility().makeOptions.apply(ctx);
417
462
  });
418
463
  }
419
464
 
420
465
  @Test
421
466
  public void makeRequestBasic() {
422
- ProjectNameSDK client = client();
423
- Utility utility = client.getUtility();
424
- runset(getSpec(primary(), "makeRequest", "basic"), (entry) -> {
425
- Map<String, Object> ctxmap = Helpers.toMapAny(entry.get("ctx"));
426
- Context ctx = makeCtxFromMap(ctxmap, client, utility);
427
- ctx.options = client.optionsMap();
428
-
429
- utility.makeRequest.apply(ctx);
430
-
431
- // Update entry ctx for match checking.
432
- Map<String, Object> entryCtx = Helpers.toMapAny(entry.get("ctx"));
433
- if (entryCtx != null) {
434
- if (ctx.response != null) {
435
- entryCtx.put("response", "exists");
436
- }
437
- if (ctx.result != null) {
438
- entryCtx.put("result", "exists");
439
- }
440
- }
467
+ runsection("makeRequest", (args) -> {
468
+ Context ctx = OmniResolver.omniCtx(args[0], client(), utility());
469
+ ctx.options = client().optionsMap();
470
+
471
+ utility().makeRequest.apply(ctx);
472
+
473
+ // Expose response/result existence for the match assertions.
474
+ OmniResolver.omniSyncCtx(args[0], ctx);
441
475
 
442
476
  return null;
443
477
  });
@@ -445,25 +479,12 @@ public class PrimaryUtilityTest {
445
479
 
446
480
  @Test
447
481
  public void makeResponseBasic() {
448
- ProjectNameSDK client = client();
449
- Utility utility = client.getUtility();
450
- runset(getSpec(primary(), "makeResponse", "basic"), (entry) -> {
451
- Map<String, Object> ctxmap = Helpers.toMapAny(entry.get("ctx"));
452
- Context ctx = makeCtxFromMap(ctxmap, client, utility);
453
- RunnerSupport.fixctx(ctx, client);
454
-
455
- utility.makeResponse.apply(ctx);
456
-
457
- // Update entry ctx for match checking with result data.
458
- Map<String, Object> entryCtx = Helpers.toMapAny(entry.get("ctx"));
459
- if (entryCtx != null && ctx.result != null) {
460
- entryCtx.put("result", fhMap(
461
- "ok", ctx.result.ok,
462
- "status", ctx.result.status,
463
- "statusText", ctx.result.statusText,
464
- "headers", ctx.result.headers,
465
- "body", ctx.result.body));
466
- }
482
+ runsection("makeResponse", (args) -> {
483
+ Context ctx = OmniResolver.omniCtx(args[0], client(), utility());
484
+
485
+ utility().makeResponse.apply(ctx);
486
+
487
+ OmniResolver.omniSyncCtx(args[0], ctx);
467
488
 
468
489
  return null;
469
490
  });
@@ -472,7 +493,7 @@ public class PrimaryUtilityTest {
472
493
  @Test
473
494
  public void makeResultBasic() {
474
495
  ProjectNameSDK client = client();
475
- Utility utility = client.getUtility();
496
+ Utility utility = utility();
476
497
  Context ctx = makeTestFullCtx(client, utility);
477
498
  ctx.spec = new Spec(fhMap(
478
499
  "base", "http://localhost:8080",
@@ -498,7 +519,7 @@ public class PrimaryUtilityTest {
498
519
  @Test
499
520
  public void makeResultNoSpec() {
500
521
  ProjectNameSDK client = client();
501
- Utility utility = client.getUtility();
522
+ Utility utility = utility();
502
523
  Context ctx = makeTestFullCtx(client, utility);
503
524
  ctx.spec = null;
504
525
  ctx.result = new Result(fhMap(
@@ -517,7 +538,7 @@ public class PrimaryUtilityTest {
517
538
  @Test
518
539
  public void makeResultNoResult() {
519
540
  ProjectNameSDK client = client();
520
- Utility utility = client.getUtility();
541
+ Utility utility = utility();
521
542
  Context ctx = makeTestFullCtx(client, utility);
522
543
  ctx.spec = new Spec(fhMap("step", "start"));
523
544
  ctx.result = null;
@@ -533,75 +554,101 @@ public class PrimaryUtilityTest {
533
554
 
534
555
  @Test
535
556
  public void makeSpecBasic() {
536
- Map<String, Object> setupOpts = getSpec(primary(), "makeSpec", "DEF", "setup", "a");
557
+ Map<String, Object> setupOpts =
558
+ RunnerSupport.getSpec(run().spec, "makeSpec", "DEF", "setup", "a");
537
559
  ProjectNameSDK specClient = ProjectNameSDK.testSDK(null, setupOpts);
538
560
  Utility specUtility = specClient.getUtility();
539
561
 
540
- runset(getSpec(primary(), "makeSpec", "basic"), (entry) -> {
541
- Map<String, Object> ctxmap = Helpers.toMapAny(entry.get("ctx"));
542
- Context ctx = makeCtxFromMap(ctxmap, specClient, specUtility);
562
+ runsection("makeSpec", (args) -> {
563
+ Context ctx = OmniResolver.omniCtx(args[0], specClient, specUtility);
543
564
  ctx.options = specClient.optionsMap();
544
565
 
545
566
  specUtility.makeSpec.apply(ctx);
546
567
 
547
- // Update entry ctx for match.
548
- Map<String, Object> entryCtx = Helpers.toMapAny(entry.get("ctx"));
549
- if (entryCtx != null && ctx.spec != null) {
550
- entryCtx.put("spec", fhMap(
551
- "base", ctx.spec.base,
552
- "prefix", ctx.spec.prefix,
553
- "suffix", ctx.spec.suffix,
554
- "method", ctx.spec.method,
555
- "params", ctx.spec.params,
556
- "query", ctx.spec.query,
557
- "headers", ctx.spec.headers,
558
- "step", ctx.spec.step));
559
- }
568
+ OmniResolver.omniSyncCtx(args[0], ctx);
560
569
 
561
570
  return null;
562
571
  });
563
572
  }
564
573
 
574
+ // A minimal Entity: Context resolves the op through the Entity
575
+ // interface, and a literal {name: ...} map from the fixture is not one -
576
+ // entname would be "" and every lookup would miss, reporting
577
+ // point_no_points for all seven cases. TS reads the same field with
578
+ // getprop and accepts the plain map. (The go peer is plEntity.)
579
+ static final class PlEntity implements Entity {
580
+ private final String name;
581
+
582
+ PlEntity(String name) {
583
+ this.name = name;
584
+ }
585
+
586
+ @Override
587
+ public String getName() {
588
+ return name;
589
+ }
590
+
591
+ @Override
592
+ public Entity make() {
593
+ return new PlEntity(name);
594
+ }
595
+
596
+ @Override
597
+ public Object data(Object... args) {
598
+ return null;
599
+ }
600
+
601
+ @Override
602
+ public Object match(Object... args) {
603
+ return null;
604
+ }
605
+ }
606
+
607
+ // Corpus-driven, like go: TS returns the error AS the value; java throws
608
+ // SdkError. The corpus says `match: out: code` for both, so the error is
609
+ // normalised to a map carrying its code here rather than forking the
610
+ // fixture per language.
565
611
  @Test
566
612
  public void makePointBasic() {
567
- ProjectNameSDK client = client();
568
- Utility utility = client.getUtility();
569
- Context ctx = makeTestCtx(client, utility, null);
570
- List<Object> parts = new ArrayList<>();
571
- parts.add("items");
572
- parts.add("{id}");
573
- Map<String, Object> point = fhMap(
574
- "parts", parts,
575
- "args", fhMap("params", new ArrayList<>()),
576
- "params", new ArrayList<>(),
577
- "alias", new LinkedHashMap<>(),
578
- "select", new LinkedHashMap<>(),
579
- "active", true,
580
- "transform", new LinkedHashMap<>());
581
- ctx.op.points = new ArrayList<>(List.of(point));
613
+ runsection("makePoint", (args) -> {
614
+ Map<String, Object> ctxmap = Helpers.toMapAny(args[0]);
615
+ if (ctxmap == null) {
616
+ ctxmap = new LinkedHashMap<>();
617
+ }
618
+
619
+ Map<String, Object> em = Helpers.toMapAny(ctxmap.get("entity"));
620
+ if (em != null) {
621
+ String name = em.get("name") instanceof String ? (String) em.get("name") : "";
622
+ Map<String, Object> swapped = new LinkedHashMap<>(ctxmap);
623
+ swapped.put("entity", new PlEntity(name));
624
+ ctxmap = swapped;
625
+ }
582
626
 
583
- utility.makePoint.apply(ctx);
584
- assertNotNull(ctx.point, "expected point to be set");
627
+ Context ctx = OmniResolver.omniCtx(ctxmap, client(), utility());
628
+ try {
629
+ return utility().makePoint.apply(ctx);
630
+ }
631
+ catch (SdkError e) {
632
+ return fhMap("code", e.code);
633
+ }
634
+ });
585
635
  }
586
636
 
587
637
  @Test
588
638
  public void makeUrlBasic() {
589
- ProjectNameSDK client = client();
590
- Utility utility = client.getUtility();
591
- runset(getSpec(primary(), "makeUrl", "basic"), (entry) -> {
592
- Map<String, Object> ctxmap = Helpers.toMapAny(entry.get("ctx"));
593
- Context ctx = makeCtxFromMap(ctxmap, client, utility);
639
+ runsection("makeUrl", (args) -> {
640
+ Context ctx = OmniResolver.omniCtx(args[0], client(), utility());
594
641
  if (ctx.result == null) {
595
642
  ctx.result = new Result(new LinkedHashMap<>());
596
643
  }
597
- return utility.makeUrl.apply(ctx);
644
+ return utility().makeUrl.apply(ctx);
598
645
  });
599
646
  }
600
647
 
601
648
  @Test
602
649
  public void operatorBasic() {
603
- runset(getSpec(primary(), "operator", "basic"), (entry) -> {
604
- Map<String, Object> in = Helpers.toMapAny(entry.get("in"));
650
+ runsection("operator", (args) -> {
651
+ Map<String, Object> in = Helpers.toMapAny(args[0]);
605
652
  Operation op = new Operation(in == null ? new LinkedHashMap<>() : in);
606
653
  return fhMap(
607
654
  "entity", op.entity,
@@ -613,41 +660,18 @@ public class PrimaryUtilityTest {
613
660
 
614
661
  @Test
615
662
  public void paramBasic() {
616
- ProjectNameSDK client = client();
617
- Utility utility = client.getUtility();
618
- runset(getSpec(primary(), "param", "basic"), (entry) -> {
619
- List<Object> args = entry.get("args") instanceof List
620
- ? (List<Object>) entry.get("args") : new ArrayList<>();
621
- if (args.size() < 2) {
663
+ runsection("param", (args) -> {
664
+ if (args.length < 2) {
622
665
  return null;
623
666
  }
624
667
 
625
- Map<String, Object> ctxmap = Helpers.toMapAny(args.get(0));
626
- if (ctxmap == null) {
627
- ctxmap = new LinkedHashMap<>();
628
- }
629
- Context ctx = makeCtxFromMap(ctxmap, client, utility);
630
- Object paramdef = args.get(1);
631
-
632
- Object result = utility.param.apply(ctx, paramdef);
633
-
634
- // Copy spec alias back to entry ctx for matching.
635
- Map<String, Object> matchSpec = Helpers.toMapAny(entry.get("match"));
636
- if (matchSpec != null) {
637
- Map<String, Object> ctxMatch = Helpers.toMapAny(matchSpec.get("ctx"));
638
- if (ctxMatch != null) {
639
- Map<String, Object> entryCtx = Helpers.toMapAny(entry.get("ctx"));
640
- if (entryCtx == null) {
641
- entryCtx = new LinkedHashMap<>();
642
- entry.put("ctx", entryCtx);
643
- }
644
- Map<String, Object> specMatch = Helpers.toMapAny(ctxMatch.get("spec"));
645
- if (specMatch != null && ctx.spec != null
646
- && specMatch.get("alias") instanceof Map) {
647
- entryCtx.put("spec", fhMap("alias", ctx.spec.alias));
648
- }
649
- }
650
- }
668
+ Context ctx = OmniResolver.omniCtx(args[0], client(), utility());
669
+ Object paramdef = args[1];
670
+
671
+ Object result = utility().param.apply(ctx, paramdef);
672
+
673
+ // The spec alias mutation is what mark 80 asserts on.
674
+ OmniResolver.omniSyncCtx(args[0], ctx);
651
675
 
652
676
  return result;
653
677
  });
@@ -655,22 +679,17 @@ public class PrimaryUtilityTest {
655
679
 
656
680
  @Test
657
681
  public void prepareAuthBasic() {
658
- Map<String, Object> setupOpts = getSpec(primary(), "prepareAuth", "DEF", "setup", "a");
682
+ Map<String, Object> setupOpts =
683
+ RunnerSupport.getSpec(run().spec, "prepareAuth", "DEF", "setup", "a");
659
684
  ProjectNameSDK authClient = ProjectNameSDK.testSDK(null, setupOpts);
660
685
  Utility authUtility = authClient.getUtility();
661
686
 
662
- runset(getSpec(primary(), "prepareAuth", "basic"), (entry) -> {
663
- Map<String, Object> ctxmap = Helpers.toMapAny(entry.get("ctx"));
664
- Context ctx = makeCtxFromMap(ctxmap, authClient, authUtility);
665
- RunnerSupport.fixctx(ctx, authClient);
687
+ runsection("prepareAuth", (args) -> {
688
+ Context ctx = OmniResolver.omniCtx(args[0], authClient, authUtility);
666
689
 
667
690
  authUtility.prepareAuth.apply(ctx);
668
691
 
669
- // Update entry ctx for match.
670
- Map<String, Object> entryCtx = Helpers.toMapAny(entry.get("ctx"));
671
- if (entryCtx != null && ctx.spec != null) {
672
- entryCtx.put("spec", fhMap("headers", ctx.spec.headers));
673
- }
692
+ OmniResolver.omniSyncCtx(args[0], ctx);
674
693
 
675
694
  return null;
676
695
  });
@@ -678,83 +697,69 @@ public class PrimaryUtilityTest {
678
697
 
679
698
  @Test
680
699
  public void prepareBodyBasic() {
681
- ProjectNameSDK client = client();
682
- Utility utility = client.getUtility();
683
- runset(getSpec(primary(), "prepareBody", "basic"), (entry) -> {
684
- Map<String, Object> ctxmap = Helpers.toMapAny(entry.get("ctx"));
685
- Context ctx = makeCtxFromMap(ctxmap, client, utility);
686
- RunnerSupport.fixctx(ctx, client);
687
- return utility.prepareBody.apply(ctx);
700
+ runsection("prepareBody", (args) -> {
701
+ Context ctx = OmniResolver.omniCtx(args[0], client(), utility());
702
+ return utility().prepareBody.apply(ctx);
688
703
  });
689
704
  }
690
705
 
691
706
  @Test
692
707
  public void prepareHeadersBasic() {
693
- ProjectNameSDK client = client();
694
- Utility utility = client.getUtility();
695
- runset(getSpec(primary(), "prepareHeaders", "basic"), (entry) -> {
696
- Map<String, Object> ctxmap = Helpers.toMapAny(entry.get("ctx"));
697
- Context ctx = makeCtxFromMap(ctxmap, client, utility);
698
- return utility.prepareHeaders.apply(ctx);
708
+ runsection("prepareHeaders", (args) -> {
709
+ Context ctx = OmniResolver.omniCtx(args[0], client(), utility());
710
+ return utility().prepareHeaders.apply(ctx);
699
711
  });
700
712
  }
701
713
 
702
714
  @Test
703
715
  public void prepareMethodBasic() {
704
- ProjectNameSDK client = client();
705
- Utility utility = client.getUtility();
706
- runset(getSpec(primary(), "prepareMethod", "basic"), (entry) -> {
707
- Map<String, Object> ctxmap = Helpers.toMapAny(entry.get("ctx"));
708
- Context ctx = makeCtxFromMap(ctxmap, client, utility);
709
- return utility.prepareMethod.apply(ctx);
716
+ runsection("prepareMethod", (args) -> {
717
+ Context ctx = OmniResolver.omniCtx(args[0], client(), utility());
718
+ // An op the API does not define resolves NO method; ts answers
719
+ // undefined there and java answers null - both are "no value" to
720
+ // the corpus.
721
+ String method = utility().prepareMethod.apply(ctx);
722
+ if (method == null || method.isEmpty()) {
723
+ return null;
724
+ }
725
+ return method;
710
726
  });
711
727
  }
712
728
 
713
729
  @Test
714
730
  public void prepareParamsBasic() {
715
- ProjectNameSDK client = client();
716
- Utility utility = client.getUtility();
717
- runset(getSpec(primary(), "prepareParams", "basic"), (entry) -> {
718
- Map<String, Object> ctxmap = Helpers.toMapAny(entry.get("ctx"));
719
- Context ctx = makeCtxFromMap(ctxmap, client, utility);
720
- return utility.prepareParams.apply(ctx);
731
+ runsection("prepareParams", (args) -> {
732
+ Context ctx = OmniResolver.omniCtx(args[0], client(), utility());
733
+ return utility().prepareParams.apply(ctx);
721
734
  });
722
735
  }
723
736
 
737
+ // Was two hand-written cases that had drifted out of the shared corpus
738
+ // (the preparePath fixture shipped as an empty `set: []`). Now driven by
739
+ // the corpus like every other section, so all ports assert the same
740
+ // separator/blank-segment behaviour.
724
741
  @Test
725
742
  public void preparePathBasic() {
726
- // Was two hand-written cases that had drifted out of the shared corpus
727
- // (the preparePath fixture shipped as an empty `set: []`).
728
- ProjectNameSDK client = client();
729
- Utility utility = client.getUtility();
730
- runset(getSpec(primary(), "preparePath", "basic"), (entry) -> {
731
- Map<String, Object> ctxmap = Helpers.toMapAny(entry.get("ctx"));
732
- Context ctx = makeCtxFromMap(ctxmap, client, utility);
733
- return utility.preparePath.apply(ctx);
743
+ runsection("preparePath", (args) -> {
744
+ Context ctx = OmniResolver.omniCtx(args[0], client(), utility());
745
+ return utility().preparePath.apply(ctx);
734
746
  });
735
747
  }
736
748
 
737
749
  @Test
738
750
  public void prepareQueryBasic() {
739
- ProjectNameSDK client = client();
740
- Utility utility = client.getUtility();
741
- runset(getSpec(primary(), "prepareQuery", "basic"), (entry) -> {
742
- Map<String, Object> ctxmap = Helpers.toMapAny(entry.get("ctx"));
743
- Context ctx = makeCtxFromMap(ctxmap, client, utility);
744
- return utility.prepareQuery.apply(ctx);
751
+ runsection("prepareQuery", (args) -> {
752
+ Context ctx = OmniResolver.omniCtx(args[0], client(), utility());
753
+ return utility().prepareQuery.apply(ctx);
745
754
  });
746
755
  }
747
756
 
748
757
  @Test
749
758
  public void resultBasicBasic() {
750
- ProjectNameSDK client = client();
751
- Utility utility = client.getUtility();
752
- runset(getSpec(primary(), "resultBasic", "basic"), (entry) -> {
753
- Map<String, Object> ctxmap = Helpers.toMapAny(entry.get("ctx"));
754
- Context ctx = makeCtxFromMap(ctxmap, client, utility);
755
- RunnerSupport.fixctx(ctx, client);
759
+ runsection("resultBasic", (args) -> {
760
+ Context ctx = OmniResolver.omniCtx(args[0], client(), utility());
756
761
 
757
- Result result = utility.resultBasic.apply(ctx);
762
+ Result result = utility().resultBasic.apply(ctx);
758
763
 
759
764
  Map<String, Object> out = fhMap(
760
765
  "status", result.status,
@@ -769,18 +774,12 @@ public class PrimaryUtilityTest {
769
774
 
770
775
  @Test
771
776
  public void resultBodyBasic() {
772
- ProjectNameSDK client = client();
773
- Utility utility = client.getUtility();
774
- runset(getSpec(primary(), "resultBody", "basic"), (entry) -> {
775
- Map<String, Object> ctxmap = Helpers.toMapAny(entry.get("ctx"));
776
- Context ctx = makeCtxFromMap(ctxmap, client, utility);
777
+ runsection("resultBody", (args) -> {
778
+ Context ctx = OmniResolver.omniCtx(args[0], client(), utility());
777
779
 
778
- utility.resultBody.apply(ctx);
780
+ utility().resultBody.apply(ctx);
779
781
 
780
- Map<String, Object> entryCtx = Helpers.toMapAny(entry.get("ctx"));
781
- if (entryCtx != null && ctx.result != null) {
782
- entryCtx.put("result", fhMap("body", ctx.result.body));
783
- }
782
+ OmniResolver.omniSyncCtx(args[0], ctx);
784
783
 
785
784
  return null;
786
785
  });
@@ -788,18 +787,12 @@ public class PrimaryUtilityTest {
788
787
 
789
788
  @Test
790
789
  public void resultHeadersBasic() {
791
- ProjectNameSDK client = client();
792
- Utility utility = client.getUtility();
793
- runset(getSpec(primary(), "resultHeaders", "basic"), (entry) -> {
794
- Map<String, Object> ctxmap = Helpers.toMapAny(entry.get("ctx"));
795
- Context ctx = makeCtxFromMap(ctxmap, client, utility);
790
+ runsection("resultHeaders", (args) -> {
791
+ Context ctx = OmniResolver.omniCtx(args[0], client(), utility());
796
792
 
797
- utility.resultHeaders.apply(ctx);
793
+ utility().resultHeaders.apply(ctx);
798
794
 
799
- Map<String, Object> entryCtx = Helpers.toMapAny(entry.get("ctx"));
800
- if (entryCtx != null && ctx.result != null) {
801
- entryCtx.put("result", fhMap("headers", ctx.result.headers));
802
- }
795
+ OmniResolver.omniSyncCtx(args[0], ctx);
803
796
 
804
797
  return null;
805
798
  });
@@ -807,22 +800,13 @@ public class PrimaryUtilityTest {
807
800
 
808
801
  @Test
809
802
  public void transformRequestBasic() {
810
- ProjectNameSDK client = client();
811
- Utility utility = client.getUtility();
812
- runset(getSpec(primary(), "transformRequest", "basic"), (entry) -> {
813
- Map<String, Object> ctxmap = Helpers.toMapAny(entry.get("ctx"));
814
- Context ctx = makeCtxFromMap(ctxmap, client, utility);
815
-
816
- Object result = utility.transformRequest.apply(ctx);
817
-
818
- // Update entry ctx for match (step changed).
819
- Map<String, Object> entryCtx = Helpers.toMapAny(entry.get("ctx"));
820
- if (entryCtx != null && ctx.spec != null) {
821
- Map<String, Object> specMap = Helpers.toMapAny(entryCtx.get("spec"));
822
- if (specMap != null) {
823
- specMap.put("step", ctx.spec.step);
824
- }
825
- }
803
+ runsection("transformRequest", (args) -> {
804
+ Context ctx = OmniResolver.omniCtx(args[0], client(), utility());
805
+
806
+ Object result = utility().transformRequest.apply(ctx);
807
+
808
+ // The step advance is what the match assertion reads.
809
+ OmniResolver.omniSyncCtx(args[0], ctx);
826
810
 
827
811
  return result;
828
812
  });
@@ -830,22 +814,12 @@ public class PrimaryUtilityTest {
830
814
 
831
815
  @Test
832
816
  public void transformResponseBasic() {
833
- ProjectNameSDK client = client();
834
- Utility utility = client.getUtility();
835
- runset(getSpec(primary(), "transformResponse", "basic"), (entry) -> {
836
- Map<String, Object> ctxmap = Helpers.toMapAny(entry.get("ctx"));
837
- Context ctx = makeCtxFromMap(ctxmap, client, utility);
838
-
839
- Object result = utility.transformResponse.apply(ctx);
840
-
841
- // Update entry ctx for match (step changed).
842
- Map<String, Object> entryCtx = Helpers.toMapAny(entry.get("ctx"));
843
- if (entryCtx != null && ctx.spec != null) {
844
- Map<String, Object> specMap = Helpers.toMapAny(entryCtx.get("spec"));
845
- if (specMap != null) {
846
- specMap.put("step", ctx.spec.step);
847
- }
848
- }
817
+ runsection("transformResponse", (args) -> {
818
+ Context ctx = OmniResolver.omniCtx(args[0], client(), utility());
819
+
820
+ Object result = utility().transformResponse.apply(ctx);
821
+
822
+ OmniResolver.omniSyncCtx(args[0], ctx);
849
823
 
850
824
  return result;
851
825
  });