@voxgig/sdkgen 4.8.1 → 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 +2 -2
  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,16 +1,24 @@
1
- -- Vendored from voxgig/struct/lua
1
+ -- ProjectName SDK struct utility test
2
+ --
3
+ -- The struct corpus drives the LIVE SDK's vendored struct utilities
4
+ -- through the vendored omni runner, via the resolver in test/omni.lua
5
+ -- (struct-runner shape over native vendored omni; test/struct_runner.lua
6
+ -- is retired - see docs/design/vendor-tag-rollout.md). Mirrors upstream
7
+ -- struct/lua's own test/struct_test.lua at the shared tag.
2
8
 
3
9
  local assert = require("luassert")
4
10
 
5
- local vs = require("utility.struct.struct")
11
+ local sdk = require("project-name-_sdk")
6
12
 
7
- local runnerModule = require("test.struct_runner")
8
- local makeRunner, nullModifier, NULLMARK, JSON_NULL = runnerModule.makeRunner,
9
- runnerModule.nullModifier, runnerModule.NULLMARK, runnerModule.JSON_NULL
10
- local StructTestClient = runnerModule.StructTestClient
13
+ local runnerModule = require("test.omni")
14
+ local makeRunner, nullModifier = runnerModule.makeRunner, runnerModule.nullModifier
15
+ -- Spec entries arrive in the runner's own value model, where a JSON null
16
+ -- is a sentinel rather than a lua nil. The skip guards below have to
17
+ -- compare against it.
18
+ local JSON_NULL = runnerModule.JSON_NULL
19
+ local tostructval = runnerModule.tostruct
11
20
 
12
- local _test_dir = debug.getinfo(1, "S").source:match("^@(.+/)") or "./"
13
- local TEST_JSON_FILE = _test_dir .. "../../.sdk/test/test.json"
21
+ local TEST_JSON_FILE = "../../.sdk/test/test.json"
14
22
 
15
23
  ----------------------------------------------------------
16
24
  -- Helper Functions
@@ -36,19 +44,73 @@ local function object(t)
36
44
  })
37
45
  end
38
46
 
47
+ ----------------------------------------------------------
48
+ -- Entries this port cannot express
49
+ ----------------------------------------------------------
50
+
51
+ -- Lua has ONE `nil`. The corpus distinguishes JSON null from absent, and
52
+ -- a lua table cannot hold a nil at all, so a handful of entries have no
53
+ -- representation here. `NOVAL` (vendored struct) covers the ARGUMENT side
54
+ -- - `typify()` against `typify(null)` - but not the RESULT side: a
55
+ -- function that returns nothing and one that returns JSON null both
56
+ -- return `nil`, and the runner reads it as ABSENT (the cheaper side by a
57
+ -- wide margin, measured upstream: reading it as null costs 43 entries,
58
+ -- reading it as absent costs the few named below).
59
+ --
60
+ -- Rather than mark whole groups pending and lose the other entries in
61
+ -- them, the individual entries are dropped and named here.
62
+ --
63
+ -- Each drop is GUARDED. Corpus indexes are positional, so if the corpus
64
+ -- gains or reorders an entry the guard fires and says so, instead of
65
+ -- quietly skipping a different entry and reporting green.
66
+ local function dropentries(group, drops)
67
+ assert.is_true(nil ~= group, "corpus group missing")
68
+ local set = group.set
69
+ assert.is_true(nil ~= set, "corpus group has no set")
70
+
71
+ -- Descending, so each removal leaves the earlier indexes alone.
72
+ for i = #drops, 1, -1 do
73
+ local drop = drops[i]
74
+ local entry = set[drop.at + 1]
75
+ assert.is_true(
76
+ nil ~= entry and drop.is(entry),
77
+ "corpus moved under a skip: " .. drop.why .. " is no longer at index " .. drop.at
78
+ )
79
+ table.remove(set, drop.at + 1)
80
+ end
81
+
82
+ return group
83
+ end
84
+
85
+ -- Helpers the guards use. `dropentries` mutates the spec node in place, so
86
+ -- a group must be dropped from once; a second pass would find the entry
87
+ -- gone and the guard would say so.
88
+ local function isnull(val)
89
+ return JSON_NULL == val
90
+ end
91
+ local function entryin(entry, path)
92
+ local at = entry["in"]
93
+ for part in path:gmatch("[^%.]+") do
94
+ if type(at) ~= "table" then
95
+ return nil
96
+ end
97
+ at = at[part]
98
+ end
99
+ return at
100
+ end
101
+
39
102
  ----------------------------------------------------------
