@voxgig/sdkgen 4.8.2 → 4.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (407) hide show
  1. package/bin/voxgig-sdkgen +1 -1
  2. package/dist/action/doctor.d.ts +1 -0
  3. package/dist/action/doctor.js +50 -2
  4. package/dist/action/doctor.js.map +1 -1
  5. package/dist/helpers/naming.js +4 -2
  6. package/dist/helpers/naming.js.map +1 -1
  7. package/dist/tsconfig.tsbuildinfo +1 -1
  8. package/model/sdkgen.aon +21 -0
  9. package/package.json +1 -1
  10. package/project/.sdk/model/feature/secrets.aon +120 -18
  11. package/project/.sdk/model/target/c.aon +10 -0
  12. package/project/.sdk/model/target/clojure.aon +13 -0
  13. package/project/.sdk/model/target/cpp.aon +10 -0
  14. package/project/.sdk/model/target/csharp.aon +9 -0
  15. package/project/.sdk/model/target/dart.aon +10 -0
  16. package/project/.sdk/model/target/elixir.aon +9 -0
  17. package/project/.sdk/model/target/go.aon +13 -0
  18. package/project/.sdk/model/target/java.aon +9 -0
  19. package/project/.sdk/model/target/js.aon +7 -0
  20. package/project/.sdk/model/target/kotlin.aon +9 -0
  21. package/project/.sdk/model/target/lean.aon +17 -0
  22. package/project/.sdk/model/target/lua.aon +8 -0
  23. package/project/.sdk/model/target/ocaml.aon +9 -0
  24. package/project/.sdk/model/target/perl.aon +8 -0
  25. package/project/.sdk/model/target/php.aon +8 -0
  26. package/project/.sdk/model/target/py.aon +13 -0
  27. package/project/.sdk/model/target/rb.aon +8 -0
  28. package/project/.sdk/model/target/rust.aon +10 -0
  29. package/project/.sdk/model/target/scala.aon +21 -2
  30. package/project/.sdk/model/target/swift.aon +18 -0
  31. package/project/.sdk/model/target/ts.aon +13 -0
  32. package/project/.sdk/model/target/zig.aon +9 -0
  33. package/project/.sdk/src/cmp/clojure/Package_clojure.ts +9 -2
  34. package/project/.sdk/src/cmp/cpp/Gitignore_cpp.ts +3 -0
  35. package/project/.sdk/src/cmp/dart/Test_dart.ts +2 -0
  36. package/project/.sdk/src/cmp/elixir/Package_elixir.ts +4 -1
  37. package/project/.sdk/src/cmp/go/Config_go.ts +59 -2
  38. package/project/.sdk/src/cmp/go/Main_go.ts +8 -2
  39. package/project/.sdk/src/cmp/java/Test_java.ts +6 -5
  40. package/project/.sdk/src/cmp/kotlin/Test_kotlin.ts +6 -5
  41. package/project/.sdk/src/cmp/lean/Package_lean.ts +23 -0
  42. package/project/.sdk/src/cmp/lean/ReadmeInstall_lean.ts +1 -0
  43. package/project/.sdk/src/cmp/lean/ReadmeTopTest_lean.ts +1 -0
  44. package/project/.sdk/src/cmp/ocaml/Gitignore_ocaml.ts +1 -0
  45. package/project/.sdk/src/cmp/ocaml/Main_ocaml.ts +7 -3
  46. package/project/.sdk/src/cmp/py/Config_py.ts +82 -1
  47. package/project/.sdk/src/cmp/py/Main_py.ts +44 -0
  48. package/project/.sdk/src/cmp/py/fragment/Main.fragment.py +2 -0
  49. package/project/.sdk/src/cmp/swift/Main_swift.ts +10 -0
  50. package/project/.sdk/src/cmp/swift/Package_swift.ts +13 -1
  51. package/project/.sdk/src/cmp/ts/Config_ts.ts +42 -17
  52. package/project/.sdk/src/cmp/ts/fragment/Config.data.fragment.ts +13 -1
  53. package/project/.sdk/src/cmp/ts/fragment/Config.fragment.ts +13 -1
  54. package/project/.sdk/src/cmp/zig/Package_zig.ts +15 -11
  55. package/project/.sdk/src/cmp/zig/fragment/Entity.fragment.zig +3 -3
  56. package/project/.sdk/src/cmp/zig/fragment/EntityListOp.fragment.zig +3 -3
  57. package/project/.sdk/src/cmp/zig/fragment/Main.fragment.zig +3 -3
  58. package/project/.sdk/src/cmp/zig/utility_zig.ts +50 -1
  59. package/project/.sdk/tm/c/Makefile +38 -3
  60. package/project/.sdk/tm/c/tests/omni_resolver.h +361 -0
  61. package/project/.sdk/tm/c/tests/omni_smoke_test.c +237 -0
  62. package/project/.sdk/tm/c/tests/primary_corpus_test.c +205 -284
  63. package/project/.sdk/tm/c/tests/struct_corpus_test.c +292 -212
  64. package/project/.sdk/tm/c/tests/vendor/omni/json.c +811 -0
  65. package/project/.sdk/tm/c/tests/vendor/omni/omni.h +240 -0
  66. package/project/.sdk/tm/c/tests/vendor/omni/runner.c +940 -0
  67. package/project/.sdk/tm/c/tests/vendor/omni/util.c +351 -0
  68. package/project/.sdk/tm/c/utility/struct/utility.c +7 -2
  69. package/project/.sdk/tm/clojure/test/sdk/test/omni.clj +401 -0
  70. package/project/.sdk/tm/clojure/test/sdk/test/omni_smoke.clj +81 -0
  71. package/project/.sdk/tm/clojure/test/sdk/test/primary.clj +92 -58
  72. package/project/.sdk/tm/clojure/test/sdk/test/struct_corpus.clj +122 -149
  73. package/project/.sdk/tm/clojure/test/sdk/test_runner.clj +8 -3
  74. package/project/.sdk/tm/clojure/test/vendor/omni/voxgig/omni/json.clj +145 -0
  75. package/project/.sdk/tm/clojure/test/vendor/omni/voxgig/omni/runner.clj +445 -0
  76. package/project/.sdk/tm/clojure/test/vendor/omni/voxgig/omni/util.clj +145 -0
  77. package/project/.sdk/tm/cpp/Makefile +5 -1
  78. package/project/.sdk/tm/cpp/test/omni_resolver.hpp +473 -0
  79. package/project/.sdk/tm/cpp/test/omni_smoke_test.cpp +209 -0
  80. package/project/.sdk/tm/cpp/test/primary_utility_test.cpp +243 -184
  81. package/project/.sdk/tm/cpp/test/runner_support.hpp +68 -181
  82. package/project/.sdk/tm/cpp/test/struct_corpus_test.cpp +183 -56
  83. package/project/.sdk/tm/cpp/test/vendor/omni/json.hpp +406 -0
  84. package/project/.sdk/tm/cpp/test/vendor/omni/omni.hpp +751 -0
  85. package/project/.sdk/tm/cpp/test/vendor/omni/util.hpp +256 -0
  86. package/project/.sdk/tm/cpp/utility/pipeline.hpp +7 -1
  87. package/project/.sdk/tm/csharp/test/OmniResolver.cs +491 -0
  88. package/project/.sdk/tm/csharp/test/OmniSmokeTest.cs +106 -0
  89. package/project/.sdk/tm/csharp/test/PrimaryUtilityTest.cs +299 -316
  90. package/project/.sdk/tm/csharp/test/Runner.cs +104 -269
  91. package/project/.sdk/tm/csharp/test/StructUtilityTest.cs +535 -724
  92. package/project/.sdk/tm/csharp/test/vendor/omni/Runner.cs +864 -0
  93. package/project/.sdk/tm/csharp/test/vendor/omni/Util.cs +347 -0
  94. package/project/.sdk/tm/csharp/utility/MakeSpec.cs +3 -1
  95. package/project/.sdk/tm/csharp/utility/PrepareMethod.cs +6 -1
  96. package/project/.sdk/tm/csharp/utility/struct/Struct.cs +21 -5
  97. package/project/.sdk/tm/dart/test/omni.dart +520 -0
  98. package/project/.sdk/tm/dart/test/omni_smoke_test.dart +143 -0
  99. package/project/.sdk/tm/dart/test/primary_test.dart +86 -28
  100. package/project/.sdk/tm/dart/test/struct_test.dart +438 -11
  101. package/project/.sdk/tm/dart/test/vendor/omni/omni.dart +7 -0
  102. package/project/.sdk/tm/dart/test/vendor/omni/runner.dart +653 -0
  103. package/project/.sdk/tm/dart/test/vendor/omni/util.dart +232 -0
  104. package/project/.sdk/tm/elixir/Makefile +11 -3
  105. package/project/.sdk/tm/elixir/test/omni_smoke_test.exs +117 -0
  106. package/project/.sdk/tm/elixir/test/primary_utility_test.exs +341 -16
  107. package/project/.sdk/tm/elixir/test/struct_corpus_test.exs +554 -9
  108. package/project/.sdk/tm/elixir/test/support/omni.ex +377 -0
  109. package/project/.sdk/tm/elixir/test/vendor/omni/json.ex +122 -0
  110. package/project/.sdk/tm/elixir/test/vendor/omni/runner.ex +623 -0
  111. package/project/.sdk/tm/elixir/test/vendor/omni/util.ex +187 -0
  112. package/project/.sdk/tm/go/core/context.go +32 -16
  113. package/project/.sdk/tm/go/feature/secrets/plugin/capability.go +261 -0
  114. package/project/.sdk/tm/go/feature/secrets/plugin/catalog.go +78 -0
  115. package/project/.sdk/tm/go/feature/secrets/plugin/config.go +652 -0
  116. package/project/.sdk/tm/go/feature/secrets/plugin/depend.go +250 -0
  117. package/project/.sdk/tm/go/feature/secrets/plugin/env.go +194 -0
  118. package/project/.sdk/tm/go/feature/secrets/plugin/export.go +80 -0
  119. package/project/.sdk/tm/go/feature/secrets/plugin/graph.go +238 -0
  120. package/project/.sdk/tm/go/feature/secrets/plugin/host.go +1575 -0
  121. package/project/.sdk/tm/go/feature/secrets/plugin/order.go +248 -0
  122. package/project/.sdk/tm/go/feature/secrets/plugin/point.go +184 -0
  123. package/project/.sdk/tm/go/feature/secrets/plugin/ref.go +123 -0
  124. package/project/.sdk/tm/go/feature/secrets/plugin/resolve.go +79 -0
  125. package/project/.sdk/tm/go/feature/secrets/plugin/types.go +296 -0
  126. package/project/.sdk/tm/go/feature/secrets/plugin/util.go +87 -0
  127. package/project/.sdk/tm/go/feature/secrets/plugin/version.go +161 -0
  128. package/project/.sdk/tm/go/feature/secrets/plugins/aws/aws.go +292 -0
  129. package/project/.sdk/tm/go/feature/secrets/plugins/aws/sigv4.go +201 -0
  130. package/project/.sdk/tm/go/feature/secrets/plugins/azuresecrets/azuresecrets.go +187 -0
  131. package/project/.sdk/tm/go/feature/secrets/plugins/boru/boru.go +184 -0
  132. package/project/.sdk/tm/go/feature/secrets/plugins/doppler/doppler.go +114 -0
  133. package/project/.sdk/tm/go/feature/secrets/plugins/gcpsecrets/gcpsecrets.go +156 -0
  134. package/project/.sdk/tm/go/feature/secrets/plugins/hashicorp/hashicorp.go +208 -0
  135. package/project/.sdk/tm/go/feature/secrets/plugins/httpjson/httpjson.go +241 -0
  136. package/project/.sdk/tm/go/feature/secrets/plugins/infisical/infisical.go +150 -0
  137. package/project/.sdk/tm/go/feature/secrets/plugins/onepassword/onepassword.go +152 -0
  138. package/project/.sdk/tm/go/feature/secrets/plugins/secretspec/secretspec.go +143 -0
  139. package/project/.sdk/tm/go/feature/secrets/sekreto/addr.go +120 -0
  140. package/project/.sdk/tm/go/feature/secrets/sekreto/providers.go +442 -0
  141. package/project/.sdk/tm/go/feature/secrets/sekreto/sekreto.go +714 -0
  142. package/project/.sdk/tm/go/feature/secrets_feature.go +675 -0
  143. package/project/.sdk/tm/go/src/feature/secrets/.gitkeep +0 -0
  144. package/project/.sdk/tm/go/test/feature/secrets/secrets_feature_test.go +799 -0
  145. package/project/.sdk/tm/go/test/omni/omni.go +902 -0
  146. package/project/.sdk/tm/go/test/omni/util.go +381 -0
  147. package/project/.sdk/tm/go/test/omniresolver_test.go +748 -0
  148. package/project/.sdk/tm/go/test/omnismoke_test.go +112 -0
  149. package/project/.sdk/tm/go/test/primary_utility_test.go +123 -191
  150. package/project/.sdk/tm/go/test/struct_utility_test.go +323 -16
  151. package/project/.sdk/tm/go/test/testsupport_test.go +294 -0
  152. package/project/.sdk/tm/go/utility/make_options.go +8 -1
  153. package/project/.sdk/tm/go/utility/prepare_method.go +5 -1
  154. package/project/.sdk/tm/go/utility/struct/voxgigstruct.go +2 -2
  155. package/project/.sdk/tm/java/test/OmniResolver.java +355 -0
  156. package/project/.sdk/tm/java/test/OmniSmokeTest.java +99 -0
  157. package/project/.sdk/tm/java/test/PrimaryUtilityTest.java +254 -280
  158. package/project/.sdk/tm/java/test/RunnerSupport.java +9 -194
  159. package/project/.sdk/tm/java/test/StructCorpusTest.java +119 -42
  160. package/project/.sdk/tm/java/test/vendor/omni/Json.java +287 -0
  161. package/project/.sdk/tm/java/test/vendor/omni/Runner.java +851 -0
  162. package/project/.sdk/tm/java/test/vendor/omni/Util.java +322 -0
  163. package/project/.sdk/tm/java/utility/MakeSpec.java +3 -1
  164. package/project/.sdk/tm/java/utility/PrepareMethod.java +5 -5
  165. package/project/.sdk/tm/java/utility/struct/Struct.java +17 -4
  166. package/project/.sdk/tm/js/src/utility/StructUtility.js +3 -3
  167. package/project/.sdk/tm/js/test/omni.js +251 -0
  168. package/project/.sdk/tm/js/test/omni.test.js +105 -0
  169. package/project/.sdk/tm/js/test/utility/PrimaryUtility.test.js +6 -2
  170. package/project/.sdk/tm/js/test/utility/StructUtility.test.js +27 -2
  171. package/project/.sdk/tm/js/test/vendor/omni/index.js +77 -0
  172. package/project/.sdk/tm/js/test/vendor/omni/runner.js +628 -0
  173. package/project/.sdk/tm/js/test/vendor/omni/util.js +229 -0
  174. package/project/.sdk/tm/kotlin/core/Utility.kt +1 -1
  175. package/project/.sdk/tm/kotlin/test/OmniResolver.kt +343 -0
  176. package/project/.sdk/tm/kotlin/test/OmniSmokeTest.kt +100 -0
  177. package/project/.sdk/tm/kotlin/test/PrimaryUtilityTest.kt +244 -262
  178. package/project/.sdk/tm/kotlin/test/RunnerSupport.kt +9 -178
  179. package/project/.sdk/tm/kotlin/test/StructCorpusTest.kt +121 -32
  180. package/project/.sdk/tm/kotlin/test/vendor/omni/Json.kt +264 -0
  181. package/project/.sdk/tm/kotlin/test/vendor/omni/Runner.kt +615 -0
  182. package/project/.sdk/tm/kotlin/test/vendor/omni/Util.kt +139 -0
  183. package/project/.sdk/tm/kotlin/utility/MakeSpecUrl.kt +6 -3
  184. package/project/.sdk/tm/kotlin/utility/Prepare.kt +6 -6
  185. package/project/.sdk/tm/kotlin/utility/struct/Struct.kt +18 -2
  186. package/project/.sdk/tm/lean/Makefile +12 -5
  187. package/project/.sdk/tm/lean/src/SdkUtility.lean +14 -1
  188. package/project/.sdk/tm/lean/test/OmniResolver.lean +358 -0
  189. package/project/.sdk/tm/lean/test/OmniSmoke.lean +174 -0
  190. package/project/.sdk/tm/lean/test/StructCorpus.lean +245 -574
  191. package/project/.sdk/tm/lean/test/TPrimaryUtility.lean +155 -291
  192. package/project/.sdk/tm/lean/test/vendor/omni/Omni.lean +997 -0
  193. package/project/.sdk/tm/lua/test/omni.lua +456 -0
  194. package/project/.sdk/tm/lua/test/omni_smoke_test.lua +103 -0
  195. package/project/.sdk/tm/lua/test/primary_utility_test.lua +250 -509
  196. package/project/.sdk/tm/lua/test/struct_utility_test.lua +161 -70
  197. package/project/.sdk/tm/lua/test/vendor/omni/json.lua +268 -0
  198. package/project/.sdk/tm/lua/test/vendor/omni/regex.lua +385 -0
  199. package/project/.sdk/tm/lua/test/vendor/omni/runner.lua +641 -0
  200. package/project/.sdk/tm/lua/test/vendor/omni/util.lua +282 -0
  201. package/project/.sdk/tm/lua/utility/prepare_method.lua +5 -1
  202. package/project/.sdk/tm/lua/utility/struct/regex.lua +663 -0
  203. package/project/.sdk/tm/lua/utility/struct/struct.lua +660 -420
  204. package/project/.sdk/tm/ocaml/Makefile +37 -12
  205. package/project/.sdk/tm/ocaml/test/omni_resolver.ml +284 -0
  206. package/project/.sdk/tm/ocaml/test/omni_smoke_test.ml +169 -0
  207. package/project/.sdk/tm/ocaml/test/primary_utility_test.ml +84 -100
  208. package/project/.sdk/tm/ocaml/test/struct_corpus.ml +225 -201
  209. package/project/.sdk/tm/ocaml/test/vendor/omni/omni.ml +1157 -0
  210. package/project/.sdk/tm/perl/lib/Voxgig/Struct.pm +88 -12
  211. package/project/.sdk/tm/perl/t/omni.pm +647 -0
  212. package/project/.sdk/tm/perl/t/omni_smoke.t +87 -0
  213. package/project/.sdk/tm/perl/t/primary_utility.t +189 -487
  214. package/project/.sdk/tm/perl/t/struct_utility.t +455 -389
  215. package/project/.sdk/tm/perl/t/vendor/omni/Voxgig/Omni/Runner.pm +649 -0
  216. package/project/.sdk/tm/perl/t/vendor/omni/Voxgig/Omni/Util.pm +253 -0
  217. package/project/.sdk/tm/perl/t/vendor/omni/Voxgig/Omni.pm +24 -0
  218. package/project/.sdk/tm/perl/utility/prepare_method.pm +7 -2
  219. package/project/.sdk/tm/php/test/Omni.php +691 -0
  220. package/project/.sdk/tm/php/test/OmniSmokeTest.php +93 -0
  221. package/project/.sdk/tm/php/test/PrimaryUtilityTest.php +210 -571
  222. package/project/.sdk/tm/php/test/StructUtilityTest.php +320 -342
  223. package/project/.sdk/tm/php/test/vendor/omni/Runner.php +644 -0
  224. package/project/.sdk/tm/php/test/vendor/omni/Util.php +283 -0
  225. package/project/.sdk/tm/php/utility/MakeSpec.php +10 -3
  226. package/project/.sdk/tm/php/utility/PrepareBody.php +7 -1
  227. package/project/.sdk/tm/php/utility/PrepareMethod.php +6 -2
  228. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/__init__.py +36 -0
  229. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/capability.py +141 -0
  230. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/catalog.py +50 -0
  231. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/config.py +333 -0
  232. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/depend.py +198 -0
  233. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/env.py +147 -0
  234. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/export.py +52 -0
  235. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/graph.py +139 -0
  236. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/host.py +1053 -0
  237. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/order.py +171 -0
  238. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/point.py +95 -0
  239. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/ref.py +116 -0
  240. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/resolve.py +59 -0
  241. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/types.py +87 -0
  242. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/version.py +112 -0
  243. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/__init__.py +76 -0
  244. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/addr.py +116 -0
  245. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/aws.py +192 -0
  246. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/azuresecrets.py +120 -0
  247. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/boru.py +140 -0
  248. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/doppler.py +62 -0
  249. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/gcpsecrets.py +101 -0
  250. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/hashicorp.py +151 -0
  251. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/httpjson.py +115 -0
  252. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/infisical.py +90 -0
  253. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/onepassword.py +101 -0
  254. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/secretspec.py +119 -0
  255. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/sigv4.py +125 -0
  256. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/providers.py +211 -0
  257. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/sekreto.py +475 -0
  258. package/project/.sdk/tm/py/pkg/feature/secrets_feature.py +467 -0
  259. package/project/.sdk/tm/py/pkg/utility/prepare_method.py +5 -1
  260. package/project/.sdk/tm/py/pkg/utility/voxgig_struct/__init__.py +0 -2
  261. package/project/.sdk/tm/py/pkg/utility/voxgig_struct/voxgig_struct.py +780 -529
  262. package/project/.sdk/tm/py/src/feature/secrets/.gitkeep +0 -0
  263. package/project/.sdk/tm/py/test/feature/__init__.py +0 -0
  264. package/project/.sdk/tm/py/test/feature/secrets/__init__.py +0 -0
  265. package/project/.sdk/tm/py/test/feature/secrets/test_secrets.py +337 -0
  266. package/project/.sdk/tm/py/test/omni.py +415 -0
  267. package/project/.sdk/tm/py/test/test_omni_smoke.py +74 -0
  268. package/project/.sdk/tm/py/test/test_primary_utility.py +144 -668
  269. package/project/.sdk/tm/py/test/test_struct_utility.py +74 -27
  270. package/project/.sdk/tm/py/test/voxgig_omni/__init__.py +62 -0
  271. package/project/.sdk/tm/py/test/voxgig_omni/runner.py +580 -0
  272. package/project/.sdk/tm/py/test/voxgig_omni/util.py +252 -0
  273. package/project/.sdk/tm/rb/test/omni.rb +505 -0
  274. package/project/.sdk/tm/rb/test/omni_smoke_test.rb +72 -0
  275. package/project/.sdk/tm/rb/test/primary_utility_test.rb +174 -560
  276. package/project/.sdk/tm/rb/test/struct_utility_test.rb +13 -7
  277. package/project/.sdk/tm/rb/test/vendor/omni/runner.rb +493 -0
  278. package/project/.sdk/tm/rb/test/vendor/omni/util.rb +199 -0
  279. package/project/.sdk/tm/rb/test/vendor/omni/voxgig_omni.rb +15 -0
  280. package/project/.sdk/tm/rb/utility/prepare_method.rb +5 -1
  281. package/project/.sdk/tm/rust/tests/common/mod.rs +19 -242
  282. package/project/.sdk/tm/rust/tests/omni_resolver/mod.rs +888 -0
  283. package/project/.sdk/tm/rust/tests/omni_smoke_test.rs +286 -0
  284. package/project/.sdk/tm/rust/tests/primary_utility_test.rs +318 -312
  285. package/project/.sdk/tm/rust/tests/struct_utility_test.rs +66 -28
  286. package/project/.sdk/tm/rust/tests/vendor/omni/json.rs +412 -0
  287. package/project/.sdk/tm/rust/tests/vendor/omni/mod.rs +38 -0
  288. package/project/.sdk/tm/rust/tests/vendor/omni/regex.rs +392 -0
  289. package/project/.sdk/tm/rust/tests/vendor/omni/runner.rs +1001 -0
  290. package/project/.sdk/tm/rust/tests/vendor/omni/util.rs +161 -0
  291. package/project/.sdk/tm/rust/utility/prepare_method.rs +5 -1
  292. package/project/.sdk/tm/scala/Makefile +16 -6
  293. package/project/.sdk/tm/scala/sdktest/OmniResolver.scala +497 -0
  294. package/project/.sdk/tm/scala/sdktest/OmniSmoke.scala +192 -0
  295. package/project/.sdk/tm/scala/sdktest/PrimaryCorpus.scala +47 -19
  296. package/project/.sdk/tm/scala/sdktest/StructCorpus.scala +0 -0
  297. package/project/.sdk/tm/scala/sdktest/vendor/omni/Json.scala +229 -0
  298. package/project/.sdk/tm/scala/sdktest/vendor/omni/Runner.scala +552 -0
  299. package/project/.sdk/tm/scala/sdktest/vendor/omni/Util.scala +104 -0
  300. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/Constants.swift +10 -0
  301. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/Inject.swift +28 -5
  302. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/Injection.swift +5 -1
  303. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/Minor.swift +4 -1
  304. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/Validate.swift +15 -5
  305. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/utility/Prepare.swift +6 -1
  306. package/project/.sdk/tm/swift/Tests/ProjectNameSDKTests/OmniResolver.swift +474 -0
  307. package/project/.sdk/tm/swift/Tests/ProjectNameSDKTests/OmniSmokeTest.swift +107 -0
  308. package/project/.sdk/tm/swift/Tests/ProjectNameSDKTests/PrimaryUtilityTest.swift +141 -178
  309. package/project/.sdk/tm/swift/Tests/ProjectNameSDKTests/Runner.swift +17 -113
  310. package/project/.sdk/tm/swift/Tests/ProjectNameSDKTests/StructUtilityTest.swift +295 -446
  311. package/project/.sdk/tm/swift/Tests/vendor/omni/Json.swift +364 -0
  312. package/project/.sdk/tm/swift/Tests/vendor/omni/Runner.swift +730 -0
  313. package/project/.sdk/tm/swift/Tests/vendor/omni/Util.swift +162 -0
  314. package/project/.sdk/tm/ts/src/feature/secrets/SecretsFeature.ts +7 -0
  315. package/project/.sdk/tm/ts/src/feature/secrets/plugin/Capability.ts +148 -0
  316. package/project/.sdk/tm/ts/src/feature/secrets/plugin/Catalog.ts +55 -0
  317. package/project/.sdk/tm/ts/src/feature/secrets/plugin/Config.ts +344 -0
  318. package/project/.sdk/tm/ts/src/feature/secrets/plugin/Depend.ts +205 -0
  319. package/project/.sdk/tm/ts/src/feature/secrets/plugin/Env.ts +138 -0
  320. package/project/.sdk/tm/ts/src/feature/secrets/plugin/Export.ts +46 -0
  321. package/project/.sdk/tm/ts/src/feature/secrets/plugin/FeatureHost.ts +349 -0
  322. package/project/.sdk/tm/ts/src/feature/secrets/plugin/Graph.ts +181 -0
  323. package/project/.sdk/tm/ts/src/feature/secrets/plugin/Host.ts +1132 -0
  324. package/project/.sdk/tm/ts/src/feature/secrets/plugin/Order.ts +177 -0
  325. package/project/.sdk/tm/ts/src/feature/secrets/plugin/Point.ts +119 -0
  326. package/project/.sdk/tm/ts/src/feature/secrets/plugin/Ref.ts +102 -0
  327. package/project/.sdk/tm/ts/src/feature/secrets/plugin/Resolve.ts +61 -0
  328. package/project/.sdk/tm/ts/src/feature/secrets/plugin/Types.ts +112 -0
  329. package/project/.sdk/tm/ts/src/feature/secrets/plugin/Version.ts +100 -0
  330. package/project/.sdk/tm/ts/src/feature/secrets/plugin/index.ts +37 -0
  331. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/Sekreto.ts +163 -30
  332. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/index.ts +27 -22
  333. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/{provider → plugins}/aws.ts +26 -36
  334. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/{provider → plugins}/azuresecrets.ts +19 -21
  335. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/{provider → plugins}/boru.ts +36 -17
  336. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/{provider → plugins}/doppler.ts +14 -21
  337. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/{provider → plugins}/gcpsecrets.ts +27 -27
  338. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/{provider → plugins}/hashicorp.ts +25 -39
  339. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/plugins/httpjson.ts +99 -0
  340. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/{provider → plugins}/infisical.ts +14 -16
  341. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/{provider → plugins}/onepassword.ts +15 -22
  342. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/plugins/secretspec.ts +98 -0
  343. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/{Sigv4.ts → plugins/sigv4.ts} +7 -6
  344. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/addr.ts +97 -23
  345. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/builtin.ts +37 -0
  346. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/dotenv.ts +4 -17
  347. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/env.ts +4 -16
  348. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/file.ts +11 -25
  349. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/memory.ts +6 -23
  350. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/support.ts +106 -39
  351. package/project/.sdk/tm/ts/src/utility/StructUtility.ts +3 -3
  352. package/project/.sdk/tm/ts/test/omni.ts +104 -32
  353. package/project/.sdk/tm/ts/test/utility/StructUtility.test.ts +27 -0
  354. package/project/.sdk/tm/ts/test/vendor/omni/Runner.ts +32 -5
  355. package/project/.sdk/tm/ts/test/vendor/omni/Util.ts +2 -2
  356. package/project/.sdk/tm/ts/test/vendor/omni/index.ts +2 -2
  357. package/project/.sdk/tm/zig/Makefile +15 -1
  358. package/project/.sdk/tm/zig/build.zig +23 -5
  359. package/project/.sdk/tm/zig/core/helpers.zig +52 -11
  360. package/project/.sdk/tm/zig/core/mem.zig +17 -1
  361. package/project/.sdk/tm/zig/core/utility.zig +23 -19
  362. package/project/.sdk/tm/zig/feature/audit.zig +2 -2
  363. package/project/.sdk/tm/zig/feature/cache.zig +2 -2
  364. package/project/.sdk/tm/zig/feature/debug.zig +5 -5
  365. package/project/.sdk/tm/zig/feature/netsim.zig +2 -2
  366. package/project/.sdk/tm/zig/feature/paging.zig +2 -2
  367. package/project/.sdk/tm/zig/feature/proxy.zig +15 -8
  368. package/project/.sdk/tm/zig/feature/streaming.zig +5 -5
  369. package/project/.sdk/tm/zig/feature/support.zig +3 -3
  370. package/project/.sdk/tm/zig/feature/telemetry.zig +5 -5
  371. package/project/.sdk/tm/zig/feature/test.zig +10 -5
  372. package/project/.sdk/tm/zig/test/fh.zig +10 -10
  373. package/project/.sdk/tm/zig/test/gotcha_test.zig +5 -5
  374. package/project/.sdk/tm/zig/test/omniresolver.zig +515 -0
  375. package/project/.sdk/tm/zig/test/omnismoke_test.zig +284 -0
  376. package/project/.sdk/tm/zig/test/pipeline_test.zig +8 -8
  377. package/project/.sdk/tm/zig/test/primary_utility_test.zig +145 -155
  378. package/project/.sdk/tm/zig/test/struct_corpus.zig +264 -187
  379. package/project/.sdk/tm/zig/test/vendor/omni/omni.zig +1314 -0
  380. package/project/.sdk/tm/zig/test/vendor/omni/regex.zig +446 -0
  381. package/project/.sdk/tm/zig/utility/voxgigstruct/regex.zig +7 -4
  382. package/project/.sdk/tm/zig/utility/voxgigstruct/struct.zig +356 -157
  383. package/project/sdkgen-package.json +1 -1
  384. package/src/action/doctor.ts +66 -2
  385. package/src/helpers/naming.ts +4 -2
  386. package/project/.sdk/tm/c/tests/runner.h +0 -274
  387. package/project/.sdk/tm/cpp/test/struct_runner.hpp +0 -314
  388. package/project/.sdk/tm/csharp/test/StructRunner.cs +0 -276
  389. package/project/.sdk/tm/dart/test/runner.dart +0 -406
  390. package/project/.sdk/tm/dart/test/struct_corpus.dart +0 -531
  391. package/project/.sdk/tm/elixir/test/support/struct_corpus.ex +0 -1088
  392. package/project/.sdk/tm/go/test/runner_test.go +0 -629
  393. package/project/.sdk/tm/go/test/struct_runner_test.go +0 -1094
  394. package/project/.sdk/tm/java/test/StructRunner.java +0 -281
  395. package/project/.sdk/tm/js/test/runner.js +0 -387
  396. package/project/.sdk/tm/kotlin/test/StructRunner.kt +0 -177
  397. package/project/.sdk/tm/lua/test/struct_runner.lua +0 -602
  398. package/project/.sdk/tm/ocaml/test/corpus_runner.ml +0 -185
  399. package/project/.sdk/tm/perl/t/struct_runner.pm +0 -275
  400. package/project/.sdk/tm/php/test/StructRunner.php +0 -275
  401. package/project/.sdk/tm/py/test/struct_runner.py +0 -411
  402. package/project/.sdk/tm/rb/test/struct_runner.rb +0 -309
  403. package/project/.sdk/tm/rust/tests/struct_runner/mod.rs +0 -424
  404. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/Registry.ts +0 -90
  405. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/http.ts +0 -66
  406. package/project/.sdk/tm/ts/test/vendor/omni/compat.ts +0 -188
  407. package/project/.sdk/tm/zig/test/struct_runner.zig +0 -464
