@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
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
;; VENDORED: @voxgig/omni sdk-20260907-0029-0 (clojure/src/voxgig/omni/json.clj)
|
|
2
|
+
;; Source: https://github.com/voxgig/omni @ 274708cc2d12b21707d975543953f845f8444be0 [tag: sdk-20260907-0029-0]
|
|
3
|
+
;; License: MIT (c) voxgig - see repository LICENSE. Do not edit: resync from upstream.
|
|
4
|
+
;; The omni JSON parser.
|
|
5
|
+
;;
|
|
6
|
+
;; The omni runner must be able to test *any* library, and must add no
|
|
7
|
+
;; third-party dependencies, so it carries its own JSON parsing rather than
|
|
8
|
+
;; borrowing clojure.data.json, cheshire or the system under test.
|
|
9
|
+
;;
|
|
10
|
+
;; Parses into native Clojure values: maps with string keys (insertion
|
|
11
|
+
;; ordered), vectors, strings, doubles, booleans and nil.
|
|
12
|
+
|
|
13
|
+
(ns voxgig.omni.json)
|
|
14
|
+
|
|
15
|
+
(defn- ws? [ch]
|
|
16
|
+
(or (= \space ch) (= \tab ch) (= \newline ch) (= \return ch)))
|
|
17
|
+
|
|
18
|
+
(defn- skipws [^String text pos]
|
|
19
|
+
(loop [at pos]
|
|
20
|
+
(if (and (< at (.length text)) (ws? (.charAt text at)))
|
|
21
|
+
(recur (inc at))
|
|
22
|
+
at)))
|
|
23
|
+
|
|
24
|
+
(declare parse-value)
|
|
25
|
+
|
|
26
|
+
(defn- parse-word [^String text pos word value]
|
|
27
|
+
(if (and (<= (+ pos (count word)) (.length text))
|
|
28
|
+
(= word (subs text pos (+ pos (count word)))))
|
|
29
|
+
[value (+ pos (count word))]
|
|
30
|
+
(throw (ex-info (str "omni: bad JSON literal at " pos) {:pos pos}))))
|
|
31
|
+
|
|
32
|
+
(defn- parse-string [^String text pos]
|
|
33
|
+
(when (or (>= pos (.length text)) (not= \" (.charAt text pos)))
|
|
34
|
+
(throw (ex-info (str "omni: expected string at " pos) {:pos pos})))
|
|
35
|
+
|
|
36
|
+
(loop [at (inc pos)
|
|
37
|
+
out (StringBuilder.)]
|
|
38
|
+
(when (>= at (.length text))
|
|
39
|
+
(throw (ex-info "omni: unterminated JSON string" {:pos at})))
|
|
40
|
+
|
|
41
|
+
(let [ch (.charAt text at)]
|
|
42
|
+
(cond
|
|
43
|
+
(= \" ch) [(.toString out) (inc at)]
|
|
44
|
+
|
|
45
|
+
(not= \\ ch) (recur (inc at) (.append out ch))
|
|
46
|
+
|
|
47
|
+
:else
|
|
48
|
+
(let [escape (.charAt text (inc at))]
|
|
49
|
+
(case escape
|
|
50
|
+
\" (recur (+ at 2) (.append out \"))
|
|
51
|
+
\\ (recur (+ at 2) (.append out \\))
|
|
52
|
+
\/ (recur (+ at 2) (.append out \/))
|
|
53
|
+
\b (recur (+ at 2) (.append out \backspace))
|
|
54
|
+
\f (recur (+ at 2) (.append out \formfeed))
|
|
55
|
+
\n (recur (+ at 2) (.append out \newline))
|
|
56
|
+
\r (recur (+ at 2) (.append out \return))
|
|
57
|
+
\t (recur (+ at 2) (.append out \tab))
|
|
58
|
+
\u (recur (+ at 6)
|
|
59
|
+
(.append out (char (Integer/parseInt (subs text (+ at 2) (+ at 6)) 16))))
|
|
60
|
+
(throw (ex-info (str "omni: bad JSON escape at " at) {:pos at}))))))))
|
|
61
|
+
|
|
62
|
+
(defn- numchar? [ch]
|
|
63
|
+
(or (Character/isDigit ^char ch)
|
|
64
|
+
(= \. ch) (= \e ch) (= \E ch) (= \- ch) (= \+ ch)))
|
|
65
|
+
|
|
66
|
+
(defn- parse-number [^String text pos]
|
|
67
|
+
(let [start pos
|
|
68
|
+
stop (loop [at (if (and (< pos (.length text))
|
|
69
|
+
(or (= \- (.charAt text pos)) (= \+ (.charAt text pos))))
|
|
70
|
+
(inc pos)
|
|
71
|
+
pos)]
|
|
72
|
+
(if (and (< at (.length text)) (numchar? (.charAt text at)))
|
|
73
|
+
(recur (inc at))
|
|
74
|
+
at))
|
|
75
|
+
span (subs text start stop)]
|
|
76
|
+
(try
|
|
77
|
+
[(Double/parseDouble span) stop]
|
|
78
|
+
(catch NumberFormatException _
|
|
79
|
+
(throw (ex-info (str "omni: bad JSON number [" span "] at " start) {:pos start}))))))
|
|
80
|
+
|
|
81
|
+
(defn- parse-map [^String text pos]
|
|
82
|
+
(let [after (skipws text (inc pos))]
|
|
83
|
+
(if (and (< after (.length text)) (= \} (.charAt text after)))
|
|
84
|
+
[(array-map) (inc after)]
|
|
85
|
+
(loop [at after
|
|
86
|
+
out (array-map)]
|
|
87
|
+
(let [at (skipws text at)
|
|
88
|
+
[key keypos] (parse-string text at)
|
|
89
|
+
colon (skipws text keypos)]
|
|
90
|
+
|
|
91
|
+
(when (or (>= colon (.length text)) (not= \: (.charAt text colon)))
|
|
92
|
+
(throw (ex-info (str "omni: expected ':' at " colon) {:pos colon})))
|
|
93
|
+
|
|
94
|
+
(let [[value valpos] (parse-value text (skipws text (inc colon)))
|
|
95
|
+
out (assoc out key value)
|
|
96
|
+
next (skipws text valpos)]
|
|
97
|
+
|
|
98
|
+
(when (>= next (.length text))
|
|
99
|
+
(throw (ex-info "omni: unterminated JSON object" {:pos next})))
|
|
100
|
+
|
|
101
|
+
(cond
|
|
102
|
+
(= \, (.charAt text next)) (recur (inc next) out)
|
|
103
|
+
(= \} (.charAt text next)) [out (inc next)]
|
|
104
|
+
:else (throw (ex-info (str "omni: expected ',' or '}' at " next) {:pos next})))))))))
|
|
105
|
+
|
|
106
|
+
(defn- parse-list [^String text pos]
|
|
107
|
+
(let [after (skipws text (inc pos))]
|
|
108
|
+
(if (and (< after (.length text)) (= \] (.charAt text after)))
|
|
109
|
+
[[] (inc after)]
|
|
110
|
+
(loop [at after
|
|
111
|
+
out []]
|
|
112
|
+
(let [[value valpos] (parse-value text (skipws text at))
|
|
113
|
+
out (conj out value)
|
|
114
|
+
next (skipws text valpos)]
|
|
115
|
+
|
|
116
|
+
(when (>= next (.length text))
|
|
117
|
+
(throw (ex-info "omni: unterminated JSON array" {:pos next})))
|
|
118
|
+
|
|
119
|
+
(cond
|
|
120
|
+
(= \, (.charAt text next)) (recur (inc next) out)
|
|
121
|
+
(= \] (.charAt text next)) [out (inc next)]
|
|
122
|
+
:else (throw (ex-info (str "omni: expected ',' or ']' at " next) {:pos next}))))))))
|
|
123
|
+
|
|
124
|
+
(defn- parse-value [^String text pos]
|
|
125
|
+
(when (>= pos (.length text))
|
|
126
|
+
(throw (ex-info "omni: unexpected end of JSON" {:pos pos})))
|
|
127
|
+
|
|
128
|
+
(let [ch (.charAt text pos)]
|
|
129
|
+
(case ch
|
|
130
|
+
\{ (parse-map text pos)
|
|
131
|
+
\[ (parse-list text pos)
|
|
132
|
+
\" (parse-string text pos)
|
|
133
|
+
\t (parse-word text pos "true" true)
|
|
134
|
+
\f (parse-word text pos "false" false)
|
|
135
|
+
\n (parse-word text pos "null" nil)
|
|
136
|
+
(parse-number text pos))))
|
|
137
|
+
|
|
138
|
+
(defn parse
|
|
139
|
+
"Parse JSON text into native Clojure values."
|
|
140
|
+
[^String text]
|
|
141
|
+
(let [[value pos] (parse-value text (skipws text 0))
|
|
142
|
+
rest (skipws text pos)]
|
|
143
|
+
(when (< rest (.length text))
|
|
144
|
+
(throw (ex-info (str "omni: trailing JSON content at " rest) {:pos rest})))
|
|
145
|
+
value))
|
|
@@ -0,0 +1,445 @@
|
|
|
1
|
+
;; VENDORED: @voxgig/omni sdk-20260907-0029-0 (clojure/src/voxgig/omni/runner.clj)
|
|
2
|
+
;; Source: https://github.com/voxgig/omni @ 274708cc2d12b21707d975543953f845f8444be0 [tag: sdk-20260907-0029-0]
|
|
3
|
+
;; License: MIT (c) voxgig - see repository LICENSE. Do not edit: resync from upstream.
|
|
4
|
+
;; Omni: the shared multi-language test runner (Clojure port).
|
|
5
|
+
;;
|
|
6
|
+
;; Port of the canonical TypeScript implementation
|
|
7
|
+
;; (typescript/src/Runner.ts). Behaviour must match, case for case.
|
|
8
|
+
|
|
9
|
+
(ns voxgig.omni.runner
|
|
10
|
+
(:require [clojure.string :as string]
|
|
11
|
+
[voxgig.omni.json :as json]
|
|
12
|
+
[voxgig.omni.util :as u])
|
|
13
|
+
(:import [java.io File]
|
|
14
|
+
[java.util.regex Pattern PatternSyntaxException]))
|
|
15
|
+
|
|
16
|
+
;; The newest spec format version this runner understands. A spec with no
|
|
17
|
+
;; OMNI block is version 0: the original, lenient format, frozen forever.
|
|
18
|
+
;; Version 1 turns on strict entry validation (see checkentry).
|
|
19
|
+
(def SPECVERSION 1)
|
|
20
|
+
|
|
21
|
+
;; Capability strings this runner supports beyond the version baseline. A
|
|
22
|
+
;; spec's OMNI.requires list is checked against this: an unknown capability
|
|
23
|
+
;; refuses the spec loudly at load time, instead of a lagging port silently
|
|
24
|
+
;; mis-running it. (Empty today; future format features mint a string here.)
|
|
25
|
+
(def CAPABILITIES [])
|
|
26
|
+
|
|
27
|
+
;; The complete set of fields an entry may carry. Under version 1 anything
|
|
28
|
+
;; else is an error: an unrecognised key is almost always a typo'd
|
|
29
|
+
;; assertion, and a typo'd assertion is a test that silently stopped
|
|
30
|
+
;; testing.
|
|
31
|
+
(def ^:private ENTRYFIELDS #{"in" "args" "ctx" "out" "err" "match" "client" "id" "doc"})
|
|
32
|
+
|
|
33
|
+
;; A test failure (or a malformed spec). Distinct from errors thrown by the
|
|
34
|
+
;; subject under test, which are candidates for an `err` expectation.
|
|
35
|
+
(defn omni-error
|
|
36
|
+
([message] (omni-error message nil))
|
|
37
|
+
([message entry]
|
|
38
|
+
(ex-info message {:omni true :entry entry})))
|
|
39
|
+
|
|
40
|
+
(defn omni-error? [err]
|
|
41
|
+
(and (instance? clojure.lang.IExceptionInfo err) (:omni (ex-data err))))
|
|
42
|
+
|
|
43
|
+
;; Load a spec: a path to a JSON file.
|
|
44
|
+
(defn loadspec [path]
|
|
45
|
+
(when-not (.exists (File. ^String path))
|
|
46
|
+
(throw (omni-error (str "omni: cannot read spec: " path))))
|
|
47
|
+
(json/parse (slurp path)))
|
|
48
|
+
|
|
49
|
+
;; Read the spec's format version from its optional top-level OMNI block,
|
|
50
|
+
;; and refuse a spec this runner cannot faithfully run: a version newer
|
|
51
|
+
;; than SPECVERSION, or a required capability not in CAPABILITIES. A
|
|
52
|
+
;; genuinely absent OMNI key is legacy (version 0); a present-but-null
|
|
53
|
+
;; block is malformed - presence, not nil-ness, decides.
|
|
54
|
+
(defn- resolveversion [alltests]
|
|
55
|
+
(if-not (and (u/ismap alltests) (contains? alltests "OMNI"))
|
|
56
|
+
0
|
|
57
|
+
(let [meta (get alltests "OMNI")
|
|
58
|
+
version (when (u/ismap meta) (get meta "version"))]
|
|
59
|
+
|
|
60
|
+
(when-not (and (u/ismap meta) (u/isnum version) (== version (Math/rint (double version))))
|
|
61
|
+
(throw (omni-error "omni: malformed OMNI version block")))
|
|
62
|
+
|
|
63
|
+
(when (or (< version 0) (< SPECVERSION version))
|
|
64
|
+
(throw (omni-error (str "omni: unsupported spec version: " (u/numstr version)))))
|
|
65
|
+
|
|
66
|
+
(when (contains? meta "requires")
|
|
67
|
+
(let [requires (get meta "requires")]
|
|
68
|
+
(when-not (u/islist requires)
|
|
69
|
+
(throw (omni-error "omni: malformed OMNI requires list")))
|
|
70
|
+
(doseq [cap requires]
|
|
71
|
+
(when-not (and (string? cap) (contains? (set CAPABILITIES) cap))
|
|
72
|
+
(throw (omni-error (str "omni: spec requires unsupported capability: " (u/stringify cap))))))))
|
|
73
|
+
|
|
74
|
+
(long version))))
|
|
75
|
+
|
|
76
|
+
;; Find `primary.<name>`, then `<name>`, then the whole spec.
|
|
77
|
+
(defn resolvespec [name alltests]
|
|
78
|
+
(if (or (nil? name) (= "" name))
|
|
79
|
+
alltests
|
|
80
|
+
(let [primary (get-in alltests ["primary" name])]
|
|
81
|
+
(cond
|
|
82
|
+
(some? primary) primary
|
|
83
|
+
(some? (get alltests name)) (get alltests name)
|
|
84
|
+
:else alltests))))
|
|
85
|
+
|
|
86
|
+
;; Nulls (and absent values) become NULLMARK. Always a fresh copy.
|
|
87
|
+
(defn fixjson [val donull]
|
|
88
|
+
(cond
|
|
89
|
+
;; Canonical returns the value UNCHANGED when donull is false
|
|
90
|
+
;; (typescript/src/Runner.ts): absent stays absent and nil stays nil.
|
|
91
|
+
;; Answering nil for both collapsed two states the corpus distinguishes,
|
|
92
|
+
;; so a subject that correctly returned nothing was compared against null
|
|
93
|
+
;; and marked wrong. Same defect the other ports carried (#17, #23, #25,
|
|
94
|
+
;; #26, #27, #28).
|
|
95
|
+
(u/isnone val) (if donull u/NULLMARK val)
|
|
96
|
+
(u/islist val) (vec (map #(fixjson % donull) val))
|
|
97
|
+
(u/ismap val) (reduce-kv (fn [out key entry] (assoc out key (fixjson entry donull)))
|
|
98
|
+
(array-map)
|
|
99
|
+
val)
|
|
100
|
+
:else val))
|
|
101
|
+
|
|
102
|
+
;; The JSON form of an error: always at least {name,message}.
|
|
103
|
+
(defn errmessage [err]
|
|
104
|
+
(or (ex-message err) (.getSimpleName (class err))))
|
|
105
|
+
|
|
106
|
+
(defn errify [err]
|
|
107
|
+
(array-map "name" (.getSimpleName (class err)) "message" (errmessage err)))
|
|
108
|
+
|
|
109
|
+
;; The error base a `match.err` sees: the provider's own, when it has one.
|
|
110
|
+
;;
|
|
111
|
+
;; A library whose errors carry a code reaches `match: {err: {code}}`
|
|
112
|
+
;; through the provider's `:errify`, which REPLACES `errify` rather than
|
|
113
|
+
;; adding to it.
|
|
114
|
+
(defn errbase [err provider]
|
|
115
|
+
(if-let [hook (and (map? provider) (:errify provider))]
|
|
116
|
+
(hook err)
|
|
117
|
+
(errify err)))
|
|
118
|
+
|
|
119
|
+
;; Match one leaf: /regex/ or case-insensitive substring for strings.
|
|
120
|
+
(defn matchval [check base]
|
|
121
|
+
(if (u/deepequal check base)
|
|
122
|
+
true
|
|
123
|
+
(let [want (if (or (= u/UNDEFMARK check) (= u/NULLMARK check)) nil check)]
|
|
124
|
+
(cond
|
|
125
|
+
(nil? want) (or (u/isnone base) (= u/NULLMARK base))
|
|
126
|
+
|
|
127
|
+
;; An empty want is a substring of everything, so it would match any
|
|
128
|
+
;; value. Require the base to be the empty string too.
|
|
129
|
+
(= "" want) (= "" base)
|
|
130
|
+
|
|
131
|
+
(string? want)
|
|
132
|
+
(let [basestr (u/stringify base)]
|
|
133
|
+
(if (and (< 2 (count want)) (string/starts-with? want "/") (string/ends-with? want "/"))
|
|
134
|
+
(try
|
|
135
|
+
(.find (.matcher (Pattern/compile (subs want 1 (dec (count want)))) basestr))
|
|
136
|
+
(catch PatternSyntaxException _ false))
|
|
137
|
+
(string/includes? (string/lower-case basestr) (string/lower-case want))))
|
|
138
|
+
|
|
139
|
+
:else (u/deepequal want base)))))
|
|
140
|
+
|
|
141
|
+
;; Convert NULLMARK sentinels back into real nulls.
|
|
142
|
+
(defn nullmodifier [val _path]
|
|
143
|
+
(cond
|
|
144
|
+
(= u/NULLMARK val) nil
|
|
145
|
+
(string? val) (string/replace val u/NULLMARK "null")
|
|
146
|
+
:else val))
|
|
147
|
+
|
|
148
|
+
;; The spec-defined part of an entry (drop runner bookkeeping). A non-map
|
|
149
|
+
;; entry (e.g. checkentry's "entry is not a map" failure) has nothing to
|
|
150
|
+
;; strip, so it passes through unchanged.
|
|
151
|
+
(defn- entrysummary [entry]
|
|
152
|
+
(if-not (u/ismap entry)
|
|
153
|
+
entry
|
|
154
|
+
(reduce-kv (fn [out key value]
|
|
155
|
+
(if (contains? #{"res" "thrown" "ctx"} key) out (assoc out key value)))
|
|
156
|
+
(array-map)
|
|
157
|
+
entry)))
|
|
158
|
+
|
|
159
|
+
;; The label of one entry, for failure messages.
|
|
160
|
+
(defn- entryref [label index entry]
|
|
161
|
+
(let [id (get entry "id")]
|
|
162
|
+
(str label "[" index "]" (if (some? id) (str " (" (u/stringify id) ")") ""))))
|
|
163
|
+
|
|
164
|
+
(defn- fail
|
|
165
|
+
([label index entry reason] (fail label index entry reason nil nil))
|
|
166
|
+
([label index entry reason expected actual]
|
|
167
|
+
(let [msg (str "omni: " (entryref label index entry) ": " reason
|
|
168
|
+
(if (some? expected) (str "\n expected: " expected) "")
|
|
169
|
+
(if (some? actual) (str "\n actual: " actual) "")
|
|
170
|
+
"\n entry: " (u/stringify (entrysummary entry)))]
|
|
171
|
+
(omni-error msg entry))))
|
|
172
|
+
|
|
173
|
+
;; Strict entry validation, applied when the spec declares version 1 or
|
|
174
|
+
;; later. The lenient format converts each of these mistakes into a silent
|
|
175
|
+
;; pass or a dead field; here they fail with the entry named.
|
|
176
|
+
(defn- checkentry [label index entry]
|
|
177
|
+
(when-not (u/ismap entry)
|
|
178
|
+
(throw (fail label index entry "entry is not a map")))
|
|
179
|
+
|
|
180
|
+
(doseq [key (keys entry)]
|
|
181
|
+
(when-not (contains? ENTRYFIELDS key)
|
|
182
|
+
(throw (fail label index entry (str "unknown entry field: " key)))))
|
|
183
|
+
|
|
184
|
+
(let [argsources (count (filter #(contains? entry %) ["in" "args" "ctx"]))]
|
|
185
|
+
(when (< 1 argsources)
|
|
186
|
+
(throw (fail label index entry "entry has more than one of in, args, ctx"))))
|
|
187
|
+
|
|
188
|
+
(when (and (some? (get entry "err")) (contains? entry "out"))
|
|
189
|
+
(throw (fail label index entry "entry has both err and out")))
|
|
190
|
+
|
|
191
|
+
(when (and (contains? entry "id") (not (string? (get entry "id"))))
|
|
192
|
+
(throw (fail label index entry "entry id is not a string"))))
|
|
193
|
+
|
|
194
|
+
;; Validate a version-1 group up front, against the AUTHORED entries -
|
|
195
|
+
;; null-normalisation would otherwise rewrite an authored null (e.g.
|
|
196
|
+
;; id: null) into a sentinel string and hide it from validation. A
|
|
197
|
+
;; malformed spec is a spec error, not a test result, so it fails before
|
|
198
|
+
;; any subject runs.
|
|
199
|
+
(defn- checkset [label testspec normalset]
|
|
200
|
+
(let [origset (if (and (u/ismap testspec) (u/islist (get testspec "set")))
|
|
201
|
+
(get testspec "set")
|
|
202
|
+
normalset)]
|
|
203
|
+
|
|
204
|
+
(when (and (zero? (count origset))
|
|
205
|
+
(not (true? (when (u/ismap testspec) (get testspec "empty")))))
|
|
206
|
+
(throw (omni-error (str "omni: empty test set: " label))))
|
|
207
|
+
|
|
208
|
+
(doseq [[index entry] (map-indexed vector origset)]
|
|
209
|
+
(checkentry label index entry))))
|
|
210
|
+
|
|
211
|
+
;; Check that every leaf of `check` is present, and matches, in `base`.
|
|
212
|
+
(defn match
|
|
213
|
+
([label index entry check base] (match label index entry check base []))
|
|
214
|
+
([label index entry check base path]
|
|
215
|
+
(let [at (if (empty? path) "<root>" (u/pathify path))]
|
|
216
|
+
(cond
|
|
217
|
+
(u/islist check)
|
|
218
|
+
(doseq [[index2 subcheck] (map-indexed vector check)]
|
|
219
|
+
(match label index entry subcheck base (conj path (str index2))))
|
|
220
|
+
|
|
221
|
+
(u/ismap check)
|
|
222
|
+
(doseq [[key subcheck] check]
|
|
223
|
+
(match label index entry subcheck base (conj path key)))
|
|
224
|
+
|
|
225
|
+
:else
|
|
226
|
+
(let [baseval (u/getpath base path)]
|
|
227
|
+
(cond
|
|
228
|
+
;; The sentinels are tested BEFORE the identity check below.
|
|
229
|
+
;; Otherwise a subject returning the literal string "__UNDEF__"
|
|
230
|
+
;; satisfies an assertion that the key is absent - two mutually
|
|
231
|
+
;; exclusive states passing one check. A sentinel that accepts
|
|
232
|
+
;; its own literal is not a sentinel. (NULLMARK still accepts
|
|
233
|
+
;; NULLMARK: under the default null flag a real null has already
|
|
234
|
+
;; been normalised to it, so the two are genuinely
|
|
235
|
+
;; indistinguishable here - that one needs a raw-value escape,
|
|
236
|
+
;; not an ordering change.)
|
|
237
|
+
|
|
238
|
+
;; Explicitly absent: satisfied only by a genuinely missing key,
|
|
239
|
+
;; never by a present null (the distinction the sentinels exist
|
|
240
|
+
;; to keep).
|
|
241
|
+
(= u/UNDEFMARK check)
|
|
242
|
+
(when-not (u/isabsent baseval)
|
|
243
|
+
(throw (fail label index entry (str "expected absent at " at)
|
|
244
|
+
"absent" (u/stringify baseval))))
|
|
245
|
+
|
|
246
|
+
;; Explicitly null: satisfied only by a present null.
|
|
247
|
+
(= u/NULLMARK check)
|
|
248
|
+
(when-not (or (nil? baseval) (= u/NULLMARK baseval))
|
|
249
|
+
(throw (fail label index entry (str "expected null at " at)
|
|
250
|
+
"null" (u/stringify baseval))))
|
|
251
|
+
|
|
252
|
+
;; Explicitly present: any present value, including null.
|
|
253
|
+
(= u/EXISTSMARK check)
|
|
254
|
+
(when (u/isabsent baseval)
|
|
255
|
+
(throw (fail label index entry (str "expected present at " at)
|
|
256
|
+
"present" "absent")))
|
|
257
|
+
|
|
258
|
+
;; Identical values match. This sits below the sentinel branches
|
|
259
|
+
;; on purpose - see the note above.
|
|
260
|
+
(u/deepequal check baseval) nil
|
|
261
|
+
|
|
262
|
+
;; A concrete expectation never matches a missing key - a match
|
|
263
|
+
;; leaf against an absent value must fail, not substring-match
|
|
264
|
+
;; the text "undefined".
|
|
265
|
+
(u/isabsent baseval)
|
|
266
|
+
(throw (fail label index entry (str "match failed at " at)
|
|
267
|
+
(u/stringify check) "absent"))
|
|
268
|
+
|
|
269
|
+
(not (matchval check baseval))
|
|
270
|
+
(throw (fail label index entry (str "match failed at " at)
|
|
271
|
+
(u/stringify check) (u/stringify baseval)))))))))
|
|
272
|
+
|
|
273
|
+
(defn- checkresult [label index entry args res]
|
|
274
|
+
(let [entryerr (get entry "err")
|
|
275
|
+
check (get entry "match")]
|
|
276
|
+
|
|
277
|
+
(when (some? entryerr)
|
|
278
|
+
(throw (fail label index entry "expected error did not occur"
|
|
279
|
+
(u/stringify entryerr) (u/stringify res))))
|
|
280
|
+
|
|
281
|
+
(when (some? check)
|
|
282
|
+
(match label index entry check
|
|
283
|
+
(array-map "in" (get entry "in")
|
|
284
|
+
"args" (vec args)
|
|
285
|
+
"out" (get entry "res")
|
|
286
|
+
"ctx" (get entry "ctx"))))
|
|
287
|
+
|
|
288
|
+
(let [out (get entry "out")]
|
|
289
|
+
(cond
|
|
290
|
+
(u/deepequal res out) nil
|
|
291
|
+
|
|
292
|
+
;; NOTE: a match with no explicit out is a complete check on its own.
|
|
293
|
+
(and (some? check) (or (nil? out) (= u/NULLMARK out))) nil
|
|
294
|
+
|
|
295
|
+
:else (throw (fail label index entry "result mismatch"
|
|
296
|
+
(u/stringify out) (u/stringify res)))))))
|
|
297
|
+
|
|
298
|
+
(defn- handleerror [label index entry err provider]
|
|
299
|
+
(let [entryerr (get entry "err")]
|
|
300
|
+
(if (some? entryerr)
|
|
301
|
+
(if (or (true? entryerr) (matchval entryerr (errmessage err)))
|
|
302
|
+
(when-let [check (get entry "match")]
|
|
303
|
+
(match label index entry check
|
|
304
|
+
(array-map "in" (get entry "in")
|
|
305
|
+
"out" (get entry "res")
|
|
306
|
+
"ctx" (get entry "ctx")
|
|
307
|
+
"err" (errbase err provider))))
|
|
308
|
+
(throw (fail label index entry "error mismatch"
|
|
309
|
+
(u/stringify entryerr) (errmessage err))))
|
|
310
|
+
(throw (fail label index entry "unexpected error" nil (errmessage err))))))
|
|
311
|
+
|
|
312
|
+
;; Build the argument list: `ctx`, `args`, or `in`. A leading map argument
|
|
313
|
+
;; is passed through `provider.contextify` and has the active client
|
|
314
|
+
;; attached under `client`, mirroring canonical resolveargs.
|
|
315
|
+
(defn- resolveargs [entry provider client]
|
|
316
|
+
(let [hasctx (contains? entry "ctx")
|
|
317
|
+
hasargs (contains? entry "args")
|
|
318
|
+
args (cond
|
|
319
|
+
hasctx [(get entry "ctx")]
|
|
320
|
+
hasargs (let [raw (get entry "args")] (if (u/islist raw) (vec raw) [raw]))
|
|
321
|
+
;; ABSENT, not nil, when the entry supplies no `in`: a Clojure
|
|
322
|
+
;; map read answers nil for a missing key and for an authored
|
|
323
|
+
;; `in: null` alike, and the corpus distinguishes them -
|
|
324
|
+
;; struct's `minor/typify` has both `{in: null, out: <T_null>}`
|
|
325
|
+
;; and `{out: <T_noval>}` (register 4.12). The typed ports get
|
|
326
|
+
;; this for free because their map read returns their own
|
|
327
|
+
;; absent marker; the dynamic ones have to say it.
|
|
328
|
+
:else [(u/clone (if (contains? entry "in") (get entry "in") u/ABSENT))])]
|
|
329
|
+
|
|
330
|
+
(if (and (or hasctx hasargs) (seq args) (u/ismap (first args)))
|
|
331
|
+
(let [contextify (:contextify provider)
|
|
332
|
+
first-arg (if contextify (contextify (first args)) (first args))
|
|
333
|
+
;; contextify may hand back something other than a map; only a
|
|
334
|
+
;; map gets the client attached, mirroring canonical's second
|
|
335
|
+
;; ismap(first) guard.
|
|
336
|
+
first-arg (if (u/ismap first-arg) (assoc first-arg "client" client) first-arg)]
|
|
337
|
+
[(assoc args 0 first-arg) (assoc entry "ctx" first-arg)])
|
|
338
|
+
[args entry])))
|
|
339
|
+
|
|
340
|
+
;; `argsmode` true means the subject returns `[args result]` rather than just
|
|
341
|
+
;; a result, so `match.args` can see what it did with its arguments. Clojure's
|
|
342
|
+
;; own data is immutable and a consumer's nodes are its own (struct/clojure
|
|
343
|
+
;; keeps java.util.LinkedHashMap / ArrayList), so returning them alongside the
|
|
344
|
+
;; result is the only channel there is. See `runsetflags-args`.
|
|
345
|
+
(defn- run-set-flags [runpack testspec flags testsubject & [argsmode]]
|
|
346
|
+
(let [{:keys [spec subject provider clients name specversion]} runpack
|
|
347
|
+
donull (if (contains? flags :null) (boolean (:null flags)) true)
|
|
348
|
+
label (or (:name flags) (if (string/blank? name) "set" name))
|
|
349
|
+
usesubject (or testsubject subject)]
|
|
350
|
+
|
|
351
|
+
(when (nil? usesubject)
|
|
352
|
+
(throw (omni-error (str "omni: no test subject for: " label))))
|
|
353
|
+
|
|
354
|
+
(let [testspecmap (fixjson testspec donull)
|
|
355
|
+
testset (get testspecmap "set")]
|
|
356
|
+
|
|
357
|
+
(when-not (u/islist testset)
|
|
358
|
+
(throw (omni-error (str "omni: test spec has no set: " label))))
|
|
359
|
+
|
|
360
|
+
(when (<= 1 specversion)
|
|
361
|
+
(checkset label testspec testset))
|
|
362
|
+
|
|
363
|
+
(doseq [[index rawentry] (map-indexed vector testset)]
|
|
364
|
+
(when-not (u/ismap rawentry)
|
|
365
|
+
(throw (omni-error (str "omni: " label "[" index "]: entry is not a map"))))
|
|
366
|
+
|
|
367
|
+
;; An entry with no `out` expects a null (or absent) result.
|
|
368
|
+
(let [entry (if (and donull (nil? (get rawentry "out")))
|
|
369
|
+
(assoc rawentry "out" u/NULLMARK)
|
|
370
|
+
rawentry)
|
|
371
|
+
|
|
372
|
+
clientname (get entry "client")
|
|
373
|
+
client (when (some? clientname)
|
|
374
|
+
(or (get clients clientname)
|
|
375
|
+
(throw (omni-error (str "omni: unknown client: " clientname) entry))))
|
|
376
|
+
|
|
377
|
+
entrysubject (or (when client ((or (:subject client) (constantly nil)) name))
|
|
378
|
+
usesubject)
|
|
379
|
+
|
|
380
|
+
[args withctx] (resolveargs entry provider (or client provider))]
|
|
381
|
+
|
|
382
|
+
(try
|
|
383
|
+
(let [outcome (entrysubject args)
|
|
384
|
+
callargs (if argsmode (vec (first outcome)) args)
|
|
385
|
+
rawres (if argsmode (second outcome) outcome)
|
|
386
|
+
res (fixjson rawres donull)
|
|
387
|
+
done (assoc withctx "res" res)]
|
|
388
|
+
(checkresult label index done callargs res))
|
|
389
|
+
(catch Throwable err
|
|
390
|
+
(if (omni-error? err)
|
|
391
|
+
(throw err)
|
|
392
|
+
(handleerror label index withctx err provider)))))))))
|
|
393
|
+
|
|
394
|
+
;; What a runner returns for one named spec section.
|
|
395
|
+
(defn- make-runpack [spec subject provider clients name specversion]
|
|
396
|
+
(let [runpack {:spec spec :subject subject :provider provider
|
|
397
|
+
:clients clients :name name :client provider :specversion specversion}]
|
|
398
|
+
(assoc runpack
|
|
399
|
+
:set (fn [setname] (get spec setname))
|
|
400
|
+
:runsetflags (fn [testspec flags testsubject]
|
|
401
|
+
(run-set-flags runpack testspec flags testsubject))
|
|
402
|
+
;; Everything :runsetflags does, for a subject that returns
|
|
403
|
+
;; `[args result]`. Separate from :runsetflags rather than
|
|
404
|
+
;; replacing it, so no consumer breaks for a capability most
|
|
405
|
+
;; subjects do not need. omni-rust, -cpp, -ocaml, -elixir and
|
|
406
|
+
;; -haskell carry the same second entry point (#23, #25, #26,
|
|
407
|
+
;; #27, #28).
|
|
408
|
+
:runsetflags-args (fn [testspec flags testsubject]
|
|
409
|
+
(run-set-flags runpack testspec flags testsubject true))
|
|
410
|
+
:runset (fn [testspec testsubject]
|
|
411
|
+
(run-set-flags runpack testspec {} testsubject)))))
|
|
412
|
+
|
|
413
|
+
;; Make a runner for a spec file path (or spec value) and a provider.
|
|
414
|
+
(defn make-runner
|
|
415
|
+
([specref] (make-runner specref {}))
|
|
416
|
+
([specref provider]
|
|
417
|
+
;; Resolved once, right after the spec is loaded, so a bad version or an
|
|
418
|
+
;; unsupported capability fails fast - before any runner name is even
|
|
419
|
+
;; resolved, let alone any test run.
|
|
420
|
+
(let [alltests (if (string? specref) (loadspec specref) specref)
|
|
421
|
+
specversion (resolveversion alltests)]
|
|
422
|
+
(fn runner
|
|
423
|
+
([name] (runner name nil))
|
|
424
|
+
([name store]
|
|
425
|
+
(let [spec (resolvespec name alltests)
|
|
426
|
+
defclient (get-in spec ["DEF" "client"])
|
|
427
|
+
clientmaker (:client provider)
|
|
428
|
+
|
|
429
|
+
;; A spec may define clients that a run never references.
|
|
430
|
+
clients (if (and (u/ismap defclient) clientmaker)
|
|
431
|
+
(reduce-kv
|
|
432
|
+
(fn [out clientname cdef]
|
|
433
|
+
(let [copts (or (get-in cdef ["test" "options"]) (array-map))
|
|
434
|
+
injector (:inject provider)
|
|
435
|
+
copts (if (and injector (u/ismap store))
|
|
436
|
+
(injector copts store)
|
|
437
|
+
copts)]
|
|
438
|
+
(assoc out clientname (clientmaker copts))))
|
|
439
|
+
{}
|
|
440
|
+
defclient)
|
|
441
|
+
{})
|
|
442
|
+
|
|
443
|
+
subject (when-let [resolve-subject (:subject provider)] (resolve-subject name))]
|
|
444
|
+
|
|
445
|
+
(make-runpack spec subject provider clients name specversion)))))))
|