40
103
  -- Test Suite
41
104
  ----------------------------------------------------------
42
105
 
43
106
  describe("struct", function()
44
- local struct_test_client = StructTestClient.new()
45
- local runner = makeRunner(TEST_JSON_FILE, struct_test_client)
107
+ local runner = makeRunner(TEST_JSON_FILE, sdk.test(nil, nil))
46
108
 
47
109
  local runnerStruct = runner('struct')
48
110
  local spec, runset, runsetflags, client = runnerStruct.spec,
49
111
  runnerStruct.runset, runnerStruct.runsetflags, runnerStruct.client
50
112
 
51
- local struct_util = client:utility().struct
113
+ local struct_util = client.utility().struct
52
114
  -- Extract test specifications for different function groups
53
115
  local clone = struct_util.clone
54
116
  local delprop = struct_util.delprop
@@ -140,15 +202,30 @@ describe("struct", function()
140
202
  assert.equal("function", type(strkey))
141
203
  assert.equal("function", type(stringify))
142
204
  assert.equal("function", type(transform))
143
- assert.equal("function", type(typify))
144
205
  assert.equal("function", type(typename))
145
-
206
+ assert.equal("function", type(typify))
146
207
  assert.equal("function", type(validate))
147
208
  assert.equal("function", type(walk))
148
209
  end)
149
210
 
211
+
212
+ -- STRUCT NULLSEM, deliberately NOT a lane here (ts/js/go/py carry one).
213
+ --
214
+ -- The struct.nullsem section asks whether a PRESENT key holding a JSON
215
+ -- null reads as "no value". Lua cannot EXPRESS a stored null at all: a
216
+ -- lua table cannot hold nil, so `{a = nil}` IS `{}` and `[10, null,
217
+ -- 30]` has no representation (the runner boundary rewrites list nulls
218
+ -- to the string "null", which answers the WRONG way on the corpus's
219
+ -- getelem lanes). Measured against the vendored struct: getprop /
220
+ -- getelem / getpath / haskey / keysof over a "stored null" all answer
221
+ -- as ABSENT, vacuously - the null was never stored. A lane would
222
+ -- assert nothing about null semantics, so it is skipped OUT LOUD
223
+ -- instead of passing vacuously.
224
+ pending("nullsem: lua cannot express a stored JSON null - see comment")
225
+
226
+
150
227
  ----------------------------------------------------------
151
- -- Minor Function Tests
228
+ -- Minor Tests
152
229
  ----------------------------------------------------------
153
230
 
154
231
  test("minor-isnode", function()
@@ -189,23 +266,23 @@ describe("struct", function()
189
266
 
190
267
  test("minor-isfunc", function()
191
268
  runset(minorSpec.isfunc, isfunc)
192
-
193
- -- Additional explicit function tests
194
- local f0 = function()
195
- return nil
196
- end
197
-
198
- assert.equal(isfunc(f0), true)
199
- assert.equal(isfunc(function()
200
- return nil
201
- end), true)
202
269
  end)
203
270
 
204
271
 
205
272
  test("minor-clone", function()
206
- runsetflags(minorSpec.clone, {
207
- null = false
208
- }, clone)
273
+ runsetflags(
274
+ dropentries(minorSpec.clone, {
275
+ -- `clone(null)`, which must give back null. The port returns nil,
276
+ -- read as absent. (`clone()` with NO argument passes - NOVAL.)
277
+ { at = 5, why = "clone(null)", is = function(entry)
278
+ return isnull(entry["in"]) and isnull(entry.out)
279
+ end },
280
+ }),
281
+ {
282
+ null = false
283
+ },
284
+ clone
285
+ )
209
286
 
210
287
  -- Additional function cloning test
211
288
  local f0 = function()
@@ -213,7 +290,7 @@ describe("struct", function()
213
290
  end
214
291
 
215
292
  local original = {
216
- a = f0
293
+ a = f0,
217
294
  }
218
295
  local copied = clone(original)
219
296
  assert.are.same(original, copied)
@@ -222,8 +299,12 @@ describe("struct", function()
222
299
 
223
300
  test("minor-filter", function()
224
301
  local checkmap = {
225
- gt3 = function(n) return n[2] > 3 end,
226
- lt3 = function(n) return n[2] < 3 end,
302
+ gt3 = function(n)
303
+ return n[2] > 3
304
+ end,
305
+ lt3 = function(n)
306
+ return n[2] < 3
307
+ end,
227
308
  }
228
309
  runset(minorSpec.filter, function(vin)
229
310
  return filter(vin.val, checkmap[vin.check])
@@ -244,38 +325,30 @@ describe("struct", function()
244
325
 
245
326
 
246
327
  test("minor-escurl", function()
247
- runset(minorSpec.escurl, function(vin)
248
- -- Ensure spaces are properly replaced like in the Go implementation
249
- return escurl(vin):gsub("+", "%%20")
250
- end)
328
+ runset(minorSpec.escurl, escurl)
251
329
  end)
252
330
 
253
331
 
254
332
  test("minor-stringify", function()
255
- runset(minorSpec.stringify, function(vin)
256
- if NULLMARK == vin.val then
257
- return stringify("null", vin.max)
258
- else
259
- return stringify(vin.val, vin.max)
260
- end
333
+ -- null = true so a JSON null `val` arrives as NULLMARK;
334
+ -- stringify(NULLMARK) is "null" (canonical TS stringify(null) ===
335
+ -- "null"), while an absent val (nil) is "".
336
+ runsetflags(minorSpec.stringify, {
337
+ null = true
338
+ }, function(vin)
339
+ return stringify(vin.val, vin.max)
261
340
  end)
262
341
  end)
263
342
 
264
343
 
265
- test('minor-pathify', function()
344
+ test("minor-pathify", function()
345
+ -- null = true so a JSON null path arrives as NULLMARK. pathify treats
346
+ -- NULLMARK as a scalar (not a key), so null path elements are dropped
347
+ -- via iskey and a top-level null renders as <unknown-path:null>.
266
348
  runsetflags(minorSpec.pathify, {
267
349
  null = true
268
350
  }, function(vin)
269
- local path
270
- if NULLMARK == vin.path then
271
- path = nil
272
- else
273
- path = vin.path
274
- end
275
-
276
- local pathstr = pathify(path, vin.from):gsub('__NULL__%.', '')
277
- pathstr = NULLMARK == vin.path and pathstr:gsub('>', ':null>') or pathstr
278
- return pathstr
351
+ return pathify(vin.path, vin.from)
279
352
  end)
280
353
  end)
281
354
 
@@ -293,7 +366,19 @@ describe("struct", function()
293
366
 
294
367
 
295
368
  test("minor-getprop", function()
296
- runsetflags(minorSpec.getprop, {
369
+ runsetflags(
370
+ dropentries(minorSpec.getprop, {
371
+ -- A null `alt`, which getprop must hand straight back. The port
372
+ -- receives it as nil and returns nil, read as absent. The other
373
+ -- entries - every missing-key case among them - pass.
374
+ { at = 50, why = "getprop with a null alt", is = function(entry)
375
+ return "x" == entryin(entry, "key") and isnull(entryin(entry, "alt"))
376
+ end },
377
+ { at = 51, why = "getprop with a null key and a null alt", is = function(entry)
378
+ return isnull(entryin(entry, "key")) and isnull(entryin(entry, "alt"))
379
+ end },
380
+ }),
381
+ {
297
382
  null = false
298
383
  }, function(vin)
299
384
  if vin.alt == nil then
@@ -371,16 +456,11 @@ describe("struct", function()
371
456
 
372
457
 
373
458
  test("minor-typify", function()
374
- -- Filter out JSON null 'in' entries: Lua typify(nil) returns T_null,
375
- -- but TS typify(null) returns T_scalar|T_null.
376
- local filtered = { set = {} }
377
- setmetatable(filtered.set, { __jsontype = "array" })
378
- for _, entry in ipairs(minorSpec.typify.set) do
379
- if entry["in"] ~= JSON_NULL then
380
- table.insert(filtered.set, entry)
381
- end
382
- end
383
- runsetflags(filtered, {
459
+ -- null = false so a JSON null `in` arrives as nil; typify(nil) is
460
+ -- T_scalar|T_null, matching canonical TS typify(null). The
461
+ -- typify(undefined)==T_noval entry has no `in` and reaches the
462
+ -- subject as NOVAL (resolver decision 4), answering T_noval.
463
+ runsetflags(minorSpec.typify, {
384
464
  null = false
385
465
  }, typify)
386
466
  end)
@@ -467,7 +547,7 @@ describe("struct", function()
467
547
  ----------------------------------------------------------
468
548
 
469
549
  test("walk-log", function()
470
- local walktest = clone(walkSpec.log)
550
+ local walktest = tostructval(walkSpec.log)
471
551
 
472
552
  local function walklog(key, val, parent, path)
473
553
  return "k=" .. stringify(key) .. ", v=" .. stringify(val) .. ", p=" ..
@@ -577,7 +657,7 @@ describe("struct", function()
577
657
  ----------------------------------------------------------
578
658
 
579
659
  test("merge-basic", function()
580
- local mergetest = clone(mergeSpec.basic)
660
+ local mergetest = tostructval(mergeSpec.basic)
581
661
  assert.same(mergetest.out, merge(mergetest['in']))
582
662
  end)
583
663
 
@@ -685,7 +765,7 @@ describe("struct", function()
685
765
  ----------------------------------------------------------
686
766
 
687
767
  test("inject-basic", function()
688
- local injecttest = clone(injectSpec.basic)
768
+ local injecttest = tostructval(injectSpec.basic)
689
769
  assert.same(injecttest.out, inject(injecttest['in'].val, injecttest['in'].store))
690
770
  end)
691
771
 
@@ -710,7 +790,7 @@ describe("struct", function()
710
790
  ----------------------------------------------------------
711
791
 
712
792
  test("transform-basic", function()
713
- local transformtest = clone(transformSpec.basic)
793
+ local transformtest = tostructval(transformSpec.basic)
714
794
  assert.same(transform(transformtest['in'].data, transformtest['in'].spec),
715
795
  transformtest.out)
716
796
  end)
@@ -772,7 +852,6 @@ describe("struct", function()
772
852
  -- Modify string values by adding '@' prefix
773
853
  if key ~= nil and parent ~= nil and type(val) == "string" then
774
854
  parent[key] = "@" .. val
775
- local modified_val = parent[key]
776
855
  end
777
856
  end
778
857
  })
@@ -842,9 +921,21 @@ describe("struct", function()
842
921
  ----------------------------------------------------------
843
922
 
844
923
  test("validate-basic", function()
845
- runsetflags(validateSpec.basic, { null = false }, function(vin)
846
- return validate(vin.data, vin.spec)
847
- end)
924
+ runsetflags(
925
+ dropentries(validateSpec.basic, {
926
+ -- `$NULL` against null data: validate returns the null, the port
927
+ -- returns nil, read as absent. (`$NULL` against non-null data at
928
+ -- a later index still runs - the error path needs no stored
929
+ -- null.)
930
+ { at = 13, why = "$NULL validating null data", is = function(entry)
931
+ return "`$NULL`" == entryin(entry, "spec") and isnull(entryin(entry, "data"))
932
+ end },
933
+ }),
934
+ { null = false },
935
+ function(vin)
936
+ return validate(vin.data, vin.spec)
937
+ end
938
+ )
848
939
  end)
849
940
 
850
941
 
@@ -0,0 +1,268 @@
1
+ -- VENDORED: @voxgig/omni sdk-20260904-1610-0 (lua/src/json.lua)
2
+ -- Source: https://github.com/voxgig/omni @ 8c3e1b573a8d35796f7fc45e3226b977023cabf7 [tag: sdk-20260904-1610-0]
3
+ -- License: MIT (c) voxgig - see repository LICENSE. Do not edit: resync from upstream.
4
+ -- The omni JSON value model and parser.
5
+ --
6
+ -- The omni runner must be able to test *any* library, and must add no
7
+ -- third-party dependencies, so it carries its own JSON support.
8
+ --
9
+ -- Lua tables cannot hold nil, and cannot tell an empty list from an empty
10
+ -- map, so the model is explicit: NULL and ABSENT are sentinel values, and
11
+ -- every container carries a metatable saying which it is.
12
+
13
+ local M = {}
14
+
15
+ local MAPMT = { __omni = 'map' }
16
+ local LISTMT = { __omni = 'list' }
17
+
18
+ -- A JSON null. Lua's own nil cannot be stored in a table.
19
+ M.NULL = setmetatable({}, { __tostring = function() return 'NULL' end })
20
+
21
+ -- No value at all, as distinct from a JSON null.
22
+ M.ABSENT = setmetatable({}, { __tostring = function() return 'ABSENT' end })
23
+
24
+ --- Tag a table as a JSON object.
25
+ function M.map(entries)
26
+ return setmetatable(entries or {}, MAPMT)
27
+ end
28
+
29
+ --- Tag a table as a JSON array.
30
+ function M.list(entries)
31
+ return setmetatable(entries or {}, LISTMT)
32
+ end
33
+
34
+ function M.ismap(val)
35
+ return 'table' == type(val) and MAPMT == getmetatable(val)
36
+ end
37
+
38
+ function M.islist(val)
39
+ return 'table' == type(val) and LISTMT == getmetatable(val)
40
+ end
41
+
42
+ function M.isnode(val)
43
+ return M.ismap(val) or M.islist(val)
44
+ end
45
+
46
+ function M.isabsent(val)
47
+ return nil == val or M.ABSENT == val
48
+ end
49
+
50
+ function M.isnull(val)
51
+ return M.NULL == val
52
+ end
53
+
54
+ function M.isnone(val)
55
+ return M.isabsent(val) or M.isnull(val)
56
+ end
57
+
58
+ --- A JSON number? Booleans are not numbers.
59
+ function M.isnum(val)
60
+ return 'number' == type(val)
61
+ end
62
+
63
+ function M.isstr(val)
64
+ return 'string' == type(val)
65
+ end
66
+
67
+ --- Read a map entry. Returns ABSENT when missing.
68
+ function M.get(val, key)
69
+ if not M.ismap(val) then
70
+ return M.ABSENT
71
+ end
72
+ local entry = rawget(val, key)
73
+ if nil == entry then
74
+ return M.ABSENT
75
+ end
76
+ return entry
77
+ end
78
+
79
+ function M.has(val, key)
80
+ return M.ismap(val) and nil ~= rawget(val, key)
81
+ end
82
+
83
+ -- ---- parser ----------------------------------------------------------
84
+
85
+ local function skipws(text, pos)
86
+ local at = pos
87
+ while at <= #text do
88
+ local ch = text:sub(at, at)
89
+ if ' ' == ch or '\t' == ch or '\n' == ch or '\r' == ch then
90
+ at = at + 1
91
+ else
92
+ break
93
+ end
94
+ end
95
+ return at
96
+ end
97
+
98
+ local parsevalue
99
+
100
+ local function parseword(text, pos, word, value)
101
+ if word == text:sub(pos, pos + #word - 1) then
102
+ return value, pos + #word
103
+ end
104
+ error('omni: bad JSON literal at ' .. pos, 0)
105
+ end
106
+
107
+ local function parsestring(text, pos)
108
+ if '"' ~= text:sub(pos, pos) then
109
+ error('omni: expected string at ' .. pos, 0)
110
+ end
111
+
112
+ local at = pos + 1
113
+ local out = {}
114
+
115
+ while at <= #text do
116
+ local ch = text:sub(at, at)
117
+
118
+ if '"' == ch then
119
+ return table.concat(out), at + 1
120
+ end
121
+
122
+ if '\\' ~= ch then
123
+ out[#out + 1] = ch
124
+ at = at + 1
125
+ else
126
+ local escape = text:sub(at + 1, at + 1)
127
+ at = at + 2
128
+
129
+ if '"' == escape then
130
+ out[#out + 1] = '"'
131
+ elseif '\\' == escape then
132
+ out[#out + 1] = '\\'
133
+ elseif '/' == escape then
134
+ out[#out + 1] = '/'
135
+ elseif 'b' == escape then
136
+ out[#out + 1] = '\b'
137
+ elseif 'f' == escape then
138
+ out[#out + 1] = '\f'
139
+ elseif 'n' == escape then
140
+ out[#out + 1] = '\n'
141
+ elseif 'r' == escape then
142
+ out[#out + 1] = '\r'
143
+ elseif 't' == escape then
144
+ out[#out + 1] = '\t'
145
+ elseif 'u' == escape then
146
+ local code = tonumber(text:sub(at, at + 3), 16)
147
+ at = at + 4
148
+ if nil == code then
149
+ error('omni: bad JSON unicode escape', 0)
150
+ end
151
+ out[#out + 1] = utf8 and utf8.char(code) or string.char(code % 256)
152
+ else
153
+ error('omni: bad JSON escape at ' .. at, 0)
154
+ end
155
+ end
156
+ end
157
+
158
+ error('omni: unterminated JSON string', 0)
159
+ end
160
+
161
+ local function parsemap(text, pos)
162
+ local out = M.map({})
163
+ local at = skipws(text, pos + 1)
164
+
165
+ if '}' == text:sub(at, at) then
166
+ return out, at + 1
167
+ end
168
+
169
+ while true do
170
+ at = skipws(text, at)
171
+ local key
172
+ key, at = parsestring(text, at)
173
+ at = skipws(text, at)
174
+
175
+ if ':' ~= text:sub(at, at) then
176
+ error('omni: expected \':\' at ' .. at, 0)
177
+ end
178
+
179
+ local value
180
+ value, at = parsevalue(text, skipws(text, at + 1))
181
+ rawset(out, key, value)
182
+ at = skipws(text, at)
183
+
184
+ local ch = text:sub(at, at)
185
+ if ',' == ch then
186
+ at = at + 1
187
+ elseif '}' == ch then
188
+ return out, at + 1
189
+ else
190
+ error('omni: expected \',\' or \'}\' at ' .. at, 0)
191
+ end
192
+ end
193
+ end
194
+
195
+ local function parselist(text, pos)
196
+ local out = M.list({})
197
+ local at = skipws(text, pos + 1)
198
+
199
+ if ']' == text:sub(at, at) then
200
+ return out, at + 1
201
+ end
202
+
203
+ while true do
204
+ local value
205
+ value, at = parsevalue(text, skipws(text, at))
206
+ out[#out + 1] = value
207
+ at = skipws(text, at)
208
+
209
+ local ch = text:sub(at, at)
210
+ if ',' == ch then
211
+ at = at + 1
212
+ elseif ']' == ch then
213
+ return out, at + 1
214
+ else
215
+ error('omni: expected \',\' or \']\' at ' .. at, 0)
216
+ end
217
+ end
218
+ end
219
+
220
+ local function parsenumber(text, pos)
221
+ local span = text:match('^[-+]?[0-9]*%.?[0-9]+[eE]?[-+]?[0-9]*', pos)
222
+ if nil == span then
223
+ error('omni: bad JSON number at ' .. pos, 0)
224
+ end
225
+ local value = tonumber(span)
226
+ if nil == value then
227
+ error('omni: bad JSON number [' .. span .. '] at ' .. pos, 0)
228
+ end
229
+ return value, pos + #span
230
+ end
231
+
232
+ parsevalue = function(text, pos)
233
+ if pos > #text then
234
+ error('omni: unexpected end of JSON', 0)
235
+ end
236
+
237
+ local ch = text:sub(pos, pos)
238
+
239
+ if '{' == ch then
240
+ return parsemap(text, pos)
241
+ elseif '[' == ch then
242
+ return parselist(text, pos)
243
+ elseif '"' == ch then
244
+ return parsestring(text, pos)
245
+ elseif 't' == ch then
246
+ return parseword(text, pos, 'true', true)
247
+ elseif 'f' == ch then
248
+ return parseword(text, pos, 'false', false)
249
+ elseif 'n' == ch then
250
+ return parseword(text, pos, 'null', M.NULL)
251
+ end
252
+
253
+ return parsenumber(text, pos)
254
+ end
255
+
256
+ --- Parse JSON text into the omni value model.
257
+ function M.parse(text)
258
+ local value, pos = parsevalue(text, skipws(text, 1))
259
+ pos = skipws(text, pos)
260
+
261
+ if pos <= #text then
262
+ error('omni: trailing JSON content at ' .. pos, 0)
263
+ end
264
+
265
+ return value
266
+ end
267
+
268
+ return M