@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.
- package/bin/voxgig-sdkgen +1 -1
- package/dist/action/doctor.d.ts +1 -0
- package/dist/action/doctor.js +50 -2
- package/dist/action/doctor.js.map +1 -1
- package/dist/helpers/naming.js +4 -2
- package/dist/helpers/naming.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/model/sdkgen.aon +21 -0
- package/package.json +1 -1
- package/project/.sdk/model/feature/secrets.aon +120 -18
- package/project/.sdk/model/target/c.aon +10 -0
- package/project/.sdk/model/target/clojure.aon +13 -0
- package/project/.sdk/model/target/cpp.aon +10 -0
- package/project/.sdk/model/target/csharp.aon +9 -0
- package/project/.sdk/model/target/dart.aon +10 -0
- package/project/.sdk/model/target/elixir.aon +9 -0
- package/project/.sdk/model/target/go.aon +13 -0
- package/project/.sdk/model/target/java.aon +9 -0
- package/project/.sdk/model/target/js.aon +7 -0
- package/project/.sdk/model/target/kotlin.aon +9 -0
- package/project/.sdk/model/target/lean.aon +17 -0
- package/project/.sdk/model/target/lua.aon +8 -0
- package/project/.sdk/model/target/ocaml.aon +9 -0
- package/project/.sdk/model/target/perl.aon +8 -0
- package/project/.sdk/model/target/php.aon +8 -0
- package/project/.sdk/model/target/py.aon +13 -0
- package/project/.sdk/model/target/rb.aon +8 -0
- package/project/.sdk/model/target/rust.aon +10 -0
- package/project/.sdk/model/target/scala.aon +21 -2
- package/project/.sdk/model/target/swift.aon +18 -0
- package/project/.sdk/model/target/ts.aon +13 -0
- package/project/.sdk/model/target/zig.aon +9 -0
- package/project/.sdk/src/cmp/clojure/Package_clojure.ts +9 -2
- package/project/.sdk/src/cmp/cpp/Gitignore_cpp.ts +3 -0
- package/project/.sdk/src/cmp/dart/Test_dart.ts +2 -0
- package/project/.sdk/src/cmp/elixir/Package_elixir.ts +4 -1
- package/project/.sdk/src/cmp/go/Config_go.ts +59 -2
- package/project/.sdk/src/cmp/go/Main_go.ts +8 -2
- package/project/.sdk/src/cmp/java/Test_java.ts +6 -5
- package/project/.sdk/src/cmp/kotlin/Test_kotlin.ts +6 -5
- package/project/.sdk/src/cmp/lean/Package_lean.ts +23 -0
- package/project/.sdk/src/cmp/lean/ReadmeInstall_lean.ts +1 -0
- package/project/.sdk/src/cmp/lean/ReadmeTopTest_lean.ts +1 -0
- package/project/.sdk/src/cmp/ocaml/Gitignore_ocaml.ts +1 -0
- package/project/.sdk/src/cmp/ocaml/Main_ocaml.ts +7 -3
- package/project/.sdk/src/cmp/py/Config_py.ts +82 -1
- package/project/.sdk/src/cmp/py/Main_py.ts +44 -0
- package/project/.sdk/src/cmp/py/fragment/Main.fragment.py +2 -0
- package/project/.sdk/src/cmp/swift/Main_swift.ts +10 -0
- package/project/.sdk/src/cmp/swift/Package_swift.ts +13 -1
- package/project/.sdk/src/cmp/ts/Config_ts.ts +42 -17
- package/project/.sdk/src/cmp/ts/fragment/Config.data.fragment.ts +13 -1
- package/project/.sdk/src/cmp/ts/fragment/Config.fragment.ts +13 -1
- package/project/.sdk/src/cmp/zig/Package_zig.ts +15 -11
- package/project/.sdk/src/cmp/zig/fragment/Entity.fragment.zig +3 -3
- package/project/.sdk/src/cmp/zig/fragment/EntityListOp.fragment.zig +3 -3
- package/project/.sdk/src/cmp/zig/fragment/Main.fragment.zig +3 -3
- package/project/.sdk/src/cmp/zig/utility_zig.ts +50 -1
- package/project/.sdk/tm/c/Makefile +38 -3
- package/project/.sdk/tm/c/tests/omni_resolver.h +361 -0
- package/project/.sdk/tm/c/tests/omni_smoke_test.c +237 -0
- package/project/.sdk/tm/c/tests/primary_corpus_test.c +205 -284
- package/project/.sdk/tm/c/tests/struct_corpus_test.c +292 -212
- package/project/.sdk/tm/c/tests/vendor/omni/json.c +811 -0
- package/project/.sdk/tm/c/tests/vendor/omni/omni.h +240 -0
- package/project/.sdk/tm/c/tests/vendor/omni/runner.c +940 -0
- package/project/.sdk/tm/c/tests/vendor/omni/util.c +351 -0
- package/project/.sdk/tm/c/utility/struct/utility.c +7 -2
- package/project/.sdk/tm/clojure/test/sdk/test/omni.clj +401 -0
- package/project/.sdk/tm/clojure/test/sdk/test/omni_smoke.clj +81 -0
- package/project/.sdk/tm/clojure/test/sdk/test/primary.clj +92 -58
- package/project/.sdk/tm/clojure/test/sdk/test/struct_corpus.clj +122 -149
- package/project/.sdk/tm/clojure/test/sdk/test_runner.clj +8 -3
- package/project/.sdk/tm/clojure/test/vendor/omni/voxgig/omni/json.clj +145 -0
- package/project/.sdk/tm/clojure/test/vendor/omni/voxgig/omni/runner.clj +445 -0
- package/project/.sdk/tm/clojure/test/vendor/omni/voxgig/omni/util.clj +145 -0
- package/project/.sdk/tm/cpp/Makefile +5 -1
- package/project/.sdk/tm/cpp/test/omni_resolver.hpp +473 -0
- package/project/.sdk/tm/cpp/test/omni_smoke_test.cpp +209 -0
- package/project/.sdk/tm/cpp/test/primary_utility_test.cpp +243 -184
- package/project/.sdk/tm/cpp/test/runner_support.hpp +68 -181
- package/project/.sdk/tm/cpp/test/struct_corpus_test.cpp +183 -56
- package/project/.sdk/tm/cpp/test/vendor/omni/json.hpp +406 -0
- package/project/.sdk/tm/cpp/test/vendor/omni/omni.hpp +751 -0
- package/project/.sdk/tm/cpp/test/vendor/omni/util.hpp +256 -0
- package/project/.sdk/tm/cpp/utility/pipeline.hpp +7 -1
- package/project/.sdk/tm/csharp/test/OmniResolver.cs +491 -0
- package/project/.sdk/tm/csharp/test/OmniSmokeTest.cs +106 -0
- package/project/.sdk/tm/csharp/test/PrimaryUtilityTest.cs +299 -316
- package/project/.sdk/tm/csharp/test/Runner.cs +104 -269
- package/project/.sdk/tm/csharp/test/StructUtilityTest.cs +535 -724
- package/project/.sdk/tm/csharp/test/vendor/omni/Runner.cs +864 -0
- package/project/.sdk/tm/csharp/test/vendor/omni/Util.cs +347 -0
- package/project/.sdk/tm/csharp/utility/MakeSpec.cs +3 -1
- package/project/.sdk/tm/csharp/utility/PrepareMethod.cs +6 -1
- package/project/.sdk/tm/csharp/utility/struct/Struct.cs +21 -5
- package/project/.sdk/tm/dart/test/omni.dart +520 -0
- package/project/.sdk/tm/dart/test/omni_smoke_test.dart +143 -0
- package/project/.sdk/tm/dart/test/primary_test.dart +86 -28
- package/project/.sdk/tm/dart/test/struct_test.dart +438 -11
- package/project/.sdk/tm/dart/test/vendor/omni/omni.dart +7 -0
- package/project/.sdk/tm/dart/test/vendor/omni/runner.dart +653 -0
- package/project/.sdk/tm/dart/test/vendor/omni/util.dart +232 -0
- package/project/.sdk/tm/elixir/Makefile +11 -3
- package/project/.sdk/tm/elixir/test/omni_smoke_test.exs +117 -0
- package/project/.sdk/tm/elixir/test/primary_utility_test.exs +341 -16
- package/project/.sdk/tm/elixir/test/struct_corpus_test.exs +554 -9
- package/project/.sdk/tm/elixir/test/support/omni.ex +377 -0
- package/project/.sdk/tm/elixir/test/vendor/omni/json.ex +122 -0
- package/project/.sdk/tm/elixir/test/vendor/omni/runner.ex +623 -0
- package/project/.sdk/tm/elixir/test/vendor/omni/util.ex +187 -0
- package/project/.sdk/tm/go/core/context.go +32 -16
- package/project/.sdk/tm/go/feature/secrets/plugin/capability.go +261 -0
- package/project/.sdk/tm/go/feature/secrets/plugin/catalog.go +78 -0
- package/project/.sdk/tm/go/feature/secrets/plugin/config.go +652 -0
- package/project/.sdk/tm/go/feature/secrets/plugin/depend.go +250 -0
- package/project/.sdk/tm/go/feature/secrets/plugin/env.go +194 -0
- package/project/.sdk/tm/go/feature/secrets/plugin/export.go +80 -0
- package/project/.sdk/tm/go/feature/secrets/plugin/graph.go +238 -0
- package/project/.sdk/tm/go/feature/secrets/plugin/host.go +1575 -0
- package/project/.sdk/tm/go/feature/secrets/plugin/order.go +248 -0
- package/project/.sdk/tm/go/feature/secrets/plugin/point.go +184 -0
- package/project/.sdk/tm/go/feature/secrets/plugin/ref.go +123 -0
- package/project/.sdk/tm/go/feature/secrets/plugin/resolve.go +79 -0
- package/project/.sdk/tm/go/feature/secrets/plugin/types.go +296 -0
- package/project/.sdk/tm/go/feature/secrets/plugin/util.go +87 -0
- package/project/.sdk/tm/go/feature/secrets/plugin/version.go +161 -0
- package/project/.sdk/tm/go/feature/secrets/plugins/aws/aws.go +292 -0
- package/project/.sdk/tm/go/feature/secrets/plugins/aws/sigv4.go +201 -0
- package/project/.sdk/tm/go/feature/secrets/plugins/azuresecrets/azuresecrets.go +187 -0
- package/project/.sdk/tm/go/feature/secrets/plugins/boru/boru.go +184 -0
- package/project/.sdk/tm/go/feature/secrets/plugins/doppler/doppler.go +114 -0
- package/project/.sdk/tm/go/feature/secrets/plugins/gcpsecrets/gcpsecrets.go +156 -0
- package/project/.sdk/tm/go/feature/secrets/plugins/hashicorp/hashicorp.go +208 -0
- package/project/.sdk/tm/go/feature/secrets/plugins/httpjson/httpjson.go +241 -0
- package/project/.sdk/tm/go/feature/secrets/plugins/infisical/infisical.go +150 -0
- package/project/.sdk/tm/go/feature/secrets/plugins/onepassword/onepassword.go +152 -0
- package/project/.sdk/tm/go/feature/secrets/plugins/secretspec/secretspec.go +143 -0
- package/project/.sdk/tm/go/feature/secrets/sekreto/addr.go +120 -0
- package/project/.sdk/tm/go/feature/secrets/sekreto/providers.go +442 -0
- package/project/.sdk/tm/go/feature/secrets/sekreto/sekreto.go +714 -0
- package/project/.sdk/tm/go/feature/secrets_feature.go +675 -0
- package/project/.sdk/tm/go/src/feature/secrets/.gitkeep +0 -0
- package/project/.sdk/tm/go/test/feature/secrets/secrets_feature_test.go +799 -0
- package/project/.sdk/tm/go/test/omni/omni.go +902 -0
- package/project/.sdk/tm/go/test/omni/util.go +381 -0
- package/project/.sdk/tm/go/test/omniresolver_test.go +748 -0
- package/project/.sdk/tm/go/test/omnismoke_test.go +112 -0
- package/project/.sdk/tm/go/test/primary_utility_test.go +123 -191
- package/project/.sdk/tm/go/test/struct_utility_test.go +323 -16
- package/project/.sdk/tm/go/test/testsupport_test.go +294 -0
- package/project/.sdk/tm/go/utility/make_options.go +8 -1
- package/project/.sdk/tm/go/utility/prepare_method.go +5 -1
- package/project/.sdk/tm/go/utility/struct/voxgigstruct.go +2 -2
- package/project/.sdk/tm/java/test/OmniResolver.java +355 -0
- package/project/.sdk/tm/java/test/OmniSmokeTest.java +99 -0
- package/project/.sdk/tm/java/test/PrimaryUtilityTest.java +254 -280
- package/project/.sdk/tm/java/test/RunnerSupport.java +9 -194
- package/project/.sdk/tm/java/test/StructCorpusTest.java +119 -42
- package/project/.sdk/tm/java/test/vendor/omni/Json.java +287 -0
- package/project/.sdk/tm/java/test/vendor/omni/Runner.java +851 -0
- package/project/.sdk/tm/java/test/vendor/omni/Util.java +322 -0
- package/project/.sdk/tm/java/utility/MakeSpec.java +3 -1
- package/project/.sdk/tm/java/utility/PrepareMethod.java +5 -5
- package/project/.sdk/tm/java/utility/struct/Struct.java +17 -4
- package/project/.sdk/tm/js/src/utility/StructUtility.js +3 -3
- package/project/.sdk/tm/js/test/omni.js +251 -0
- package/project/.sdk/tm/js/test/omni.test.js +105 -0
- package/project/.sdk/tm/js/test/utility/PrimaryUtility.test.js +6 -2
- package/project/.sdk/tm/js/test/utility/StructUtility.test.js +27 -2
- package/project/.sdk/tm/js/test/vendor/omni/index.js +77 -0
- package/project/.sdk/tm/js/test/vendor/omni/runner.js +628 -0
- package/project/.sdk/tm/js/test/vendor/omni/util.js +229 -0
- package/project/.sdk/tm/kotlin/core/Utility.kt +1 -1
- package/project/.sdk/tm/kotlin/test/OmniResolver.kt +343 -0
- package/project/.sdk/tm/kotlin/test/OmniSmokeTest.kt +100 -0
- package/project/.sdk/tm/kotlin/test/PrimaryUtilityTest.kt +244 -262
- package/project/.sdk/tm/kotlin/test/RunnerSupport.kt +9 -178
- package/project/.sdk/tm/kotlin/test/StructCorpusTest.kt +121 -32
- package/project/.sdk/tm/kotlin/test/vendor/omni/Json.kt +264 -0
- package/project/.sdk/tm/kotlin/test/vendor/omni/Runner.kt +615 -0
- package/project/.sdk/tm/kotlin/test/vendor/omni/Util.kt +139 -0
- package/project/.sdk/tm/kotlin/utility/MakeSpecUrl.kt +6 -3
- package/project/.sdk/tm/kotlin/utility/Prepare.kt +6 -6
- package/project/.sdk/tm/kotlin/utility/struct/Struct.kt +18 -2
- package/project/.sdk/tm/lean/Makefile +12 -5
- package/project/.sdk/tm/lean/src/SdkUtility.lean +14 -1
- package/project/.sdk/tm/lean/test/OmniResolver.lean +358 -0
- package/project/.sdk/tm/lean/test/OmniSmoke.lean +174 -0
- package/project/.sdk/tm/lean/test/StructCorpus.lean +245 -574
- package/project/.sdk/tm/lean/test/TPrimaryUtility.lean +155 -291
- package/project/.sdk/tm/lean/test/vendor/omni/Omni.lean +997 -0
- package/project/.sdk/tm/lua/test/omni.lua +456 -0
- package/project/.sdk/tm/lua/test/omni_smoke_test.lua +103 -0
- package/project/.sdk/tm/lua/test/primary_utility_test.lua +250 -509
- package/project/.sdk/tm/lua/test/struct_utility_test.lua +161 -70
- package/project/.sdk/tm/lua/test/vendor/omni/json.lua +268 -0
- package/project/.sdk/tm/lua/test/vendor/omni/regex.lua +385 -0
- package/project/.sdk/tm/lua/test/vendor/omni/runner.lua +641 -0
- package/project/.sdk/tm/lua/test/vendor/omni/util.lua +282 -0
- package/project/.sdk/tm/lua/utility/prepare_method.lua +5 -1
- package/project/.sdk/tm/lua/utility/struct/regex.lua +663 -0
- package/project/.sdk/tm/lua/utility/struct/struct.lua +660 -420
- package/project/.sdk/tm/ocaml/Makefile +37 -12
- package/project/.sdk/tm/ocaml/test/omni_resolver.ml +284 -0
- package/project/.sdk/tm/ocaml/test/omni_smoke_test.ml +169 -0
- package/project/.sdk/tm/ocaml/test/primary_utility_test.ml +84 -100
- package/project/.sdk/tm/ocaml/test/struct_corpus.ml +225 -201
- package/project/.sdk/tm/ocaml/test/vendor/omni/omni.ml +1157 -0
- package/project/.sdk/tm/perl/lib/Voxgig/Struct.pm +88 -12
- package/project/.sdk/tm/perl/t/omni.pm +647 -0
- package/project/.sdk/tm/perl/t/omni_smoke.t +87 -0
- package/project/.sdk/tm/perl/t/primary_utility.t +189 -487
- package/project/.sdk/tm/perl/t/struct_utility.t +455 -389
- package/project/.sdk/tm/perl/t/vendor/omni/Voxgig/Omni/Runner.pm +649 -0
- package/project/.sdk/tm/perl/t/vendor/omni/Voxgig/Omni/Util.pm +253 -0
- package/project/.sdk/tm/perl/t/vendor/omni/Voxgig/Omni.pm +24 -0
- package/project/.sdk/tm/perl/utility/prepare_method.pm +7 -2
- package/project/.sdk/tm/php/test/Omni.php +691 -0
- package/project/.sdk/tm/php/test/OmniSmokeTest.php +93 -0
- package/project/.sdk/tm/php/test/PrimaryUtilityTest.php +210 -571
- package/project/.sdk/tm/php/test/StructUtilityTest.php +320 -342
- package/project/.sdk/tm/php/test/vendor/omni/Runner.php +644 -0
- package/project/.sdk/tm/php/test/vendor/omni/Util.php +283 -0
- package/project/.sdk/tm/php/utility/MakeSpec.php +10 -3
- package/project/.sdk/tm/php/utility/PrepareBody.php +7 -1
- package/project/.sdk/tm/php/utility/PrepareMethod.php +6 -2
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/__init__.py +36 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/capability.py +141 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/catalog.py +50 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/config.py +333 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/depend.py +198 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/env.py +147 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/export.py +52 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/graph.py +139 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/host.py +1053 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/order.py +171 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/point.py +95 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/ref.py +116 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/resolve.py +59 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/types.py +87 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/version.py +112 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/__init__.py +76 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/addr.py +116 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/aws.py +192 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/azuresecrets.py +120 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/boru.py +140 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/doppler.py +62 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/gcpsecrets.py +101 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/hashicorp.py +151 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/httpjson.py +115 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/infisical.py +90 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/onepassword.py +101 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/secretspec.py +119 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/sigv4.py +125 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/providers.py +211 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/sekreto.py +475 -0
- package/project/.sdk/tm/py/pkg/feature/secrets_feature.py +467 -0
- package/project/.sdk/tm/py/pkg/utility/prepare_method.py +5 -1
- package/project/.sdk/tm/py/pkg/utility/voxgig_struct/__init__.py +0 -2
- package/project/.sdk/tm/py/pkg/utility/voxgig_struct/voxgig_struct.py +780 -529
- package/project/.sdk/tm/py/src/feature/secrets/.gitkeep +0 -0
- package/project/.sdk/tm/py/test/feature/__init__.py +0 -0
- package/project/.sdk/tm/py/test/feature/secrets/__init__.py +0 -0
- package/project/.sdk/tm/py/test/feature/secrets/test_secrets.py +337 -0
- package/project/.sdk/tm/py/test/omni.py +415 -0
- package/project/.sdk/tm/py/test/test_omni_smoke.py +74 -0
- package/project/.sdk/tm/py/test/test_primary_utility.py +144 -668
- package/project/.sdk/tm/py/test/test_struct_utility.py +74 -27
- package/project/.sdk/tm/py/test/voxgig_omni/__init__.py +62 -0
- package/project/.sdk/tm/py/test/voxgig_omni/runner.py +580 -0
- package/project/.sdk/tm/py/test/voxgig_omni/util.py +252 -0
- package/project/.sdk/tm/rb/test/omni.rb +505 -0
- package/project/.sdk/tm/rb/test/omni_smoke_test.rb +72 -0
- package/project/.sdk/tm/rb/test/primary_utility_test.rb +174 -560
- package/project/.sdk/tm/rb/test/struct_utility_test.rb +13 -7
- package/project/.sdk/tm/rb/test/vendor/omni/runner.rb +493 -0
- package/project/.sdk/tm/rb/test/vendor/omni/util.rb +199 -0
- package/project/.sdk/tm/rb/test/vendor/omni/voxgig_omni.rb +15 -0
- package/project/.sdk/tm/rb/utility/prepare_method.rb +5 -1
- package/project/.sdk/tm/rust/tests/common/mod.rs +19 -242
- package/project/.sdk/tm/rust/tests/omni_resolver/mod.rs +888 -0
- package/project/.sdk/tm/rust/tests/omni_smoke_test.rs +286 -0
- package/project/.sdk/tm/rust/tests/primary_utility_test.rs +318 -312
- package/project/.sdk/tm/rust/tests/struct_utility_test.rs +66 -28
- package/project/.sdk/tm/rust/tests/vendor/omni/json.rs +412 -0
- package/project/.sdk/tm/rust/tests/vendor/omni/mod.rs +38 -0
- package/project/.sdk/tm/rust/tests/vendor/omni/regex.rs +392 -0
- package/project/.sdk/tm/rust/tests/vendor/omni/runner.rs +1001 -0
- package/project/.sdk/tm/rust/tests/vendor/omni/util.rs +161 -0
- package/project/.sdk/tm/rust/utility/prepare_method.rs +5 -1
- package/project/.sdk/tm/scala/Makefile +16 -6
- package/project/.sdk/tm/scala/sdktest/OmniResolver.scala +497 -0
- package/project/.sdk/tm/scala/sdktest/OmniSmoke.scala +192 -0
- package/project/.sdk/tm/scala/sdktest/PrimaryCorpus.scala +47 -19
- package/project/.sdk/tm/scala/sdktest/StructCorpus.scala +0 -0
- package/project/.sdk/tm/scala/sdktest/vendor/omni/Json.scala +229 -0
- package/project/.sdk/tm/scala/sdktest/vendor/omni/Runner.scala +552 -0
- package/project/.sdk/tm/scala/sdktest/vendor/omni/Util.scala +104 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/Constants.swift +10 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/Inject.swift +28 -5
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/Injection.swift +5 -1
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/Minor.swift +4 -1
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/Validate.swift +15 -5
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/utility/Prepare.swift +6 -1
- package/project/.sdk/tm/swift/Tests/ProjectNameSDKTests/OmniResolver.swift +474 -0
- package/project/.sdk/tm/swift/Tests/ProjectNameSDKTests/OmniSmokeTest.swift +107 -0
- package/project/.sdk/tm/swift/Tests/ProjectNameSDKTests/PrimaryUtilityTest.swift +141 -178
- package/project/.sdk/tm/swift/Tests/ProjectNameSDKTests/Runner.swift +17 -113
- package/project/.sdk/tm/swift/Tests/ProjectNameSDKTests/StructUtilityTest.swift +295 -446
- package/project/.sdk/tm/swift/Tests/vendor/omni/Json.swift +364 -0
- package/project/.sdk/tm/swift/Tests/vendor/omni/Runner.swift +730 -0
- package/project/.sdk/tm/swift/Tests/vendor/omni/Util.swift +162 -0
- package/project/.sdk/tm/ts/src/feature/secrets/SecretsFeature.ts +7 -0
- package/project/.sdk/tm/ts/src/feature/secrets/plugin/Capability.ts +148 -0
- package/project/.sdk/tm/ts/src/feature/secrets/plugin/Catalog.ts +55 -0
- package/project/.sdk/tm/ts/src/feature/secrets/plugin/Config.ts +344 -0
- package/project/.sdk/tm/ts/src/feature/secrets/plugin/Depend.ts +205 -0
- package/project/.sdk/tm/ts/src/feature/secrets/plugin/Env.ts +138 -0
- package/project/.sdk/tm/ts/src/feature/secrets/plugin/Export.ts +46 -0
- package/project/.sdk/tm/ts/src/feature/secrets/plugin/FeatureHost.ts +349 -0
- package/project/.sdk/tm/ts/src/feature/secrets/plugin/Graph.ts +181 -0
- package/project/.sdk/tm/ts/src/feature/secrets/plugin/Host.ts +1132 -0
- package/project/.sdk/tm/ts/src/feature/secrets/plugin/Order.ts +177 -0
- package/project/.sdk/tm/ts/src/feature/secrets/plugin/Point.ts +119 -0
- package/project/.sdk/tm/ts/src/feature/secrets/plugin/Ref.ts +102 -0
- package/project/.sdk/tm/ts/src/feature/secrets/plugin/Resolve.ts +61 -0
- package/project/.sdk/tm/ts/src/feature/secrets/plugin/Types.ts +112 -0
- package/project/.sdk/tm/ts/src/feature/secrets/plugin/Version.ts +100 -0
- package/project/.sdk/tm/ts/src/feature/secrets/plugin/index.ts +37 -0
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/Sekreto.ts +163 -30
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/index.ts +27 -22
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/{provider → plugins}/aws.ts +26 -36
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/{provider → plugins}/azuresecrets.ts +19 -21
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/{provider → plugins}/boru.ts +36 -17
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/{provider → plugins}/doppler.ts +14 -21
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/{provider → plugins}/gcpsecrets.ts +27 -27
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/{provider → plugins}/hashicorp.ts +25 -39
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/plugins/httpjson.ts +99 -0
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/{provider → plugins}/infisical.ts +14 -16
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/{provider → plugins}/onepassword.ts +15 -22
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/plugins/secretspec.ts +98 -0
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/{Sigv4.ts → plugins/sigv4.ts} +7 -6
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/addr.ts +97 -23
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/builtin.ts +37 -0
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/dotenv.ts +4 -17
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/env.ts +4 -16
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/file.ts +11 -25
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/memory.ts +6 -23
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/support.ts +106 -39
- package/project/.sdk/tm/ts/src/utility/StructUtility.ts +3 -3
- package/project/.sdk/tm/ts/test/omni.ts +104 -32
- package/project/.sdk/tm/ts/test/utility/StructUtility.test.ts +27 -0
- package/project/.sdk/tm/ts/test/vendor/omni/Runner.ts +32 -5
- package/project/.sdk/tm/ts/test/vendor/omni/Util.ts +2 -2
- package/project/.sdk/tm/ts/test/vendor/omni/index.ts +2 -2
- package/project/.sdk/tm/zig/Makefile +15 -1
- package/project/.sdk/tm/zig/build.zig +23 -5
- package/project/.sdk/tm/zig/core/helpers.zig +52 -11
- package/project/.sdk/tm/zig/core/mem.zig +17 -1
- package/project/.sdk/tm/zig/core/utility.zig +23 -19
- package/project/.sdk/tm/zig/feature/audit.zig +2 -2
- package/project/.sdk/tm/zig/feature/cache.zig +2 -2
- package/project/.sdk/tm/zig/feature/debug.zig +5 -5
- package/project/.sdk/tm/zig/feature/netsim.zig +2 -2
- package/project/.sdk/tm/zig/feature/paging.zig +2 -2
- package/project/.sdk/tm/zig/feature/proxy.zig +15 -8
- package/project/.sdk/tm/zig/feature/streaming.zig +5 -5
- package/project/.sdk/tm/zig/feature/support.zig +3 -3
- package/project/.sdk/tm/zig/feature/telemetry.zig +5 -5
- package/project/.sdk/tm/zig/feature/test.zig +10 -5
- package/project/.sdk/tm/zig/test/fh.zig +10 -10
- package/project/.sdk/tm/zig/test/gotcha_test.zig +5 -5
- package/project/.sdk/tm/zig/test/omniresolver.zig +515 -0
- package/project/.sdk/tm/zig/test/omnismoke_test.zig +284 -0
- package/project/.sdk/tm/zig/test/pipeline_test.zig +8 -8
- package/project/.sdk/tm/zig/test/primary_utility_test.zig +145 -155
- package/project/.sdk/tm/zig/test/struct_corpus.zig +264 -187
- package/project/.sdk/tm/zig/test/vendor/omni/omni.zig +1314 -0
- package/project/.sdk/tm/zig/test/vendor/omni/regex.zig +446 -0
- package/project/.sdk/tm/zig/utility/voxgigstruct/regex.zig +7 -4
- package/project/.sdk/tm/zig/utility/voxgigstruct/struct.zig +356 -157
- package/project/sdkgen-package.json +1 -1
- package/src/action/doctor.ts +66 -2
- package/src/helpers/naming.ts +4 -2
- package/project/.sdk/tm/c/tests/runner.h +0 -274
- package/project/.sdk/tm/cpp/test/struct_runner.hpp +0 -314
- package/project/.sdk/tm/csharp/test/StructRunner.cs +0 -276
- package/project/.sdk/tm/dart/test/runner.dart +0 -406
- package/project/.sdk/tm/dart/test/struct_corpus.dart +0 -531
- package/project/.sdk/tm/elixir/test/support/struct_corpus.ex +0 -1088
- package/project/.sdk/tm/go/test/runner_test.go +0 -629
- package/project/.sdk/tm/go/test/struct_runner_test.go +0 -1094
- package/project/.sdk/tm/java/test/StructRunner.java +0 -281
- package/project/.sdk/tm/js/test/runner.js +0 -387
- package/project/.sdk/tm/kotlin/test/StructRunner.kt +0 -177
- package/project/.sdk/tm/lua/test/struct_runner.lua +0 -602
- package/project/.sdk/tm/ocaml/test/corpus_runner.ml +0 -185
- package/project/.sdk/tm/perl/t/struct_runner.pm +0 -275
- package/project/.sdk/tm/php/test/StructRunner.php +0 -275
- package/project/.sdk/tm/py/test/struct_runner.py +0 -411
- package/project/.sdk/tm/rb/test/struct_runner.rb +0 -309
- package/project/.sdk/tm/rust/tests/struct_runner/mod.rs +0 -424
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/Registry.ts +0 -90
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/http.ts +0 -66
- package/project/.sdk/tm/ts/test/vendor/omni/compat.ts +0 -188
- package/project/.sdk/tm/zig/test/struct_runner.zig +0 -464
|
@@ -12,7 +12,7 @@ import type {
|
|
|
12
12
|
} from '@voxgig/apidef'
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
import { zigModuleName } from './utility_zig'
|
|
15
|
+
import { zigModuleName, zigPackageFingerprint } from './utility_zig'
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
// build.zig.zon — the Zig package manifest. Zig has no central package
|
|
@@ -24,16 +24,19 @@ import { zigModuleName } from './utility_zig'
|
|
|
24
24
|
//
|
|
25
25
|
// The `.paths` allow-list mirrors the (registry-less) template: it only
|
|
26
26
|
// matters when packaging for a registry, which zig does not do, so it is kept
|
|
27
|
-
// stable.
|
|
28
|
-
// fingerprint form.
|
|
27
|
+
// stable.
|
|
29
28
|
//
|
|
30
|
-
// TOOLCHAIN
|
|
31
|
-
//
|
|
32
|
-
//
|
|
33
|
-
//
|
|
34
|
-
//
|
|
35
|
-
//
|
|
36
|
-
//
|
|
29
|
+
// TOOLCHAIN: zig 0.16. `.name` is an ENUM LITERAL (`.solar_sdk`), and a
|
|
30
|
+
// `.fingerprint` is required beside it. That pairing is what a modern zig
|
|
31
|
+
// wants: 0.14 rejects the older plain-string form outright —
|
|
32
|
+
// `build.zig.zon:2:13: error: expected enum literal` — and 0.13 rejects the
|
|
33
|
+
// enum-literal form, so the two cannot both be supported from one generator.
|
|
34
|
+
// A move BACK to 0.13 would mean reverting both fields here and the CI pin in
|
|
35
|
+
// create-sdkgen project/standard/.github/workflows/ci.yml together.
|
|
36
|
+
//
|
|
37
|
+
// The fingerprint is derived from the package name, not random, so
|
|
38
|
+
// regenerating the same model does not rewrite this file — see
|
|
39
|
+
// zigPackageFingerprint for why, and for what zig checks.
|
|
37
40
|
const Package = cmp(async function Package(props: any) {
|
|
38
41
|
const ctx$ = props.ctx$
|
|
39
42
|
const target = props.target
|
|
@@ -43,8 +46,9 @@ const Package = cmp(async function Package(props: any) {
|
|
|
43
46
|
|
|
44
47
|
File({ name: 'build.zig.zon' }, () => {
|
|
45
48
|
Content(`.{
|
|
46
|
-
.name =
|
|
49
|
+
.name = .${name},
|
|
47
50
|
.version = "${packageVersion(model, target.name)}",
|
|
51
|
+
.fingerprint = ${zigPackageFingerprint(name)},
|
|
48
52
|
.dependencies = .{},
|
|
49
53
|
.paths = .{
|
|
50
54
|
"src",
|
|
@@ -231,9 +231,9 @@ pub const EntyClass = struct {
|
|
|
231
231
|
if (data == .array) {
|
|
232
232
|
return data.array.data.items;
|
|
233
233
|
} else if (!h.is_noval(data)) {
|
|
234
|
-
var out
|
|
235
|
-
out.append(data) catch {};
|
|
236
|
-
return out.toOwnedSlice() catch &.{};
|
|
234
|
+
var out: std.ArrayList(Value) = .empty;
|
|
235
|
+
out.append(h.A(), data) catch {};
|
|
236
|
+
return out.toOwnedSlice(h.A()) catch &.{};
|
|
237
237
|
}
|
|
238
238
|
return &.{};
|
|
239
239
|
}
|
|
@@ -16,18 +16,18 @@ pub fn list(self: *EntyClass, reqmatch: Value, ctrl: Value) EntListResult {
|
|
|
16
16
|
// `list` resolves to one ENTITY per record. make_result cannot build them
|
|
17
17
|
// here — it works in Value, which has no slot for an entity — so the op
|
|
18
18
|
// does, mirroring what the dynamic targets get from make_result.
|
|
19
|
-
var items
|
|
19
|
+
var items: std.ArrayList(*EntyClass) = .empty;
|
|
20
20
|
if (out == .array) {
|
|
21
21
|
for (out.array.data.items) |entry| {
|
|
22
22
|
const ent = EntyClass.new(self.client, h.clone(self.entopts));
|
|
23
23
|
if (entry == .object) {
|
|
24
24
|
_ = ent.data_impl(entry);
|
|
25
25
|
}
|
|
26
|
-
items.append(ent) catch {};
|
|
26
|
+
items.append(h.A(), ent) catch {};
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
return EntListResult{ .ok = items.toOwnedSlice() catch &[_]*EntyClass{} };
|
|
30
|
+
return EntListResult{ .ok = items.toOwnedSlice(h.A()) catch &[_]*EntyClass{} };
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
fn list_post_done(self: *EntyClass, ctx: *Context) void {
|
|
@@ -45,7 +45,7 @@ pub const ProjectNameSDK = struct {
|
|
|
45
45
|
.mode = "live",
|
|
46
46
|
.options = h.vnull(),
|
|
47
47
|
.sdkUtility = Utility.new(),
|
|
48
|
-
.features =
|
|
48
|
+
.features = .empty,
|
|
49
49
|
.rootctx = null,
|
|
50
50
|
};
|
|
51
51
|
|
|
@@ -93,8 +93,8 @@ pub const ProjectNameSDK = struct {
|
|
|
93
93
|
}
|
|
94
94
|
|
|
95
95
|
// Initialize features.
|
|
96
|
-
var snap
|
|
97
|
-
for (sdk.features.items) |f| snap.append(f) catch {};
|
|
96
|
+
var snap: std.ArrayList(Feature) = .empty;
|
|
97
|
+
for (sdk.features.items) |f| snap.append(h.A(), f) catch {};
|
|
98
98
|
for (snap.items) |f| sdk.sdkUtility.feature_init(rootctx, f);
|
|
99
99
|
|
|
100
100
|
sdk.sdkUtility.feature_hook(rootctx, "PostConstruct");
|
|
@@ -26,8 +26,56 @@ function zigVarName(name: string): string {
|
|
|
26
26
|
|
|
27
27
|
// The zig module identifier, e.g. solar_sdk (informational; the build module
|
|
28
28
|
// is named "sdk").
|
|
29
|
+
//
|
|
30
|
+
// It is also the `.name` of build.zig.zon, which zig 0.16 reads as an enum
|
|
31
|
+
// literal and requires to be a BARE identifier — `.@"2fa_sdk"` is rejected as
|
|
32
|
+
// firmly as `.2fa_sdk` is — so a model name starting with a digit is given a
|
|
33
|
+
// leading underscore. Nothing else in the target derives an identifier from
|
|
34
|
+
// this, and the alternative for such a model is a package that does not build.
|
|
29
35
|
function zigModuleName(model: any): string {
|
|
30
|
-
|
|
36
|
+
const name = `${model.name}_sdk`.toLowerCase().replace(/[^a-z0-9_]/g, '_')
|
|
37
|
+
return /^[0-9]/.test(name) ? '_' + name : name
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
// The `.fingerprint` zig 0.14+ requires in build.zig.zon, as a 0x-prefixed
|
|
42
|
+
// 16-digit hex literal.
|
|
43
|
+
//
|
|
44
|
+
// Zig reads the field as a packed struct of two u32s: the LOW half is a free
|
|
45
|
+
// `id`, and the HIGH half is a `checksum` that must equal the CRC-32 (IEEE, as
|
|
46
|
+
// zlib computes it) of the package name. Get the checksum wrong and zig
|
|
47
|
+
// refuses to build, printing the value it wanted; get it right and any id in
|
|
48
|
+
// [1, 0xfffffffe] is accepted.
|
|
49
|
+
//
|
|
50
|
+
// The id exists so a fork can be told apart from what it forked. A generated
|
|
51
|
+
// SDK gets a DERIVED one — FNV-1a over the same name — rather than a random
|
|
52
|
+
// one, because this file is regenerated on every run: a random id would
|
|
53
|
+
// rewrite build.zig.zon each time and churn the consumer's diff, and a package
|
|
54
|
+
// that changes identity between two generations of the same model is worse
|
|
55
|
+
// than one that shares an id with a fork of itself. Distinct names still get
|
|
56
|
+
// distinct ids.
|
|
57
|
+
function zigPackageFingerprint(name: string): string {
|
|
58
|
+
// CRC-32 (IEEE 802.3, reflected, poly 0xEDB88320) — the one zig's
|
|
59
|
+
// std.hash.Crc32 and zlib both compute.
|
|
60
|
+
let crc = 0xffffffff
|
|
61
|
+
for (let i = 0; i < name.length; i++) {
|
|
62
|
+
crc ^= name.charCodeAt(i) & 0xff
|
|
63
|
+
for (let b = 0; b < 8; b++) {
|
|
64
|
+
crc = (crc >>> 1) ^ (0xedb88320 & -(crc & 1))
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
const checksum = (crc ^ 0xffffffff) >>> 0
|
|
68
|
+
|
|
69
|
+
// FNV-1a 32-bit, folded into the 1..0xfffffffe zig accepts.
|
|
70
|
+
let fnv = 0x811c9dc5
|
|
71
|
+
for (let i = 0; i < name.length; i++) {
|
|
72
|
+
fnv ^= name.charCodeAt(i) & 0xff
|
|
73
|
+
fnv = Math.imul(fnv, 0x01000193) >>> 0
|
|
74
|
+
}
|
|
75
|
+
const id = (fnv % 0xfffffffd) + 1
|
|
76
|
+
|
|
77
|
+
const hex = (n: number) => n.toString(16).padStart(8, '0')
|
|
78
|
+
return `0x${hex(checksum)}${hex(id)}`
|
|
31
79
|
}
|
|
32
80
|
|
|
33
81
|
|
|
@@ -142,5 +190,6 @@ export {
|
|
|
142
190
|
clean,
|
|
143
191
|
formatZigValue,
|
|
144
192
|
zigModuleName,
|
|
193
|
+
zigPackageFingerprint,
|
|
145
194
|
zigVarName,
|
|
146
195
|
}
|
|
@@ -5,6 +5,10 @@
|
|
|
5
5
|
CC ?= gcc
|
|
6
6
|
CFLAGS ?= -std=c11 -Wall -Wextra -Wno-unused-parameter -D_GNU_SOURCE -O0 -g
|
|
7
7
|
INC := -I core -I utility/struct
|
|
8
|
+
# The vendored omni test runner (tests/vendor/omni) is TEST-ONLY: it is
|
|
9
|
+
# reachable from tests/ alone, never from LIB_SRCS, so it cannot enter the
|
|
10
|
+
# shipped libsdk.a. That is why it lives under tests/ and not utility/.
|
|
11
|
+
OMNI_INC := -I tests -I tests/vendor/omni
|
|
8
12
|
LDLIBS := -lm
|
|
9
13
|
|
|
10
14
|
# feature/*/*.c: a feature may carry a vendored library payload in its own
|
|
@@ -15,9 +19,14 @@ LDLIBS := -lm
|
|
|
15
19
|
LIB_SRCS := $(wildcard core/*.c utility/*.c utility/struct/*.c feature/*.c feature/*/*.c entity/*.c)
|
|
16
20
|
LIB_OBJS := $(LIB_SRCS:.c=.o)
|
|
17
21
|
|
|
22
|
+
# Single-level on purpose: the vendored omni sources under
|
|
23
|
+
# tests/vendor/omni have no main() and must not become test binaries.
|
|
18
24
|
TEST_SRCS := $(wildcard tests/*.c)
|
|
19
25
|
TEST_BINS := $(TEST_SRCS:.c=.out)
|
|
20
26
|
|
|
27
|
+
OMNI_SRCS := $(wildcard tests/vendor/omni/*.c)
|
|
28
|
+
OMNI_OBJS := $(OMNI_SRCS:.c=.o)
|
|
29
|
+
|
|
21
30
|
.PHONY: all build test clean publish
|
|
22
31
|
|
|
23
32
|
all: build
|
|
@@ -30,15 +39,40 @@ build: libsdk.a
|
|
|
30
39
|
libsdk.a: $(LIB_OBJS)
|
|
31
40
|
ar rcs $@ $(LIB_OBJS)
|
|
32
41
|
|
|
42
|
+
# omni's util.c includes <regex.h>. CFLAGS is `?=`, so an operator override
|
|
43
|
+
# can drop the -D_GNU_SOURCE that exposes it; -D_POSIX_C_SOURCE is the
|
|
44
|
+
# minimum omni itself compiles under (its own test/run.c sets exactly this).
|
|
45
|
+
# _DARWIN_C_SOURCE is needed BESIDE it, not instead of it: on Darwin,
|
|
46
|
+
# defining _POSIX_C_SOURCE alone LOWERS __DARWIN_C_LEVEL and hides regex_t,
|
|
47
|
+
# so the same flag that exposes the header on glibc hides it on macOS. Each
|
|
48
|
+
# platform ignores the other's macro.
|
|
49
|
+
tests/vendor/omni/%.o: tests/vendor/omni/%.c
|
|
50
|
+
$(CC) $(CFLAGS) -D_POSIX_C_SOURCE=200809L -D_DARWIN_C_SOURCE -c $< -o $@
|
|
51
|
+
|
|
52
|
+
libomni.a: $(OMNI_OBJS)
|
|
53
|
+
ar rcs $@ $(OMNI_OBJS)
|
|
54
|
+
|
|
55
|
+
# Only the corpus drivers and the smoke test reach for omni, and the generic
|
|
56
|
+
# rule must stay free of it: omni's util.c needs POSIX <regex.h>, which
|
|
57
|
+
# Windows does not have at all. Linking it into EVERY test binary broke the
|
|
58
|
+
# auth-null probe the generator's own suite builds on windows and macos,
|
|
59
|
+
# neither of which runs a corpus.
|
|
60
|
+
OMNI_TESTS := tests/struct_corpus_test.out tests/primary_corpus_test.out \
|
|
61
|
+
tests/omni_smoke_test.out
|
|
62
|
+
|
|
63
|
+
$(OMNI_TESTS): tests/%.out: tests/%.c libsdk.a libomni.a
|
|
64
|
+
$(CC) $(CFLAGS) $(INC) $(OMNI_INC) $< libsdk.a libomni.a -o $@ $(LDLIBS)
|
|
65
|
+
|
|
33
66
|
tests/%.out: tests/%.c libsdk.a
|
|
34
67
|
$(CC) $(CFLAGS) $(INC) $< libsdk.a -o $@ $(LDLIBS)
|
|
35
68
|
|
|
36
69
|
# Build and run every test; aggregate pass/fail.
|
|
37
|
-
test: libsdk.a
|
|
70
|
+
test: libsdk.a libomni.a
|
|
38
71
|
@fail=0; total=0; \
|
|
39
72
|
for src in $(TEST_SRCS); do \
|
|
40
73
|
bin=$${src%.c}.out; \
|
|
41
|
-
|
|
74
|
+
case " $(OMNI_TESTS) " in *" $$bin "*) omni="libomni.a"; oinc="$(OMNI_INC)";; *) omni=""; oinc="";; esac; \
|
|
75
|
+
$(CC) $(CFLAGS) $(INC) $$oinc $$src libsdk.a $$omni -o $$bin $(LDLIBS) || { echo "BUILD FAIL: $$src"; fail=1; continue; }; \
|
|
42
76
|
total=$$((total+1)); \
|
|
43
77
|
if ./$$bin; then :; else echo "TEST FAIL: $$bin"; fail=1; fi; \
|
|
44
78
|
done; \
|
|
@@ -47,7 +81,8 @@ test: libsdk.a
|
|
|
47
81
|
exit $$fail
|
|
48
82
|
|
|
49
83
|
clean:
|
|
50
|
-
rm -f $(LIB_OBJS) libsdk.a $(TEST_BINS) tests/*.out
|
|
84
|
+
rm -f $(LIB_OBJS) libsdk.a $(OMNI_OBJS) libomni.a $(TEST_BINS) tests/*.out \
|
|
85
|
+
corpus-scoreboard.json
|
|
51
86
|
|
|
52
87
|
# C has no central registry — publishing IS the git tag.
|
|
53
88
|
VERSION := $(shell cat VERSION 2>/dev/null || echo 0.0.1)
|
|
@@ -0,0 +1,361 @@
|
|
|
1
|
+
/* The corpus test runner: vendored @voxgig/omni driven through its NATIVE
|
|
2
|
+
* API (omni_make_runner / omni_runner_run / omni_runsetflags, see
|
|
3
|
+
* tests/vendor/omni/omni.h), adapted to the subject shapes the corpus
|
|
4
|
+
* drivers already use. No compat shim is vendored: the adapter below IS
|
|
5
|
+
* the whole bridge, per language, per the vendor-tag rollout
|
|
6
|
+
* (docs/design/vendor-tag-rollout.md, Decision 4). It supersedes the whole
|
|
7
|
+
* of the retired tests/runner.h - both its engine half (run_subject) and
|
|
8
|
+
* its support half (normalize / deep_equal / brief / null_substitute,
|
|
9
|
+
* subsumed by omni_deepequal / omni_matchval / omni_stringify).
|
|
10
|
+
*
|
|
11
|
+
* C-specific decisions, each load-bearing:
|
|
12
|
+
*
|
|
13
|
+
* 1. TWO VALUE MODELS, ONE BIDIRECTIONAL BRIDGE. Every other migrated
|
|
14
|
+
* target shares one value model with its omni port and needs only a
|
|
15
|
+
* sentinel swap. C does not: omni carries its OWN arena-allocated model
|
|
16
|
+
* (omni_json + omni_pool, tests/vendor/omni/json.c) while the SDK uses
|
|
17
|
+
* the refcounted voxgig_value of utility/struct. So omnivx_tovx and
|
|
18
|
+
* omnivx_tomni below convert whole values in both directions, and the
|
|
19
|
+
* ownership rule is the SDK's own (core/sdk.h): omni values are
|
|
20
|
+
* pool-owned and freed in one go by omni_pool_free; voxgig values the
|
|
21
|
+
* bridge creates for a subject are released after the call, and values
|
|
22
|
+
* the SDK pipeline builds are never released at all.
|
|
23
|
+
*
|
|
24
|
+
* 2. "NO ARGUMENT" AND "NULL" ARE NATIVELY DISTINCT. The corpus carries
|
|
25
|
+
* entries with no `in`, `args` or `ctx`, meaning "call the subject with
|
|
26
|
+
* NO argument". The vendored C port already distinguishes that case:
|
|
27
|
+
* omni_map_get on a missing key answers a value of type OMNI_ABSENT,
|
|
28
|
+
* omni_clone preserves it, and such an entry arrives as one OMNI_ABSENT
|
|
29
|
+
* argument. So C needs neither go's novalargs spec rewrite nor a compat
|
|
30
|
+
* shim - the ONE conversion is the sentinel swap at the call boundary:
|
|
31
|
+
* OMNI_ABSENT -> voxgig_new_undef() inbound, VOXGIG_VAL_UNDEF ->
|
|
32
|
+
* omni_absent() outbound, walked, because getpath can leave an undef
|
|
33
|
+
* inside a partially-resolved node.
|
|
34
|
+
*
|
|
35
|
+
* 3. THE ARGUMENT IS WRITTEN BACK. `struct.minor.setpath` asserts
|
|
36
|
+
* `match: {args: {0: {store: ...}}}` - that the subject mutated the
|
|
37
|
+
* container it was handed - and `struct.merge.integrity` asserts the
|
|
38
|
+
* opposite for merge. The bridge hands the subject a fresh voxgig copy,
|
|
39
|
+
* so after the call omnivx_writeback rewrites the CONTENTS of the omni
|
|
40
|
+
* argument node in place (its identity is preserved, because the runner
|
|
41
|
+
* also stores it as `entry.ctx`). The retired runner.h could not check
|
|
42
|
+
* either assertion: it ignored `match` entirely.
|
|
43
|
+
*
|
|
44
|
+
* 4. NUMBERS ARE RE-TYPED ON THE WAY IN. voxgig distinguishes integer from
|
|
45
|
+
* decimal (minor.typify / minor.typename assert on it) while omni_json
|
|
46
|
+
* holds one double. The bridge classifies an integral finite double as
|
|
47
|
+
* VOXGIG_VAL_INT, which is exactly what voxgig_parse_json_file did for
|
|
48
|
+
* a literal with no '.' and no exponent - and the shared corpus holds
|
|
49
|
+
* no integral-valued decimal literal, so the two readings agree case
|
|
50
|
+
* for case.
|
|
51
|
+
*
|
|
52
|
+
* 5. VALUES OMNI CANNOT EXPRESS ARE RENDERED AS voxgig's OWN JSON FORM.
|
|
53
|
+
* VAL_FUNC (injector/modify) and the SKIP/DELETE sentinels have no omni
|
|
54
|
+
* type. Rather than let them read as "absent", the bridge renders them
|
|
55
|
+
* the way voxgig_jsonify does - a function as null, a sentinel as
|
|
56
|
+
* {"`$NAME`": true} - so an assertion that meets one sees the same text
|
|
57
|
+
* it would have seen through stringify.
|
|
58
|
+
*
|
|
59
|
+
* 6. NO EXCEPTIONS, SO NO OmniError. omni_runset returns non-zero and sets
|
|
60
|
+
* *errout to a pool-owned message; a subject reports failure by setting
|
|
61
|
+
* its `char **err` out-param, which the bridge copies into
|
|
62
|
+
* omni_result.err. This is the one documented parity exemption for the
|
|
63
|
+
* C port (tests/vendor/omni README, c:55-56).
|
|
64
|
+
*
|
|
65
|
+
* 7. omni#54 GAP 1 IS PRESENT in the vendored C port: omni_jsonstr has no
|
|
66
|
+
* cycle guard. Mitigation is java's: typed SDK state is kept OUT of the
|
|
67
|
+
* entries (a corpus subject builds its typed Context at the call site
|
|
68
|
+
* and publishes only plain data back), and the bridge carries its own
|
|
69
|
+
* depth bound, OMNIVX_MAXDEPTH, so a cyclic value becomes a marker
|
|
70
|
+
* string instead of a hang.
|
|
71
|
+
*
|
|
72
|
+
* Header-only; every helper is `static` + unused-safe, so a test binary
|
|
73
|
+
* may include it and use only part of it.
|
|
74
|
+
*/
|
|
75
|
+
|
|
76
|
+
#ifndef PROJECTNAME_OMNI_RESOLVER_H
|
|
77
|
+
#define PROJECTNAME_OMNI_RESOLVER_H
|
|
78
|
+
|
|
79
|
+
#include "vendor/omni/omni.h"
|
|
80
|
+
#include "voxgig_struct.h"
|
|
81
|
+
|
|
82
|
+
#include <math.h>
|
|
83
|
+
#include <stdio.h>
|
|
84
|
+
#include <stdlib.h>
|
|
85
|
+
#include <string.h>
|
|
86
|
+
|
|
87
|
+
#define OMNIVX __attribute__((unused)) static
|
|
88
|
+
|
|
89
|
+
/* Deeper than any corpus value; a cyclic one is cut here rather than
|
|
90
|
+
* followed (decision 7). */
|
|
91
|
+
#define OMNIVX_MAXDEPTH 64
|
|
92
|
+
#define OMNIVX_DEPTHMARK "__DEPTH__"
|
|
93
|
+
|
|
94
|
+
/* ---- value bridge: omni -> voxgig ---------------------------------- */
|
|
95
|
+
|
|
96
|
+
OMNIVX int omnivx_isintegral(double num) {
|
|
97
|
+
/* The range test keeps the (int64_t) cast defined; outside it the value
|
|
98
|
+
* can only have come from a decimal literal anyway. */
|
|
99
|
+
return isfinite(num) && floor(num) == num && -9.0e18 <= num && num <= 9.0e18;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
OMNIVX voxgig_value* omnivx_tovx_at(const omni_json* val, int depth);
|
|
103
|
+
|
|
104
|
+
OMNIVX voxgig_value* omnivx_tovx(const omni_json* val) { return omnivx_tovx_at(val, 0); }
|
|
105
|
+
|
|
106
|
+
OMNIVX voxgig_value* omnivx_tovx_at(const omni_json* val, int depth) {
|
|
107
|
+
size_t at;
|
|
108
|
+
|
|
109
|
+
if (NULL == val) {
|
|
110
|
+
return voxgig_new_undef();
|
|
111
|
+
}
|
|
112
|
+
if (OMNIVX_MAXDEPTH < depth) {
|
|
113
|
+
return voxgig_new_string(OMNIVX_DEPTHMARK);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
switch (val->type) {
|
|
117
|
+
case OMNI_ABSENT:
|
|
118
|
+
return voxgig_new_undef();
|
|
119
|
+
case OMNI_NULL:
|
|
120
|
+
return voxgig_new_null();
|
|
121
|
+
case OMNI_BOOL:
|
|
122
|
+
return voxgig_new_bool(0 != val->boolval);
|
|
123
|
+
case OMNI_NUM:
|
|
124
|
+
return omnivx_isintegral(val->numval) ? voxgig_new_int((int64_t)val->numval)
|
|
125
|
+
: voxgig_new_double(val->numval);
|
|
126
|
+
case OMNI_STR:
|
|
127
|
+
return voxgig_new_string(NULL == val->strval ? "" : val->strval);
|
|
128
|
+
case OMNI_LIST: {
|
|
129
|
+
voxgig_value* out = voxgig_new_list();
|
|
130
|
+
for (at = 0; at < val->listlen; at++) {
|
|
131
|
+
voxgig_list_push(voxgig_as_list(out), omnivx_tovx_at(val->list[at], depth + 1));
|
|
132
|
+
}
|
|
133
|
+
return out;
|
|
134
|
+
}
|
|
135
|
+
case OMNI_MAP: {
|
|
136
|
+
voxgig_value* out = voxgig_new_map();
|
|
137
|
+
for (at = 0; at < val->maplen; at++) {
|
|
138
|
+
voxgig_map_set(voxgig_as_map(out), val->keys[at], omnivx_tovx_at(val->vals[at], depth + 1));
|
|
139
|
+
}
|
|
140
|
+
return out;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
return voxgig_new_undef();
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
/* ---- value bridge: voxgig -> omni ---------------------------------- */
|
|
148
|
+
|
|
149
|
+
OMNIVX omni_json* omnivx_tomni_at(omni_pool* pool, voxgig_value* val, int depth);
|
|
150
|
+
|
|
151
|
+
OMNIVX omni_json* omnivx_tomni(omni_pool* pool, voxgig_value* val) {
|
|
152
|
+
return omnivx_tomni_at(pool, val, 0);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
OMNIVX omni_json* omnivx_tomni_at(omni_pool* pool, voxgig_value* val, int depth) {
|
|
156
|
+
size_t at;
|
|
157
|
+
|
|
158
|
+
if (NULL == val) {
|
|
159
|
+
return omni_absent(pool);
|
|
160
|
+
}
|
|
161
|
+
if (OMNIVX_MAXDEPTH < depth) {
|
|
162
|
+
return omni_str(pool, OMNIVX_DEPTHMARK);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
switch (val->kind) {
|
|
166
|
+
case VOXGIG_VAL_UNDEF:
|
|
167
|
+
return omni_absent(pool);
|
|
168
|
+
case VOXGIG_VAL_NULL:
|
|
169
|
+
return omni_null(pool);
|
|
170
|
+
case VOXGIG_VAL_BOOL:
|
|
171
|
+
return omni_bool(pool, voxgig_as_bool(val) ? 1 : 0);
|
|
172
|
+
case VOXGIG_VAL_INT:
|
|
173
|
+
return omni_num(pool, (double)voxgig_as_int(val));
|
|
174
|
+
case VOXGIG_VAL_DOUBLE:
|
|
175
|
+
return omni_num(pool, voxgig_as_double(val));
|
|
176
|
+
case VOXGIG_VAL_STRING: {
|
|
177
|
+
const char* str = voxgig_as_string(val);
|
|
178
|
+
return omni_str(pool, NULL == str ? "" : str);
|
|
179
|
+
}
|
|
180
|
+
case VOXGIG_VAL_LIST: {
|
|
181
|
+
voxgig_list* list = voxgig_as_list(val);
|
|
182
|
+
omni_json* out = omni_list(pool);
|
|
183
|
+
for (at = 0; at < list->len; at++) {
|
|
184
|
+
omni_list_push(out, omnivx_tomni_at(pool, list->items[at], depth + 1));
|
|
185
|
+
}
|
|
186
|
+
return out;
|
|
187
|
+
}
|
|
188
|
+
case VOXGIG_VAL_MAP: {
|
|
189
|
+
voxgig_map* map = voxgig_as_map(val);
|
|
190
|
+
omni_json* out = omni_map(pool);
|
|
191
|
+
for (at = 0; at < map->len; at++) {
|
|
192
|
+
omni_map_set(out, map->entries[at].key,
|
|
193
|
+
omnivx_tomni_at(pool, map->entries[at].value, depth + 1));
|
|
194
|
+
}
|
|
195
|
+
return out;
|
|
196
|
+
}
|
|
197
|
+
case VOXGIG_VAL_FUNC:
|
|
198
|
+
/* voxgig_jsonify renders a callable as null; so does the bridge. */
|
|
199
|
+
return omni_null(pool);
|
|
200
|
+
case VOXGIG_VAL_SENTINEL: {
|
|
201
|
+
/* voxgig_jsonify renders a sentinel as {"`$NAME`": true}. */
|
|
202
|
+
const voxgig_sentinel* sent = voxgig_as_sentinel(val);
|
|
203
|
+
omni_json* out = omni_map(pool);
|
|
204
|
+
char key[64];
|
|
205
|
+
snprintf(key, sizeof(key), "`$%s`", (NULL != sent && NULL != sent->name) ? sent->name : "?");
|
|
206
|
+
omni_map_set(out, key, omni_bool(pool, 1));
|
|
207
|
+
return out;
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
return omni_absent(pool);
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
/* ---- argument write-back (decision 3) ------------------------------ */
|
|
215
|
+
|
|
216
|
+
/* Rewrite the CONTENTS of `dst` from `src`, keeping dst's identity: the
|
|
217
|
+
* runner stored that very node as the entry's `args[0]` and `ctx`, and a
|
|
218
|
+
* `match` assertion reads through it. Containers only - a scalar argument
|
|
219
|
+
* cannot be mutated by the subject in a way the corpus can observe. */
|
|
220
|
+
OMNIVX void omnivx_writeback(omni_pool* pool, omni_json* dst, voxgig_value* src) {
|
|
221
|
+
size_t at;
|
|
222
|
+
|
|
223
|
+
if (NULL == dst || NULL == src) {
|
|
224
|
+
return;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
if (OMNI_MAP == dst->type && voxgig_is_map(src)) {
|
|
228
|
+
voxgig_map* map = voxgig_as_map(src);
|
|
229
|
+
dst->maplen = 0;
|
|
230
|
+
for (at = 0; at < map->len; at++) {
|
|
231
|
+
omni_map_set(dst, map->entries[at].key, omnivx_tomni_at(pool, map->entries[at].value, 1));
|
|
232
|
+
}
|
|
233
|
+
return;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
if (OMNI_LIST == dst->type && voxgig_is_list(src)) {
|
|
237
|
+
voxgig_list* list = voxgig_as_list(src);
|
|
238
|
+
dst->listlen = 0;
|
|
239
|
+
for (at = 0; at < list->len; at++) {
|
|
240
|
+
omni_list_push(dst, omnivx_tomni_at(pool, list->items[at], 1));
|
|
241
|
+
}
|
|
242
|
+
return;
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
/* ---- subjects ------------------------------------------------------ */
|
|
247
|
+
|
|
248
|
+
/* The struct-corpus subject shape: one value in, one value out, with an
|
|
249
|
+
* optional error message. Unchanged from the retired runner.h, so every
|
|
250
|
+
* corpus subject in tests/struct_corpus_test.c crossed over verbatim. */
|
|
251
|
+
typedef voxgig_value* (*omnivx_subject_fn)(voxgig_value* in, char** err, void* ud);
|
|
252
|
+
|
|
253
|
+
typedef struct omnivx_holder {
|
|
254
|
+
omni_subject sub; /* FIRST: `sub.data` points back at the holder */
|
|
255
|
+
omni_pool* pool;
|
|
256
|
+
omnivx_subject_fn fn;
|
|
257
|
+
void* ud;
|
|
258
|
+
} omnivx_holder;
|
|
259
|
+
|
|
260
|
+
OMNIVX omni_result omnivx_call(omni_subject* self, omni_json** args, size_t nargs) {
|
|
261
|
+
omnivx_holder* holder = (omnivx_holder*)self->data;
|
|
262
|
+
omni_result out;
|
|
263
|
+
voxgig_value* in;
|
|
264
|
+
voxgig_value* got;
|
|
265
|
+
char* err = NULL;
|
|
266
|
+
|
|
267
|
+
out.val = NULL;
|
|
268
|
+
out.err = NULL;
|
|
269
|
+
|
|
270
|
+
/* nargs is 1 with an OMNI_ABSENT argument for a no-argument entry
|
|
271
|
+
* (decision 2); nargs is 0 only for an explicit `args: []`. */
|
|
272
|
+
in = 0 < nargs ? omnivx_tovx(args[0]) : voxgig_new_undef();
|
|
273
|
+
|
|
274
|
+
got = holder->fn(in, &err, holder->ud);
|
|
275
|
+
|
|
276
|
+
if (0 < nargs) {
|
|
277
|
+
omnivx_writeback(holder->pool, args[0], in);
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
if (NULL != err) {
|
|
281
|
+
out.err = omni_pool_strdup(holder->pool, err);
|
|
282
|
+
free(err);
|
|
283
|
+
} else {
|
|
284
|
+
out.val = omnivx_tomni(holder->pool, got);
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
voxgig_release(got);
|
|
288
|
+
voxgig_release(in);
|
|
289
|
+
|
|
290
|
+
return out;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
OMNIVX omni_subject* omnivx_subject(omni_pool* pool, omnivx_subject_fn fn, void* ud) {
|
|
294
|
+
omnivx_holder* holder = (omnivx_holder*)omni_pool_alloc(pool, sizeof(omnivx_holder));
|
|
295
|
+
holder->sub.call = omnivx_call;
|
|
296
|
+
holder->sub.data = holder;
|
|
297
|
+
holder->pool = pool;
|
|
298
|
+
holder->fn = fn;
|
|
299
|
+
holder->ud = ud;
|
|
300
|
+
return &holder->sub;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
/* The raw subject shape: omni values straight through. The primary corpus
|
|
304
|
+
* uses it because its entries assert on `ctx`, which the subject must
|
|
305
|
+
* publish back into the very omni map the runner handed it (java's
|
|
306
|
+
* decision 1: contexts stay MAPS across the runner, and the typed Context
|
|
307
|
+
* is built and synced at the call site). */
|
|
308
|
+
typedef omni_result (*omnivx_raw_fn)(omni_pool* pool, omni_json** args, size_t nargs, void* ud);
|
|
309
|
+
|
|
310
|
+
typedef struct omnivx_rawholder {
|
|
311
|
+
omni_subject sub; /* FIRST */
|
|
312
|
+
omni_pool* pool;
|
|
313
|
+
omnivx_raw_fn fn;
|
|
314
|
+
void* ud;
|
|
315
|
+
} omnivx_rawholder;
|
|
316
|
+
|
|
317
|
+
OMNIVX omni_result omnivx_rawcall(omni_subject* self, omni_json** args, size_t nargs) {
|
|
318
|
+
omnivx_rawholder* holder = (omnivx_rawholder*)self->data;
|
|
319
|
+
return holder->fn(holder->pool, args, nargs, holder->ud);
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
OMNIVX omni_subject* omnivx_rawsubject(omni_pool* pool, omnivx_raw_fn fn, void* ud) {
|
|
323
|
+
omnivx_rawholder* holder = (omnivx_rawholder*)omni_pool_alloc(pool, sizeof(omnivx_rawholder));
|
|
324
|
+
holder->sub.call = omnivx_rawcall;
|
|
325
|
+
holder->sub.data = holder;
|
|
326
|
+
holder->pool = pool;
|
|
327
|
+
holder->fn = fn;
|
|
328
|
+
holder->ud = ud;
|
|
329
|
+
return &holder->sub;
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
/* ---- spec helpers -------------------------------------------------- */
|
|
333
|
+
|
|
334
|
+
/* How many entries a resolved test spec holds. Zero for a spec that is
|
|
335
|
+
* absent, or that carries no `set` list - which the corpus drivers report
|
|
336
|
+
* as a FAILURE, because a section that runs no case proves nothing. */
|
|
337
|
+
OMNIVX size_t omnivx_setsize(const omni_json* testspec) {
|
|
338
|
+
const omni_json* set = omni_map_get(testspec, "set");
|
|
339
|
+
return omni_islist(set) ? set->listlen : 0;
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
/* Wrap a bare {in, out} node - `struct.merge.basic` and
|
|
343
|
+
* `struct.inject.basic` are authored that way, with no `set` - as a
|
|
344
|
+
* one-entry set the runner can drive. Without this they scored 0/0 and
|
|
345
|
+
* asserted nothing. */
|
|
346
|
+
OMNIVX omni_json* omnivx_oneset(omni_pool* pool, omni_json* entry) {
|
|
347
|
+
omni_json* spec = omni_map(pool);
|
|
348
|
+
omni_json* set = omni_list(pool);
|
|
349
|
+
omni_list_push(set, entry);
|
|
350
|
+
omni_map_set(spec, "set", set);
|
|
351
|
+
return spec;
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
/* omni's flags, with the failure-message label filled in. */
|
|
355
|
+
OMNIVX omni_flags omnivx_flags(int donull, const char* name) {
|
|
356
|
+
omni_flags flags = donull ? omni_flags_default() : omni_flags_nonull();
|
|
357
|
+
flags.name = name;
|
|
358
|
+
return flags;
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
#endif /* PROJECTNAME_OMNI_RESOLVER_H */
|