@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
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
(:require [sdk.core :as core]
|
|
5
5
|
[sdk.client :as client]
|
|
6
6
|
[sdk.testutil :as t]
|
|
7
|
-
[sdk.test.
|
|
7
|
+
[sdk.test.omni :as omni]
|
|
8
8
|
[voxgig.struct :as vs]
|
|
9
9
|
[clojure.string :as str])
|
|
10
10
|
(:import [java.util Map]))
|
|
@@ -19,9 +19,6 @@
|
|
|
19
19
|
|
|
20
20
|
(def ^:private CORPUS "../.sdk/test/test.json")
|
|
21
21
|
|
|
22
|
-
(defn- getspec [root & path]
|
|
23
|
-
(reduce (fn [acc k] (when acc (.get ^Map acc k))) root path))
|
|
24
|
-
|
|
25
22
|
(defn- lower-headers [m]
|
|
26
23
|
;; Header names arrive in any case and the contract is lowercase; the SDK
|
|
27
24
|
;; copies them verbatim, so the driver normalises, as the lua reference does.
|
|
@@ -143,16 +140,24 @@
|
|
|
143
140
|
(t/is-true (str/includes? (str (vs/getprop fetchdef "url")) "/api/items/item01") "url includes")))))
|
|
144
141
|
nil))
|
|
145
142
|
|
|
146
|
-
|
|
147
143
|
(defn run-corpus
|
|
148
|
-
"Drive every primary section of the shared corpus through this SDK.
|
|
144
|
+
"Drive every primary section of the shared corpus through this SDK.
|
|
145
|
+
|
|
146
|
+
The engine is the VENDORED omni runner (sdk.test.omni), not a hand-written
|
|
147
|
+
entry loop: each section names its corpus node and the subject that drives
|
|
148
|
+
it, and omni decides whether the result, the match and the error
|
|
149
|
+
expectations hold. omni raises on the first failing entry of a set, so a
|
|
150
|
+
green section counts its whole set - counted at the SUBJECT, from
|
|
151
|
+
sdk.test.omni's execution counter, and failed when it disagrees with the
|
|
152
|
+
set handed over, so the number cannot survive a stopped engine."
|
|
149
153
|
[rec]
|
|
150
|
-
(let [
|
|
154
|
+
(let [alltests (omni/load-spec CORPUS)
|
|
155
|
+
primary (get alltests "primary")
|
|
156
|
+
sdk (client/test-sdk nil nil)
|
|
157
|
+
mkrunner (omni/make-runner alltests sdk)
|
|
151
158
|
utility (core/get-utility sdk)
|
|
152
159
|
u (fn [k] (get (deref utility) k))
|
|
153
|
-
|
|
154
|
-
primary (.get ^Map alltests "primary")
|
|
155
|
-
setup-of (fn [nm] (getspec primary nm "DEF" "setup" "a"))
|
|
160
|
+
setup-of (fn [nm] (omni/->struct (get-in primary [nm "DEF" "setup" "a"])))
|
|
156
161
|
client-for (fn [nm] (let [su (setup-of nm)]
|
|
157
162
|
(if (vs/ismap su) (client/test-sdk nil su) sdk)))
|
|
158
163
|
;; make-spec and prepare-auth read defaults off the CLIENT, as the ts
|
|
@@ -161,62 +166,91 @@
|
|
|
161
166
|
spec-sdk (client-for "makeSpec")
|
|
162
167
|
auth-sdk (client-for "prepareAuth")
|
|
163
168
|
ran (atom 0)
|
|
169
|
+
npass (atom 0)
|
|
170
|
+
fails (atom [])
|
|
164
171
|
;; One section, driven with a ctx built from the corpus entry.
|
|
165
172
|
runset (fn [nm cl f]
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
173
|
+
(let [node (get-in primary [nm "basic"])]
|
|
174
|
+
(when (nil? node)
|
|
175
|
+
(throw (ex-info (str "corpus section missing: " nm) {})))
|
|
176
|
+
(swap! ran inc)
|
|
177
|
+
(let [rp (mkrunner nm)
|
|
178
|
+
testset (get node "set")
|
|
179
|
+
n (count testset)]
|
|
180
|
+
;; A section whose `set` is present but empty runs nothing
|
|
181
|
+
;; and raises nothing - no passes, and green. omni refuses
|
|
182
|
+
;; that under a versioned spec (`checkset`, with an
|
|
183
|
+
;; `empty: true` opt-out); the shared corpus is lenient v0,
|
|
184
|
+
;; so it is refused here. A section with no `set` at all is
|
|
185
|
+
;; left to omni, whose message for it is the better one.
|
|
186
|
+
(if (and (sequential? testset) (zero? n)
|
|
187
|
+
(not (true? (get node "empty"))))
|
|
188
|
+
(swap! fails conj [nm "corpus section has an empty set"])
|
|
189
|
+
(try
|
|
190
|
+
;; omni APPLIES the resolved args, so an args-style entry
|
|
191
|
+
;; calls the subject with more than one - variadic, and the
|
|
192
|
+
;; extra arg reaches the section through `more`.
|
|
193
|
+
;;
|
|
194
|
+
;; `executed` is the engine's own count for this set
|
|
195
|
+
;; (sdk.test.omni counts inside the subject wrapper),
|
|
196
|
+
;; NOT the section's declared size: a number derived
|
|
197
|
+
;; from the spec prints the same whether the engine ran
|
|
198
|
+
;; or was never called, so it could never show a
|
|
199
|
+
;; stoppage.
|
|
200
|
+
(let [executed (long (or ((:runsetflags rp) node {:name nm}
|
|
201
|
+
(fn [& as]
|
|
202
|
+
(let [ctxmap (first as)
|
|
203
|
+
more (second as)
|
|
204
|
+
ctx (corpus-ctx cl (core/get-utility cl) ctxmap)
|
|
205
|
+
out (f ctx ctxmap more)]
|
|
206
|
+
;; ctxmap is the LIVE map behind omni's
|
|
207
|
+
;; ctx view, so this write is what
|
|
208
|
+
;; `match: {ctx: ...}` reads.
|
|
209
|
+
(publish-ctx ctxmap ctx)
|
|
210
|
+
out)))
|
|
211
|
+
0))]
|
|
212
|
+
(if (not= executed n)
|
|
213
|
+
(swap! fails conj
|
|
214
|
+
[nm (str "the engine ran " executed " of the section's "
|
|
215
|
+
n " entries")])
|
|
216
|
+
(swap! npass + executed)))
|
|
217
|
+
(catch Throwable err
|
|
218
|
+
(swap! fails conj [nm (or (ex-message err) (str err))])))))))
|
|
181
219
|
argof (fn [ctxmap k] (vs/getprop ctxmap k))]
|
|
182
220
|
|
|
183
221
|
(t/run-check rec "primary-corpus"
|
|
184
222
|
(fn []
|
|
185
|
-
(
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
(runset "makeOptions" sdk (fn [c m _2]
|
|
223
|
+
(runset "done" sdk (fn [c _ _2] ((u :done) c)))
|
|
224
|
+
(runset "makeUrl" sdk (fn [c _ _2] (first ((u :make-url) c))))
|
|
225
|
+
(runset "makeRequest" sdk (fn [c _ _2] (first ((u :make-request) c))))
|
|
226
|
+
(runset "makeResponse" sdk (fn [c _ _2] (first ((u :make-response) c))))
|
|
227
|
+
(runset "makeSpec" spec-sdk (fn [c _ _2] (first ((u :make-spec) c))))
|
|
228
|
+
(runset "prepareAuth" auth-sdk (fn [c _ _2] (first ((u :prepare-auth) c))))
|
|
229
|
+
(runset "prepareBody" sdk (fn [c _ _2] ((u :prepare-body) c)))
|
|
230
|
+
(runset "prepareHeaders" sdk (fn [c _ _2] ((u :prepare-headers) c)))
|
|
231
|
+
(runset "prepareMethod" sdk (fn [c _ _2] ((u :prepare-method) c)))
|
|
232
|
+
(runset "prepareParams" sdk (fn [c _ _2] ((u :prepare-params) c)))
|
|
233
|
+
(runset "preparePath" sdk (fn [c _ _2] ((u :prepare-path) c)))
|
|
234
|
+
(runset "prepareQuery" sdk (fn [c _ _2] ((u :prepare-query) c)))
|
|
235
|
+
(runset "resultBasic" sdk (fn [c _ _2] (neutral ((u :result-basic) c))))
|
|
236
|
+
(runset "resultBody" sdk (fn [c _ _2] (neutral ((u :result-body) c))))
|
|
237
|
+
(runset "resultHeaders" sdk (fn [c _ _2] (neutral ((u :result-headers) c))))
|
|
238
|
+
(runset "transformRequest" sdk (fn [c _ _2] ((u :transform-request) c)))
|
|
239
|
+
(runset "transformResponse" sdk (fn [c _ _2] ((u :transform-response) c)))
|
|
240
|
+
(runset "makeOptions" sdk (fn [c m _2]
|
|
204
241
|
(core/oset! c :config (argof m "config"))
|
|
205
242
|
(core/oset! c :options (argof m "options"))
|
|
206
243
|
((u :make-options) c)))
|
|
207
|
-
|
|
244
|
+
(runset "makeContext" sdk (fn [c _ _2]
|
|
208
245
|
(let [op (core/oget c :op)]
|
|
209
246
|
(vs/jm "op" (neutral op)))))
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
(t/is-true (< 0 @ran) "the primary corpus executed no sections")
|
|
221
|
-
(t/is-true (< 0 np) "the primary corpus executed no cases")
|
|
222
|
-
(t/is-true (= 0 nf) (str nf " primary corpus failures"))))))))
|
|
247
|
+
(runset "makeError" sdk (fn [c _ err] (first ((u :make-error) c err))))
|
|
248
|
+
(runset "operator" sdk (fn [_ m _2] (neutral (core/make-operation m))))
|
|
249
|
+
(runset "param" sdk (fn [c _ pd] ((u :param) c pd)))
|
|
250
|
+
|
|
251
|
+
(let [np @npass nf (count @fails)]
|
|
252
|
+
(doseq [[nm msg] @fails] (println "PRIMARY-FAIL" nm "-" msg))
|
|
253
|
+
(println "PRIMARY CORPUS: PASS" np " FAIL" nf)
|
|
254
|
+
(t/is-true (< 0 @ran) "the primary corpus executed no sections")
|
|
255
|
+
(t/is-true (< 0 np) "the primary corpus executed no cases")
|
|
256
|
+
(t/is-true (= 0 nf) (str nf " primary corpus failures")))))))
|
|
@@ -1,155 +1,124 @@
|
|
|
1
|
-
;; ProjectName SDK
|
|
2
|
-
;;
|
|
3
|
-
;;
|
|
4
|
-
;;
|
|
1
|
+
;; ProjectName SDK - the shared struct corpus, driven by the VENDORED
|
|
2
|
+
;; @voxgig/omni engine.
|
|
3
|
+
;;
|
|
4
|
+
;; The corpus wiring (`run-all` and the walk subjects below) is unchanged: it
|
|
5
|
+
;; names each section of .sdk/test/test.json "struct" and hands omni the
|
|
6
|
+
;; subject that drives it through this SDK's own vendored voxgig.struct. What
|
|
7
|
+
;; changed is the ENGINE underneath - the hand-written entry loop, matcher and
|
|
8
|
+
;; error handling that used to live in this file are gone, replaced by the
|
|
9
|
+
;; vendored runner reached through sdk.test.omni. A hand-written matcher can
|
|
10
|
+
;; only ever check what its author thought of; the shared one is the same code
|
|
11
|
+
;; every other port is held to.
|
|
12
|
+
;;
|
|
13
|
+
;; Counting: omni raises on the first failing entry in a set rather than
|
|
14
|
+
;; recording per-entry results, so a green section counts its whole set and a
|
|
15
|
+
;; red one counts one failure and names the entry omni rejected.
|
|
16
|
+
;;
|
|
17
|
+
;; The count is what the ENGINE RAN, never the section's declared `set` size.
|
|
18
|
+
;; sdk.test.omni increments a counter inside the subject wrapper - the one
|
|
19
|
+
;; place only the engine reaches - and its `runsetflags` returns the delta
|
|
20
|
+
;; across the set; `run-set` records that many passes, and fails the section
|
|
21
|
+
;; outright when the delta does not match the set it handed over. A count
|
|
22
|
+
;; taken from the spec instead would print the same number for a working
|
|
23
|
+
;; engine and for one that was never called, which is worse than no number:
|
|
24
|
+
;; it reads as evidence. So an all-green run reports exactly the corpus's own
|
|
25
|
+
;; entry count BECAUSE the engine executed exactly those entries - if the
|
|
26
|
+
;; number falls, the corpus stopped running, which is the one thing this
|
|
27
|
+
;; suite exists to notice.
|
|
5
28
|
(ns sdk.test.struct-corpus
|
|
6
29
|
(:require [voxgig.struct :as s]
|
|
7
|
-
[sdk.
|
|
30
|
+
[sdk.test.omni :as omni]
|
|
8
31
|
[clojure.string :as str])
|
|
9
32
|
(:import [java.util LinkedHashMap ArrayList List Map]))
|
|
10
33
|
|
|
11
|
-
(def NULLMARK
|
|
12
|
-
(def UNDEFMARK
|
|
13
|
-
(def EXISTSMARK
|
|
14
|
-
|
|
15
|
-
(defn fix-json [v flag-null]
|
|
16
|
-
(cond
|
|
17
|
-
(nil? v) (if flag-null NULLMARK nil)
|
|
18
|
-
(s/ismap v) (let [o (LinkedHashMap.)]
|
|
19
|
-
(doseq [k (.keySet ^Map v)] (.put o (str k) (fix-json (.get ^Map v k) flag-null)))
|
|
20
|
-
o)
|
|
21
|
-
(s/islist v) (let [a (ArrayList.)]
|
|
22
|
-
(doseq [x v] (.add a (fix-json x flag-null)))
|
|
23
|
-
a)
|
|
24
|
-
:else v))
|
|
25
|
-
|
|
26
|
-
(defn canon [v]
|
|
27
|
-
(cond
|
|
28
|
-
(s/ismap v) (into (sorted-map) (map (fn [k] [(str k) (canon (.get ^Map v k))]) (.keySet ^Map v)))
|
|
29
|
-
(s/islist v) (mapv canon (vec v))
|
|
30
|
-
:else v))
|
|
31
|
-
|
|
32
|
-
(defn eqv [a b] (= (canon a) (canon b)))
|
|
33
|
-
|
|
34
|
-
(defn matchval [check base]
|
|
35
|
-
(let [check (if (or (= check UNDEFMARK) (= check NULLMARK)) nil check)]
|
|
36
|
-
(cond
|
|
37
|
-
(eqv check base) true
|
|
38
|
-
(string? check)
|
|
39
|
-
(let [basestr (s/stringify base)
|
|
40
|
-
m (re-matches #"^/(.+)/$" check)]
|
|
41
|
-
(if m
|
|
42
|
-
(boolean (re-find (re-pattern (second m)) basestr))
|
|
43
|
-
(str/includes? (str/lower-case basestr) (str/lower-case (s/stringify check)))))
|
|
44
|
-
(s/isfunc check) true
|
|
45
|
-
:else false)))
|
|
46
|
-
|
|
47
|
-
(defn- omap [& kvs]
|
|
48
|
-
(let [m (LinkedHashMap.)]
|
|
49
|
-
(doseq [[k v] (partition 2 kvs)] (.put m k v))
|
|
50
|
-
m))
|
|
51
|
-
|
|
52
|
-
(defn do-match [check base]
|
|
53
|
-
(let [base (s/clone base)]
|
|
54
|
-
(s/walk check
|
|
55
|
-
(fn [_k val _p path]
|
|
56
|
-
(when-not (s/isnode val)
|
|
57
|
-
(let [baseval (s/getpath base path)]
|
|
58
|
-
(cond
|
|
59
|
-
(eqv baseval val) nil
|
|
60
|
-
(and (= val UNDEFMARK) (nil? baseval)) nil
|
|
61
|
-
(and (= val EXISTSMARK) (some? baseval)) nil
|
|
62
|
-
(not (matchval val baseval))
|
|
63
|
-
(throw (AssertionError.
|
|
64
|
-
(str "MATCH: " (str/join "." (vec path)) ": ["
|
|
65
|
-
(s/stringify val) "] <=> [" (s/stringify baseval) "]"))))))
|
|
66
|
-
val))))
|
|
67
|
-
|
|
68
|
-
(defn- resolve-args [^Map entry subject]
|
|
69
|
-
(cond
|
|
70
|
-
(.containsKey entry "ctx") [(.get entry "ctx")]
|
|
71
|
-
(.containsKey entry "args")
|
|
72
|
-
(let [args (vec (.get entry "args"))]
|
|
73
|
-
;; ts's resolveArgs writes the live first arg back as entry.ctx, so a
|
|
74
|
-
;; `match: {ctx: ...}` resolves for args-style entries too. Without it
|
|
75
|
-
;; every such assertion reads null and silently passes nothing.
|
|
76
|
-
(when (and (seq args) (s/ismap (first args)))
|
|
77
|
-
(.put entry "ctx" (first args)))
|
|
78
|
-
args)
|
|
79
|
-
(.containsKey entry "in") [(s/clone (.get entry "in"))]
|
|
80
|
-
:else []))
|
|
81
|
-
|
|
82
|
-
(defn- safe-call [subject args]
|
|
83
|
-
(if (empty? args)
|
|
84
|
-
(try (subject) (catch clojure.lang.ArityException _ (subject nil)))
|
|
85
|
-
(apply subject args)))
|
|
86
|
-
|
|
87
|
-
(defn check-result [^Map entry args res]
|
|
88
|
-
(let [matched (atom false)]
|
|
89
|
-
(when (.containsKey entry "match")
|
|
90
|
-
(do-match (.get entry "match")
|
|
91
|
-
(omap "in" (.get entry "in") "args" (s/clone (ArrayList. ^java.util.Collection args))
|
|
92
|
-
"out" (.get entry "res") "ctx" (.get entry "ctx")))
|
|
93
|
-
(reset! matched true))
|
|
94
|
-
(let [out (.get entry "out")]
|
|
95
|
-
(cond
|
|
96
|
-
(eqv out res) nil
|
|
97
|
-
(and @matched (or (= out NULLMARK) (nil? out))) nil
|
|
98
|
-
:else (throw (AssertionError. (str "Expected: " (s/stringify out) ", got: " (s/stringify res))))))))
|
|
99
|
-
|
|
100
|
-
(defn handle-error [^Map entry err]
|
|
101
|
-
(let [entry-err (when (.containsKey entry "err") (.get entry "err"))
|
|
102
|
-
msg (or (.getMessage ^Throwable err) (str err))]
|
|
103
|
-
(if (.containsKey entry "err")
|
|
104
|
-
(if (or (= entry-err true) (matchval entry-err msg))
|
|
105
|
-
(when (.containsKey entry "match")
|
|
106
|
-
(do-match (.get entry "match")
|
|
107
|
-
(omap "in" (.get entry "in") "out" (.get entry "res")
|
|
108
|
-
;; The ts runner hands do-match the ERROR OBJECT, so a
|
|
109
|
-
;; corpus `match: {err: {message: ...}}` resolves. This
|
|
110
|
-
;; port passed the bare message string, where err.message
|
|
111
|
-
;; walks into a string and reads null.
|
|
112
|
-
"ctx" (.get entry "ctx") "err" (omap "message" msg))))
|
|
113
|
-
(throw (AssertionError. (str "ERROR MATCH: [" (s/stringify entry-err) "] <=> [" msg "]"))))
|
|
114
|
-
(throw (if (instance? AssertionError err) err (AssertionError. (str err)))))))
|
|
34
|
+
(def NULLMARK omni/NULLMARK)
|
|
35
|
+
(def UNDEFMARK omni/UNDEFMARK)
|
|
36
|
+
(def EXISTSMARK omni/EXISTSMARK)
|
|
115
37
|
|
|
116
38
|
(def ^:dynamic *results* nil)
|
|
117
39
|
|
|
40
|
+
;; The omni runpack for the section being driven, bound by run-corpus (and by
|
|
41
|
+
;; the primary suite, which shares this recording shape).
|
|
42
|
+
(def ^:dynamic *runner* nil)
|
|
43
|
+
|
|
118
44
|
(defn- record! [group name ok? msg]
|
|
119
45
|
(swap! *results* update (if ok? :pass :fail) (fnil conj []) {:group group :name name :msg msg}))
|
|
120
46
|
|
|
47
|
+
(defn- setsize [node]
|
|
48
|
+
(let [testset (when (s/ismap node) (.get ^Map node "set"))]
|
|
49
|
+
(if (s/islist testset) (.size ^List testset) 0)))
|
|
50
|
+
|
|
51
|
+
;; A section whose `set` is PRESENT but empty runs nothing and raises nothing:
|
|
52
|
+
;; it would record no passes and leave the suite green, which is the same
|
|
53
|
+
;; silent stoppage wearing corpus clothes. omni's own strict mode refuses it
|
|
54
|
+
;; (`checkset`), with an `empty: true` opt-out for a section that means it;
|
|
55
|
+
;; the shared corpus declares no OMNI version, so it is lenient v0 and that
|
|
56
|
+
;; check never fires - the rule is applied here instead. A section with no
|
|
57
|
+
;; `set` at all is left to omni, whose message for it is the better one.
|
|
58
|
+
(defn- empty-set? [node]
|
|
59
|
+
(let [testset (when (s/ismap node) (.get ^Map node "set"))]
|
|
60
|
+
(boolean (and (s/islist testset)
|
|
61
|
+
(zero? (.size ^List testset))
|
|
62
|
+
(not (true? (.get ^Map node "empty")))))))
|
|
63
|
+
|
|
64
|
+
;; Drive one corpus section through the vendored engine.
|
|
65
|
+
;;
|
|
66
|
+
;; `flags` is the corpus-facing spelling ({"null" false}); omni's own is
|
|
67
|
+
;; keyword-keyed, and it takes the section label there too, so a failure names
|
|
68
|
+
;; the section rather than the runner.
|
|
121
69
|
(defn run-set
|
|
122
70
|
([group node subject] (run-set group node {} subject))
|
|
123
71
|
([group node flags subject]
|
|
124
|
-
(
|
|
125
|
-
(
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
(let [args (resolve-args entry subject)
|
|
133
|
-
res (fix-json (safe-call subject args) flag-null)]
|
|
134
|
-
(.put entry "res" res)
|
|
135
|
-
(check-result entry args res))
|
|
136
|
-
(record! group (str (.get entry "name")) true nil)
|
|
137
|
-
(catch Throwable err
|
|
138
|
-
(try
|
|
139
|
-
(handle-error entry err)
|
|
140
|
-
(record! group (str (.get entry "name")) true nil)
|
|
141
|
-
(catch Throwable e2
|
|
142
|
-
(record! group (str (.get entry "name")) false (.getMessage e2)))))))))))
|
|
72
|
+
(cond
|
|
73
|
+
(nil? *runner*)
|
|
74
|
+
(record! group "section" false "no omni runner bound")
|
|
75
|
+
|
|
76
|
+
(not (s/ismap node))
|
|
77
|
+
;; A missing section used to be skipped in silence, which is how a
|
|
78
|
+
;; renamed corpus section becomes a suite that tests nothing.
|
|
79
|
+
(record! group "section" false "corpus section missing")
|
|
143
80
|
|
|
81
|
+
(empty-set? node)
|
|
82
|
+
(record! group "entries" false "corpus section has an empty set")
|
|
83
|
+
|
|
84
|
+
:else
|
|
85
|
+
(let [omniflags (cond-> {:name group}
|
|
86
|
+
(contains? flags "null") (assoc :null (boolean (get flags "null"))))
|
|
87
|
+
n (setsize node)]
|
|
88
|
+
(try
|
|
89
|
+
;; `ran` is the engine's own execution count for this set, not the
|
|
90
|
+
;; corpus's declared size: a section that reports fewer (or, with a
|
|
91
|
+
;; disconnected engine, none) fails here instead of counting the
|
|
92
|
+
;; entries nobody ran.
|
|
93
|
+
(let [ran (long (or ((:runsetflags *runner*) node omniflags subject) 0))]
|
|
94
|
+
(if (not= ran n)
|
|
95
|
+
(record! group "entries" false
|
|
96
|
+
(str "the engine ran " ran " of the section's " n " entries"))
|
|
97
|
+
(dotimes [_ ran] (record! group "entry" true nil))))
|
|
98
|
+
(catch Throwable err
|
|
99
|
+
(record! group "entry" false (or (ex-message err) (str err)))))))))
|
|
100
|
+
|
|
101
|
+
;; A section that is one case rather than a `set`: `in` in, `out` expected.
|
|
102
|
+
;; omni has no entry point for these, so the comparison is its own
|
|
103
|
+
;; `deepequal`, on values converted back into its model.
|
|
144
104
|
(defn run-single [group node actual-fn]
|
|
145
|
-
(
|
|
105
|
+
(if-not (s/ismap node)
|
|
106
|
+
(record! group "single" false "corpus section missing")
|
|
146
107
|
(try
|
|
147
108
|
(let [expected (.get ^Map node "out")
|
|
148
|
-
actual (actual-fn (.get ^Map node "in"))]
|
|
149
|
-
(if (
|
|
109
|
+
actual (omni/->omni (actual-fn (omni/->struct (.get ^Map node "in"))))]
|
|
110
|
+
(if (omni/deep-equal? expected actual)
|
|
150
111
|
(record! group "single" true nil)
|
|
151
|
-
(record! group "single" false
|
|
152
|
-
|
|
112
|
+
(record! group "single" false
|
|
113
|
+
(str "Expected: " (omni/stringify expected) ", got: " (omni/stringify actual)))))
|
|
114
|
+
(catch Throwable e (record! group "single" false (or (ex-message e) (str e)))))))
|
|
115
|
+
|
|
116
|
+
;; A struct-model map literal, for the inject/transform sections that build a
|
|
117
|
+
;; store or an injection descriptor by hand.
|
|
118
|
+
(defn- omap [& kvs]
|
|
119
|
+
(let [m (LinkedHashMap.)]
|
|
120
|
+
(doseq [[k v] (partition 2 kvs)] (.put m k v))
|
|
121
|
+
m))
|
|
153
122
|
|
|
154
123
|
(defn- gp [^Map m & ks] (reduce (fn [acc k] (when (s/ismap acc) (.get ^Map acc k))) m ks))
|
|
155
124
|
(defn- vget [vin k] (when (s/ismap vin) (.get ^Map vin k)))
|
|
@@ -157,10 +126,7 @@
|
|
|
157
126
|
|
|
158
127
|
(declare run-walk-log walk-copy-subject walk-depth-subject)
|
|
159
128
|
|
|
160
|
-
(
|
|
161
|
-
(cond
|
|
162
|
-
(= val NULLMARK) (s/setprop parent key nil)
|
|
163
|
-
(string? val) (s/setprop parent key (str/replace val NULLMARK "null"))))
|
|
129
|
+
(def null-modifier omni/null-modifier)
|
|
164
130
|
|
|
165
131
|
(defn run-all [spec]
|
|
166
132
|
(let [minor (gp spec "minor") walk (gp spec "walk") mergeS (gp spec "merge")
|
|
@@ -285,23 +251,30 @@
|
|
|
285
251
|
(run-set (str "select." g) (gp selectS g)
|
|
286
252
|
(fn [vin] (s/select (vget vin "obj") (vget vin "query")))))))
|
|
287
253
|
|
|
254
|
+
|
|
255
|
+
;; `walk.log` is a single case whose expectation is the log the walk emits.
|
|
256
|
+
;; The node arrives in omni's model, so it is converted before the vendored
|
|
257
|
+
;; struct walks it, and the log converted back before omni compares.
|
|
288
258
|
(defn run-walk-log [group node]
|
|
289
|
-
(
|
|
259
|
+
(if-not (s/ismap node)
|
|
260
|
+
(record! group "log" false "corpus section missing")
|
|
290
261
|
(try
|
|
291
|
-
(let [test-data (
|
|
262
|
+
(let [test-data (omni/->struct node)
|
|
292
263
|
log (ArrayList.)
|
|
293
264
|
walklog (fn [key val parent path]
|
|
294
265
|
(.add log (str "k=" (if (nil? key) (s/stringify) (s/stringify key))
|
|
295
266
|
", v=" (s/stringify val)
|
|
296
267
|
", p=" (if (nil? parent) (s/stringify) (s/stringify parent))
|
|
297
268
|
", t=" (s/pathify path)))
|
|
298
|
-
val)
|
|
269
|
+
val)
|
|
270
|
+
expected (gp node "out" "after")]
|
|
299
271
|
(s/walk (.get ^Map test-data "in") walklog)
|
|
300
|
-
(if (
|
|
272
|
+
(if (omni/deep-equal? expected (omni/->omni log))
|
|
301
273
|
(record! group "log" true nil)
|
|
302
|
-
(record! group "log" false
|
|
303
|
-
|
|
304
|
-
|
|
274
|
+
(record! group "log" false
|
|
275
|
+
(str "Expected: " (omni/stringify expected)
|
|
276
|
+
", got: " (omni/stringify (omni/->omni log))))))
|
|
277
|
+
(catch Throwable e (record! group "log" false (or (ex-message e) (str e)))))))
|
|
305
278
|
|
|
306
279
|
(defn walk-copy-subject [vin]
|
|
307
280
|
(let [cur (atom (doto (ArrayList.) (.add nil)))]
|
|
@@ -336,13 +309,13 @@
|
|
|
336
309
|
(s/walk (vget vin "src") {:before copy :maxdepth (vget vin "maxdepth")})
|
|
337
310
|
(:top @state))))
|
|
338
311
|
|
|
312
|
+
|
|
339
313
|
;; Returns [pass fail failures]. Prints each failure.
|
|
340
314
|
(defn run-corpus [testfile]
|
|
341
|
-
(let [
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
(run-all spec)
|
|
315
|
+
(let [runpack ((omni/make-runner testfile) "struct")]
|
|
316
|
+
(binding [*results* (atom {:pass [] :fail []})
|
|
317
|
+
*runner* runpack]
|
|
318
|
+
(run-all (:spec runpack))
|
|
346
319
|
(let [r @*results* np (count (:pass r)) nf (count (:fail r))]
|
|
347
320
|
(doseq [f (:fail r)] (println "STRUCT-FAIL" (:group f) (:name f) "-" (:msg f)))
|
|
348
321
|
[np nf (:fail r)]))))
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
;; ProjectName SDK test runner (tools.deps main entry point).
|
|
2
|
-
;; Runs the
|
|
3
|
-
;;
|
|
4
|
-
;; reports counts and exits
|
|
2
|
+
;; Runs the vendored omni runner's smoke test, the API-agnostic suites
|
|
3
|
+
;; (primary utility, pipeline, features, netsim), the generated API-specific
|
|
4
|
+
;; suite, and the vendored struct corpus, then reports counts and exits
|
|
5
|
+
;; non-zero on any failure.
|
|
5
6
|
(ns sdk.test-runner
|
|
6
7
|
(:require [sdk.test.primary :as primary]
|
|
7
8
|
[sdk.test.pipeline :as pipeline]
|
|
8
9
|
[sdk.test.feature :as feature]
|
|
9
10
|
[sdk.test.netsim :as netsim]
|
|
10
11
|
[sdk.test.struct-corpus :as corpus]
|
|
12
|
+
[sdk.test.omni-smoke :as omnismoke]
|
|
11
13
|
[sdk.gentest :as gentest]))
|
|
12
14
|
|
|
13
15
|
(defn- find-corpus-file []
|
|
@@ -17,6 +19,9 @@
|
|
|
17
19
|
(defn -main [& _args]
|
|
18
20
|
(let [results (atom [])
|
|
19
21
|
rec (fn [name ok? msg] (swap! results conj {:name name :ok ok? :msg msg}))]
|
|
22
|
+
;; The vendored engine's own smoke test runs FIRST: if the runner cannot
|
|
23
|
+
;; fail a bad entry, every corpus count below it is meaningless.
|
|
24
|
+
(omnismoke/run rec)
|
|
20
25
|
(primary/run rec)
|
|
21
26
|
;; The shared corpus, driven through this SDK's utilities.
|
|
22
27
|
(primary/run-corpus rec)
|