@@ -0,0 +1,641 @@
1
+ -- VENDORED: @voxgig/omni sdk-20260907-0029-0 (lua/src/runner.lua)
2
+ -- Source: https://github.com/voxgig/omni @ 274708cc2d12b21707d975543953f845f8444be0 [tag: sdk-20260907-0029-0]
3
+ -- License: MIT (c) voxgig - see repository LICENSE. Do not edit: resync from upstream.
4
+ -- Omni: the shared multi-language test runner (Lua port).
5
+ --
6
+ -- Port of the canonical TypeScript implementation
7
+ -- (typescript/src/Runner.ts). Behaviour must match, case for case.
8
+
9
+ -- Sibling modules are required RELATIVE to this one, so omni's `src/` never
10
+ -- has to be on a consumer's package.path. omni's own harness requires bare
11
+ -- names (`require('util')`) and gets an empty prefix; the struct compat shim
12
+ -- requires `src.util` and gets `src.`, which then finds `src.json`.
13
+ --
14
+ -- A bare `require('json')` here would force a consumer to add omni's `src/`
15
+ -- to package.path -- and that shadows the consumer's OWN modules of the same
16
+ -- name. It bit exactly that way: omni ships `src/regex.lua`, struct/lua ships
17
+ -- `src/regex.lua`, and struct's regex silently became omni's.
18
+ local _prefix = (...):match('^(.*%.)[^.]*$') or ''
19
+
20
+ local regex = require(_prefix .. 'regex')
21
+ local u = require(_prefix .. 'util')
22
+
23
+ local M = {}
24
+
25
+ M.NULLMARK = u.NULLMARK
26
+ M.UNDEFMARK = u.UNDEFMARK
27
+ M.EXISTSMARK = u.EXISTSMARK
28
+ M.NULL = u.NULL
29
+ M.ABSENT = u.ABSENT
30
+
31
+ -- The newest spec format version this runner understands. A spec with no
32
+ -- OMNI block is version 0: the original, lenient format, frozen forever.
33
+ -- Version 1 turns on strict entry validation (see checkentry).
34
+ M.SPECVERSION = 1
35
+
36
+ -- Capability strings this runner supports beyond the version baseline. A
37
+ -- spec's OMNI.requires list is checked against this: an unknown capability
38
+ -- refuses the spec loudly at load time, instead of a lagging port silently
39
+ -- mis-running it. (Empty today; future format features mint a string here.)
40
+ M.CAPABILITIES = {}
41
+
42
+ -- The complete set of fields an entry may carry. Under version 1 anything
43
+ -- else is an error: an unrecognised key is almost always a typo'd
44
+ -- assertion, and a typo'd assertion is a test that silently stopped
45
+ -- testing.
46
+ local ENTRYFIELDS = { 'in', 'args', 'ctx', 'out', 'err', 'match', 'client', 'id', 'doc' }
47
+
48
+ -- Linear membership check (Lua has no Array#includes).
49
+ local function contains(list, value)
50
+ for _, item in ipairs(list) do
51
+ if item == value then
52
+ return true
53
+ end
54
+ end
55
+ return false
56
+ end
57
+
58
+ -- A test failure (or a malformed spec). Raised as a table, so that errors
59
+ -- raised by the subject under test (plain strings) stay distinguishable.
60
+ local OMNIMT = { __tostring = function(err) return err.message end }
61
+
62
+ function M.OmniError(message, entry)
63
+ return setmetatable({ omni = true, message = message, entry = entry }, OMNIMT)
64
+ end
65
+
66
+ function M.isomnierror(err)
67
+ return 'table' == type(err) and true == err.omni
68
+ end
69
+
70
+ --- The message an `err` expectation matches.
71
+ function M.errmessage(err)
72
+ if M.isomnierror(err) then
73
+ return err.message
74
+ end
75
+ if 'table' == type(err) and nil ~= err.message then
76
+ return tostring(err.message)
77
+ end
78
+ return tostring(err)
79
+ end
80
+
81
+ --- Load a spec: a path to a JSON file.
82
+ function M.loadspec(path)
83
+ local handle = io.open(path, 'r')
84
+ if nil == handle then
85
+ error(M.OmniError('omni: cannot read spec: ' .. path))
86
+ end
87
+
88
+ local text = handle:read('a')
89
+ handle:close()
90
+
91
+ return u.parse(text)
92
+ end
93
+
94
+ --- Find `primary.<name>`, then `<name>`, then the whole spec.
95
+ function M.resolvespec(name, alltests)
96
+ if nil == name or '' == name then
97
+ return alltests
98
+ end
99
+
100
+ local primary = u.get(u.get(alltests, 'primary'), name)
101
+ if not u.isabsent(primary) then
102
+ return primary
103
+ end
104
+
105
+ local section = u.get(alltests, name)
106
+ if not u.isabsent(section) then
107
+ return section
108
+ end
109
+
110
+ return alltests
111
+ end
112
+
113
+ -- Read the spec's format version from its optional top-level OMNI block,
114
+ -- and refuse a spec this runner cannot faithfully run: a version newer
115
+ -- than SPECVERSION, or a required capability not in CAPABILITIES.
116
+ local function resolveversion(alltests)
117
+ local meta = u.ABSENT
118
+ if u.ismap(alltests) then
119
+ meta = u.get(alltests, 'OMNI')
120
+ end
121
+
122
+ if u.isabsent(meta) then
123
+ return 0
124
+ end
125
+
126
+ local version = u.ABSENT
127
+ if u.ismap(meta) then
128
+ version = u.get(meta, 'version')
129
+ end
130
+
131
+ if not u.ismap(meta) or not u.isnum(version) or 0 ~= (version % 1) then
132
+ error(M.OmniError('omni: malformed OMNI version block'))
133
+ end
134
+
135
+ if 0 > version or M.SPECVERSION < version then
136
+ error(M.OmniError('omni: unsupported spec version: ' .. u.stringify(version)))
137
+ end
138
+
139
+ local requires = u.get(meta, 'requires')
140
+ if not u.isabsent(requires) then
141
+ if not u.islist(requires) then
142
+ error(M.OmniError('omni: malformed OMNI requires list'))
143
+ end
144
+ for _, cap in ipairs(requires) do
145
+ if not u.isstr(cap) or not contains(M.CAPABILITIES, cap) then
146
+ error(M.OmniError('omni: spec requires unsupported capability: ' .. u.stringify(cap)))
147
+ end
148
+ end
149
+ end
150
+
151
+ return version
152
+ end
153
+
154
+ --- Nulls (and absent values) become NULLMARK. Always a fresh copy.
155
+ function M.fixjson(val, donull)
156
+ if u.isnone(val) then
157
+ if donull then
158
+ return u.NULLMARK
159
+ end
160
+ -- Canonical returns the value UNCHANGED here (Runner.ts: `return donull ?
161
+ -- NULLMARK : val`), which keeps undefined distinct from null. Returning
162
+ -- u.NULL instead asserted "this is a JSON null" about an ABSENT value, so
163
+ -- a subject that returned nothing could never match an entry with no
164
+ -- `out`: deepequal requires both sides absent, and NULL is not absent.
165
+ -- A raw Lua nil normalises to ABSENT because a nil cannot sit in a table.
166
+ if nil == val then
167
+ return u.ABSENT
168
+ end
169
+ return val
170
+ end
171
+
172
+ if u.islist(val) then
173
+ local out = u.list({})
174
+ for index, entry in ipairs(val) do
175
+ out[index] = M.fixjson(entry, donull)
176
+ end
177
+ return out
178
+ end
179
+
180
+ if u.ismap(val) then
181
+ local out = u.map({})
182
+ for key, entry in pairs(val) do
183
+ rawset(out, key, M.fixjson(entry, donull))
184
+ end
185
+ return out
186
+ end
187
+
188
+ return val
189
+ end
190
+
191
+ --- The JSON form of an error: always at least {name,message}.
192
+ function M.errify(err)
193
+ return u.map({ name = 'Error', message = M.errmessage(err) })
194
+ end
195
+
196
+ --- The error base a `match.err` sees: the provider's own, when it has one.
197
+ -- A library whose errors carry a `code` reaches `match: {err: {code}}`
198
+ -- through `Provider.errify`, which REPLACES `errify` rather than adding
199
+ -- to it.
200
+ function M.errbase(err, provider)
201
+ local hook = nil ~= provider and provider.errify or nil
202
+ if nil ~= hook then
203
+ return hook(err)
204
+ end
205
+ return M.errify(err)
206
+ end
207
+
208
+ --- Match one leaf: /regex/ or case-insensitive substring for strings.
209
+ function M.matchval(check, base)
210
+ if u.deepequal(check, base) then
211
+ return true
212
+ end
213
+
214
+ local want = check
215
+
216
+ if u.isnone(want) then
217
+ return u.isnone(base) or u.NULLMARK == base
218
+ end
219
+
220
+ if u.isstr(want) then
221
+ -- An empty want would substring-match anything: reject it.
222
+ if '' == want then
223
+ return false
224
+ end
225
+
226
+ local basestr = u.stringify(base)
227
+
228
+ if 2 < #want and '/' == want:sub(1, 1) and '/' == want:sub(-1) then
229
+ return regex.find(want:sub(2, #want - 1), basestr)
230
+ end
231
+
232
+ return nil ~= basestr:lower():find(want:lower(), 1, true)
233
+ end
234
+
235
+ return u.deepequal(want, base)
236
+ end
237
+
238
+ --- Convert NULLMARK sentinels back into real nulls.
239
+ function M.nullmodifier(val)
240
+ if u.NULLMARK == val then
241
+ return u.NULL
242
+ end
243
+ if u.isstr(val) then
244
+ return (val:gsub(u.NULLMARK, 'null'))
245
+ end
246
+ return val
247
+ end
248
+
249
+ -- The spec-defined part of an entry (drop runner bookkeeping).
250
+ local function entrysummary(entry)
251
+ if not u.ismap(entry) then
252
+ return entry
253
+ end
254
+ local out = u.map({})
255
+ for key, value in pairs(entry) do
256
+ if 'res' ~= key and 'thrown' ~= key and 'ctx' ~= key then
257
+ rawset(out, key, value)
258
+ end
259
+ end
260
+ return out
261
+ end
262
+
263
+ -- The label of one entry, for failure messages.
264
+ local function entryref(label, index, entry)
265
+ local id = u.get(entry, 'id')
266
+ local idpart = u.isabsent(id) and '' or (' (' .. u.stringify(id) .. ')')
267
+ return label .. '[' .. index .. ']' .. idpart
268
+ end
269
+
270
+ local function fail(label, index, entry, reason, expected, actual)
271
+ local msg = 'omni: ' .. entryref(label, index, entry) .. ': ' .. reason
272
+
273
+ if nil ~= expected then
274
+ msg = msg .. '\n expected: ' .. expected
275
+ end
276
+ if nil ~= actual then
277
+ msg = msg .. '\n actual: ' .. actual
278
+ end
279
+
280
+ msg = msg .. '\n entry: ' .. u.stringify(entrysummary(entry))
281
+
282
+ return M.OmniError(msg, entry)
283
+ end
284
+
285
+ -- Strict entry validation, applied when the spec declares version 1 or
286
+ -- later. The lenient format converts each of these mistakes into a silent
287
+ -- pass or a dead field; here they fail with the entry named.
288
+ local function checkentry(label, index, entry)
289
+ if not u.ismap(entry) then
290
+ error(fail(label, index, entry, 'entry is not a map'))
291
+ end
292
+
293
+ for key in pairs(entry) do
294
+ if not contains(ENTRYFIELDS, key) then
295
+ error(fail(label, index, entry, 'unknown entry field: ' .. key))
296
+ end
297
+ end
298
+
299
+ local argsources = 0
300
+ for _, key in ipairs({ 'in', 'args', 'ctx' }) do
301
+ if u.has(entry, key) then
302
+ argsources = argsources + 1
303
+ end
304
+ end
305
+ if 1 < argsources then
306
+ error(fail(label, index, entry, 'entry has more than one of in, args, ctx'))
307
+ end
308
+
309
+ if not u.isnone(u.get(entry, 'err')) and u.has(entry, 'out') then
310
+ error(fail(label, index, entry, 'entry has both err and out'))
311
+ end
312
+
313
+ if u.has(entry, 'id') and not u.isstr(u.get(entry, 'id')) then
314
+ error(fail(label, index, entry, 'entry id is not a string'))
315
+ end
316
+ end
317
+
318
+ -- Validate a version-1 group up front, against the AUTHORED entries -
319
+ -- null-normalisation would otherwise rewrite an authored null (e.g.
320
+ -- id: null) into a sentinel string and hide it from validation. A
321
+ -- malformed spec is a spec error, not a test result, so it fails before
322
+ -- any subject runs.
323
+ local function checkset(label, testspec, normalset)
324
+ local origset = normalset
325
+ if u.ismap(testspec) and u.islist(u.get(testspec, 'set')) then
326
+ origset = u.get(testspec, 'set')
327
+ end
328
+
329
+ local empty = u.ABSENT
330
+ if u.ismap(testspec) then
331
+ empty = u.get(testspec, 'empty')
332
+ end
333
+
334
+ if 0 == #origset and true ~= empty then
335
+ error(M.OmniError('omni: empty test set: ' .. label))
336
+ end
337
+
338
+ for at, entry in ipairs(origset) do
339
+ checkentry(label, at - 1, entry)
340
+ end
341
+ end
342
+
343
+ -- Check that every leaf of `check` is present, and matches, in `base`.
344
+ local function matchcheck(label, index, entry, check, base, path)
345
+ path = path or {}
346
+
347
+ local where = 0 == #path and '<root>' or u.pathify(path)
348
+
349
+ if u.islist(check) then
350
+ for at, subcheck in ipairs(check) do
351
+ local childpath = { table.unpack(path) }
352
+ childpath[#childpath + 1] = tostring(at - 1)
353
+ matchcheck(label, index, entry, subcheck, base, childpath)
354
+ end
355
+ return
356
+ end
357
+
358
+ if u.ismap(check) then
359
+ for key, subcheck in pairs(check) do
360
+ local childpath = { table.unpack(path) }
361
+ childpath[#childpath + 1] = key
362
+ matchcheck(label, index, entry, subcheck, base, childpath)
363
+ end
364
+ return
365
+ end
366
+
367
+ local baseval = u.getpath(base, path)
368
+
369
+ -- The sentinels are tested BEFORE the identity check below. Otherwise a
370
+ -- subject returning the literal string "__UNDEF__" satisfies an assertion
371
+ -- that the key is absent - two mutually exclusive states passing one
372
+ -- check. A sentinel that accepts its own literal is not a sentinel.
373
+ -- (NULLMARK still accepts NULLMARK: under the default null flag a real
374
+ -- null has already been normalised to it, so the two are genuinely
375
+ -- indistinguishable here - that one needs a raw-value escape, not an
376
+ -- ordering change.)
377
+
378
+ -- Explicitly absent: satisfied only by a genuinely missing key, never by
379
+ -- a present null (the distinction the sentinels exist to keep).
380
+ if u.UNDEFMARK == check then
381
+ if u.isabsent(baseval) then
382
+ return
383
+ end
384
+ error(fail(label, index, entry, 'expected absent at ' .. where,
385
+ 'absent', u.stringify(baseval)))
386
+ end
387
+
388
+ -- Explicitly null: satisfied only by a present null.
389
+ if u.NULLMARK == check then
390
+ if u.isnull(baseval) or u.NULLMARK == baseval then
391
+ return
392
+ end
393
+ error(fail(label, index, entry, 'expected null at ' .. where,
394
+ 'null', u.stringify(baseval)))
395
+ end
396
+
397
+ -- Explicitly present: any present value, including null.
398
+ if u.EXISTSMARK == check then
399
+ if not u.isabsent(baseval) then
400
+ return
401
+ end
402
+ error(fail(label, index, entry, 'expected present at ' .. where,
403
+ 'present', 'absent'))
404
+ end
405
+
406
+ -- Identical values match. This sits below the sentinel branches on
407
+ -- purpose - see the note above.
408
+ if u.deepequal(check, baseval) then
409
+ return
410
+ end
411
+
412
+ -- A concrete expectation never matches a missing key - a match leaf
413
+ -- against an absent value must fail, not substring-match "undefined".
414
+ if u.isabsent(baseval) then
415
+ error(fail(label, index, entry, 'match failed at ' .. where,
416
+ u.stringify(check), 'absent'))
417
+ end
418
+
419
+ if not M.matchval(check, baseval) then
420
+ error(fail(label, index, entry, 'match failed at ' .. where,
421
+ u.stringify(check), u.stringify(baseval)))
422
+ end
423
+ end
424
+
425
+ M.match = matchcheck
426
+
427
+ local function checkresult(label, index, entry, args, res)
428
+ local matched = false
429
+
430
+ local entryerr = u.get(entry, 'err')
431
+ if not u.isnone(entryerr) then
432
+ error(fail(label, index, entry, 'expected error did not occur',
433
+ u.stringify(entryerr), u.stringify(res)))
434
+ end
435
+
436
+ local check = u.get(entry, 'match')
437
+ if not u.isnone(check) then
438
+ local base = u.map({
439
+ ['in'] = u.get(entry, 'in'),
440
+ args = u.list(args),
441
+ out = u.get(entry, 'res'),
442
+ ctx = u.get(entry, 'ctx'),
443
+ })
444
+ matchcheck(label, index, entry, check, base)
445
+ matched = true
446
+ end
447
+
448
+ local out = u.get(entry, 'out')
449
+
450
+ if u.deepequal(res, out) then
451
+ return
452
+ end
453
+
454
+ -- NOTE: a match with no explicit out is a complete check on its own.
455
+ if matched and (u.isnone(out) or u.NULLMARK == out) then
456
+ return
457
+ end
458
+
459
+ error(fail(label, index, entry, 'result mismatch', u.stringify(out), u.stringify(res)))
460
+ end
461
+
462
+ local function handleerror(label, index, entry, err, provider)
463
+ local entryerr = u.get(entry, 'err')
464
+
465
+ if not u.isnone(entryerr) then
466
+ if true == entryerr or M.matchval(entryerr, M.errmessage(err)) then
467
+ local check = u.get(entry, 'match')
468
+ if not u.isnone(check) then
469
+ local base = u.map({
470
+ ['in'] = u.get(entry, 'in'),
471
+ out = u.get(entry, 'res'),
472
+ ctx = u.get(entry, 'ctx'),
473
+ err = M.errbase(err, provider),
474
+ })
475
+ matchcheck(label, index, entry, check, base)
476
+ end
477
+ return
478
+ end
479
+
480
+ error(fail(label, index, entry, 'error mismatch',
481
+ u.stringify(entryerr), M.errmessage(err)))
482
+ end
483
+
484
+ error(fail(label, index, entry, 'unexpected error', nil, M.errmessage(err)))
485
+ end
486
+
487
+ -- Build the argument list: `ctx`, `args`, or `in`. `client` is the
488
+ -- provider that owns this entry's subject (the root provider, unless
489
+ -- `entry.client` names a DEF.client override) - the runner attaches it to
490
+ -- a contextified map argument, so a subject can reach the provider that
491
+ -- owns it.
492
+ local function resolveargs(entry, client, provider)
493
+ local args
494
+
495
+ local hasctx = u.has(entry, 'ctx')
496
+ local hasargs = u.has(entry, 'args')
497
+
498
+ if hasctx then
499
+ args = { u.get(entry, 'ctx') }
500
+ elseif hasargs then
501
+ local raw = u.get(entry, 'args')
502
+ args = {}
503
+ for index, value in ipairs(raw) do
504
+ args[index] = value
505
+ end
506
+ else
507
+ args = { u.clone(u.get(entry, 'in')) }
508
+ end
509
+
510
+ if (hasctx or hasargs) and u.ismap(args[1]) then
511
+ local first = u.clone(args[1])
512
+ if nil ~= provider.contextify then
513
+ first = provider.contextify(first)
514
+ end
515
+ args[1] = first
516
+ rawset(entry, 'ctx', first)
517
+ if u.ismap(first) then
518
+ rawset(first, 'client', client)
519
+ end
520
+ end
521
+
522
+ return args
523
+ end
524
+
525
+ --- Make a runner for a spec file path (or spec value) and a provider.
526
+ function M.makeRunner(specref, provider)
527
+ local alltests = u.isstr(specref) and M.loadspec(specref) or specref
528
+ local specversion = resolveversion(alltests)
529
+ local useprovider = provider or {}
530
+
531
+ return function(name, store)
532
+ local spec = M.resolvespec(name, alltests)
533
+ local clients = {}
534
+
535
+ local defclient = u.get(u.get(spec, 'DEF'), 'client')
536
+
537
+ -- A spec may define clients that a given test run never references.
538
+ if u.ismap(defclient) and nil ~= useprovider.client then
539
+ for clientname, cdef in pairs(defclient) do
540
+ local copts = u.get(u.get(cdef, 'test'), 'options')
541
+ if u.isabsent(copts) then
542
+ copts = u.map({})
543
+ end
544
+ if nil ~= useprovider.inject and u.ismap(store) then
545
+ copts = useprovider.inject(copts, store)
546
+ end
547
+ clients[clientname] = useprovider.client(copts)
548
+ end
549
+ end
550
+
551
+ local subject = nil
552
+ if nil ~= useprovider.subject and nil ~= name then
553
+ subject = useprovider.subject(name)
554
+ end
555
+
556
+ local runpack = {
557
+ spec = spec,
558
+ subject = subject,
559
+ client = useprovider,
560
+ }
561
+
562
+ runpack.set = function(setname)
563
+ return u.get(spec, setname)
564
+ end
565
+
566
+ runpack.runsetflags = function(testspec, flags, testsubject)
567
+ flags = flags or {}
568
+ local donull = nil == flags.null and true or (true == flags.null)
569
+ local label = flags.name or ((nil == name or '' == name) and 'set' or name)
570
+
571
+ local usesubject = testsubject or subject
572
+ if nil == usesubject then
573
+ error(M.OmniError('omni: no test subject for: ' .. label))
574
+ end
575
+
576
+ local testspecmap = M.fixjson(testspec, donull)
577
+ local testset = u.get(testspecmap, 'set')
578
+
579
+ if not u.islist(testset) then
580
+ error(M.OmniError('omni: test spec has no set: ' .. label))
581
+ end
582
+
583
+ if 1 <= specversion then
584
+ checkset(label, testspec, testset)
585
+ end
586
+
587
+ for at, entry in ipairs(testset) do
588
+ local index = at - 1
589
+
590
+ if not u.ismap(entry) then
591
+ error(M.OmniError('omni: ' .. label .. '[' .. index .. ']: entry is not a map'))
592
+ end
593
+
594
+ -- An entry with no `out` expects a null (or absent) result.
595
+ if donull and u.isnone(u.get(entry, 'out')) then
596
+ rawset(entry, 'out', u.NULLMARK)
597
+ end
598
+
599
+ local entrysubject = usesubject
600
+ local entryclient = useprovider
601
+ local clientname = u.get(entry, 'client')
602
+
603
+ if u.isstr(clientname) then
604
+ local client = clients[clientname]
605
+ if nil == client then
606
+ error(M.OmniError('omni: unknown client: ' .. clientname, entry))
607
+ end
608
+ entryclient = client
609
+ if nil ~= client.subject then
610
+ local clientsubject = client.subject(name)
611
+ if nil ~= clientsubject then
612
+ entrysubject = clientsubject
613
+ end
614
+ end
615
+ end
616
+
617
+ local args = resolveargs(entry, entryclient, useprovider)
618
+
619
+ local ok, result = pcall(entrysubject, table.unpack(args))
620
+
621
+ if ok then
622
+ local res = M.fixjson(result, donull)
623
+ rawset(entry, 'res', res)
624
+ checkresult(label, index, entry, args, res)
625
+ elseif M.isomnierror(result) then
626
+ error(result)
627
+ else
628
+ handleerror(label, index, entry, result, useprovider)
629
+ end
630
+ end
631
+ end
632
+
633
+ runpack.runset = function(testspec, testsubject)
634
+ return runpack.runsetflags(testspec, {}, testsubject)
635
+ end
636
+
637
+ return runpack
638
+ end
639
+ end
640
+
641
+ return M