@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
|
@@ -1,208 +1,48 @@
|
|
|
1
1
|
(* Struct corpus: drives test.json -> "struct" through the vendored
|
|
2
|
-
* Voxgig_struct implementation
|
|
3
|
-
*
|
|
2
|
+
* Voxgig_struct implementation, on the vendored @voxgig/omni engine.
|
|
3
|
+
*
|
|
4
|
+
* The engine is NOT in this file and is not hand-written any more: every
|
|
5
|
+
* group below is handed to omni through Omni_resolver (which supersedes the
|
|
6
|
+
* retired test/corpus_runner.ml). What remains here is what actually belongs
|
|
7
|
+
* to this SDK — which corpus group drives which struct function, and how.
|
|
4
8
|
*)
|
|
5
9
|
|
|
6
10
|
open Voxgig_struct
|
|
7
|
-
open Corpus_runner
|
|
8
11
|
|
|
9
|
-
|
|
12
|
+
module O = Omni
|
|
13
|
+
module R = Omni_resolver
|
|
14
|
+
|
|
15
|
+
(* ---------------- subjects that need more than one expression -------- *)
|
|
10
16
|
|
|
11
17
|
let null_modifier v key parent _inj =
|
|
12
|
-
if v = Str nullmark then ignore (setprop parent key Null)
|
|
18
|
+
if v = Str R.nullmark then ignore (setprop parent key Null)
|
|
13
19
|
else (match v with Str s -> ignore (setprop parent key (Str (
|
|
14
20
|
(* replace __NULL__ with null *)
|
|
15
21
|
let b = Buffer.create (String.length s) in
|
|
16
|
-
let nl = String.length nullmark in let n = String.length s in let i = ref 0 in
|
|
22
|
+
let nl = String.length R.nullmark in let n = String.length s in let i = ref 0 in
|
|
17
23
|
while !i < n do
|
|
18
|
-
if !i + nl <= n && String.sub s !i nl = nullmark then (Buffer.add_string b "null"; i := !i + nl)
|
|
24
|
+
if !i + nl <= n && String.sub s !i nl = R.nullmark then (Buffer.add_string b "null"; i := !i + nl)
|
|
19
25
|
else (Buffer.add_char b s.[!i]; incr i)
|
|
20
26
|
done; Buffer.contents b)))
|
|
21
27
|
| _ -> ())
|
|
22
28
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
run_set "minor.isfunc" (mg "isfunc") (arg1 (fun v -> Bool (isfunc v)));
|
|
39
|
-
run_set "minor.clone" ~flags:["null", false] (mg "clone") (arg1 clone);
|
|
40
|
-
run_set "minor.escre" (mg "escre") (arg1 escre);
|
|
41
|
-
run_set "minor.escurl" (mg "escurl") (arg1 escurl);
|
|
42
|
-
run_set "minor.stringify" ~flags:["null", false] (mg "stringify")
|
|
43
|
-
(arg1 (fun vin -> if vhas vin "val" then Str (stringify ~maxlen:(vget vin "max") (vget vin "val")) else Str (stringify Noval)));
|
|
44
|
-
run_set "minor.jsonify" ~flags:["null", false] (mg "jsonify")
|
|
45
|
-
(arg1 (fun vin -> Str (jsonify ~flags:(vget vin "flags") (vget vin "val"))));
|
|
46
|
-
run_set "minor.getelem" ~flags:["null", false] (mg "getelem")
|
|
47
|
-
(arg1 (fun vin -> let alt = vget vin "alt" in
|
|
48
|
-
if is_nullish alt then getelem (vget vin "val") (vget vin "key")
|
|
49
|
-
else getelem ~alt (vget vin "val") (vget vin "key")));
|
|
50
|
-
run_set "minor.delprop" (mg "delprop")
|
|
51
|
-
(arg1 (fun vin -> delprop (vget vin "parent") (vget vin "key")));
|
|
52
|
-
run_set "minor.size" ~flags:["null", false] (mg "size") (arg1 (fun v -> vint (size v)));
|
|
53
|
-
run_set "minor.slice" ~flags:["null", false] (mg "slice")
|
|
54
|
-
(arg1 (fun vin -> slice ~start:(vget vin "start") ~stop:(vget vin "end") (vget vin "val")));
|
|
55
|
-
run_set "minor.pad" ~flags:["null", false] (mg "pad")
|
|
56
|
-
(arg1 (fun vin -> Str (pad ~padding:(vget vin "pad") ~padchar:(vget vin "char") (vget vin "val"))));
|
|
57
|
-
run_set "minor.pathify" ~flags:["null", false] (mg "pathify")
|
|
58
|
-
(arg1 (fun vin -> if vhas vin "path" then Str (pathify ~startin:(vget vin "from") (vget vin "path"))
|
|
59
|
-
else Str (pathify ~startin:(vget vin "from") ~absent:true Noval)));
|
|
60
|
-
run_set "minor.items" (mg "items") (arg1 items);
|
|
61
|
-
run_set "minor.getprop" ~flags:["null", false] (mg "getprop")
|
|
62
|
-
(arg1 (fun vin -> let alt = vget vin "alt" in
|
|
63
|
-
if is_nullish alt then getprop (vget vin "val") (vget vin "key")
|
|
64
|
-
else getprop ~alt (vget vin "val") (vget vin "key")));
|
|
65
|
-
run_set "minor.setprop" (mg "setprop")
|
|
66
|
-
(arg1 (fun vin -> setprop (vget vin "parent") (vget vin "key") (vget vin "val")));
|
|
67
|
-
run_set "minor.haskey" ~flags:["null", false] (mg "haskey")
|
|
68
|
-
(arg1 (fun vin -> Bool (haskey (vget vin "src") (vget vin "key"))));
|
|
69
|
-
run_set "minor.keysof" (mg "keysof") (arg1 (fun v -> lst (List.map (fun s -> Str s) (keysof v))));
|
|
70
|
-
run_set "minor.join" ~flags:["null", false] (mg "join")
|
|
71
|
-
(arg1 (fun vin -> Str (join ~sep:(vget vin "sep") ~url:(match vget vin "url" with Bool true -> true | _ -> false) (vget vin "val"))));
|
|
72
|
-
run_set "minor.typify" ~flags:["null", false] (mg "typify") (arg1 (fun v -> vint (typify v)));
|
|
73
|
-
run_set "minor.setpath" ~flags:["null", false] (mg "setpath")
|
|
74
|
-
(arg1 (fun vin -> setpath (vget vin "store") (vget vin "path") (vget vin "val")));
|
|
75
|
-
run_set "minor.filter" (mg "filter")
|
|
76
|
-
(arg1 (fun vin -> let check = (match vget vin "check" with
|
|
77
|
-
| Str "gt3" -> (fun (_, x) -> match x with Num n -> n > 3.0 | _ -> false)
|
|
78
|
-
| Str "lt3" -> (fun (_, x) -> match x with Num n -> n < 3.0 | _ -> false)
|
|
79
|
-
| _ -> (fun _ -> false)) in
|
|
80
|
-
filter (vget vin "val") check));
|
|
81
|
-
run_set "minor.typename" (mg "typename") (arg1 (fun v -> Str (typename (match v with Num n -> int_of_float n | _ -> 0))));
|
|
82
|
-
run_set "minor.flatten" (mg "flatten")
|
|
83
|
-
(arg1 (fun vin -> flatten ?depth:(match vget vin "depth" with Num n -> Some (int_of_float n) | _ -> None) (vget vin "val")));
|
|
84
|
-
|
|
85
|
-
(* walk *)
|
|
86
|
-
run_walk_log "walk.log" (getprop_raw_pub walks "log");
|
|
87
|
-
run_set "walk.basic" (getprop_raw_pub walks "basic")
|
|
88
|
-
(arg1 (fun vin -> walk ~after:(fun _k v _p path ->
|
|
89
|
-
match v with Str s -> Str (s ^ "~" ^ String.concat "." (List.map js_string (match path with List r -> !r | _ -> []))) | _ -> v) vin));
|
|
90
|
-
run_set "walk.copy" (getprop_raw_pub walks "copy") (arg1 walk_copy_subject);
|
|
91
|
-
run_set "walk.depth" ~flags:["null", false] (getprop_raw_pub walks "depth") (arg1 walk_depth_subject);
|
|
92
|
-
|
|
93
|
-
(* merge *)
|
|
94
|
-
run_single "merge.basic" (getprop_raw_pub merges "basic") (fun in_ -> merge (clone in_));
|
|
95
|
-
run_set "merge.cases" (getprop_raw_pub merges "cases") (arg1 merge);
|
|
96
|
-
run_set "merge.array" (getprop_raw_pub merges "array") (arg1 merge);
|
|
97
|
-
run_set "merge.integrity" (getprop_raw_pub merges "integrity") (arg1 merge);
|
|
98
|
-
run_set "merge.depth" (getprop_raw_pub merges "depth")
|
|
99
|
-
(arg1 (fun vin -> merge ~maxdepth:(vget vin "depth") (vget vin "val")));
|
|
100
|
-
|
|
101
|
-
(* getpath *)
|
|
102
|
-
run_set "getpath.basic" (getprop_raw_pub getpaths "basic")
|
|
103
|
-
(arg1 (fun vin -> getpath (vget vin "store") (vget vin "path")));
|
|
104
|
-
run_set "getpath.relative" (getprop_raw_pub getpaths "relative")
|
|
105
|
-
(arg1 (fun vin ->
|
|
106
|
-
let dpath = (match vget vin "dpath" with Str s -> lst (List.map (fun x -> Str x) (String.split_on_char '.' s)) | _ -> Noval) in
|
|
107
|
-
let d = { (default_injdef_pub ()) with d_dparent = vget vin "dparent"; d_dpath = dpath } in
|
|
108
|
-
getpath ~inj:(IDef d) (vget vin "store") (vget vin "path")));
|
|
109
|
-
run_set "getpath.special" (getprop_raw_pub getpaths "special")
|
|
110
|
-
(arg1 (fun vin ->
|
|
111
|
-
let injm = vget vin "inj" in
|
|
112
|
-
let d = { (default_injdef_pub ()) with
|
|
113
|
-
d_base = getprop injm (Str "base"); d_meta = getprop injm (Str "meta");
|
|
114
|
-
d_dparent = getprop injm (Str "dparent"); d_dpath = getprop injm (Str "dpath");
|
|
115
|
-
d_key = getprop injm (Str "key") } in
|
|
116
|
-
getpath ~inj:(if is_nullish injm then INone else IDef d) (vget vin "store") (vget vin "path")));
|
|
117
|
-
run_set "getpath.handler" (getprop_raw_pub getpaths "handler")
|
|
118
|
-
(arg1 (fun vin ->
|
|
119
|
-
let store = omap_v ["$TOP", vget vin "store"; "$FOO", Func (fun _ _ _ _ -> Str "foo")] in
|
|
120
|
-
let d = { (default_injdef_pub ()) with d_handler = Some (fun _inj v _ref _store -> match v with Func f -> f (Obj.magic 0) Noval "" Noval | _ -> v) } in
|
|
121
|
-
getpath ~inj:(IDef d) store (vget vin "path")));
|
|
122
|
-
|
|
123
|
-
(* inject *)
|
|
124
|
-
run_single "inject.basic" (getprop_raw_pub injects "basic")
|
|
125
|
-
(fun in_ -> inject (clone (getprop_raw_pub in_ "val")) (clone (getprop_raw_pub in_ "store")));
|
|
126
|
-
run_set "inject.string" (getprop_raw_pub injects "string")
|
|
127
|
-
(arg1 (fun vin ->
|
|
128
|
-
let d = { (default_injdef_pub ()) with d_modify = Some null_modifier; d_extra = vget vin "current" } in
|
|
129
|
-
inject ~inj:(IDef d) (vget vin "val") (vget vin "store")));
|
|
130
|
-
run_set "inject.deep" (getprop_raw_pub injects "deep")
|
|
131
|
-
(arg1 (fun vin -> inject (vget vin "val") (vget vin "store")));
|
|
132
|
-
|
|
133
|
-
(* transform *)
|
|
134
|
-
run_single "transform.basic" (getprop_raw_pub transforms "basic")
|
|
135
|
-
(fun in_ -> transform (getprop_raw_pub in_ "data") (getprop_raw_pub in_ "spec"));
|
|
136
|
-
List.iter (fun gn ->
|
|
137
|
-
run_set ("transform." ^ gn) (getprop_raw_pub transforms gn)
|
|
138
|
-
(arg1 (fun vin -> transform (vget vin "data") (vget vin "spec"))))
|
|
139
|
-
["paths"; "cmds"; "each"; "pack"; "ref"];
|
|
140
|
-
run_set "transform.modify" (getprop_raw_pub transforms "modify")
|
|
141
|
-
(arg1 (fun vin ->
|
|
142
|
-
let d = { (default_injdef_pub ()) with
|
|
143
|
-
d_modify = Some (fun v key parent _inj ->
|
|
144
|
-
(match v with Str s when not (is_nullish key) && not (is_nullish parent) -> ignore (setprop parent key (Str ("@" ^ s))) | _ -> ()));
|
|
145
|
-
d_extra = vget vin "store" } in
|
|
146
|
-
transform ~inj:(IDef d) (vget vin "data") (vget vin "spec")));
|
|
147
|
-
run_set "transform.format" ~flags:["null", false] (getprop_raw_pub transforms "format")
|
|
148
|
-
(arg1 (fun vin -> transform (vget vin "data") (vget vin "spec")));
|
|
149
|
-
run_set "transform.apply" (getprop_raw_pub transforms "apply")
|
|
150
|
-
(arg1 (fun vin -> transform (vget vin "data") (vget vin "spec")));
|
|
151
|
-
|
|
152
|
-
(* validate *)
|
|
153
|
-
run_set "validate.basic" ~flags:["null", false] (getprop_raw_pub validates "basic")
|
|
154
|
-
(arg1 (fun vin -> validate (vget vin "data") (vget vin "spec")));
|
|
155
|
-
List.iter (fun gn ->
|
|
156
|
-
run_set ("validate." ^ gn) (getprop_raw_pub validates gn)
|
|
157
|
-
(arg1 (fun vin -> validate (vget vin "data") (vget vin "spec"))))
|
|
158
|
-
["child"; "one"; "exact"];
|
|
159
|
-
run_set "validate.invalid" ~flags:["null", false] (getprop_raw_pub validates "invalid")
|
|
160
|
-
(arg1 (fun vin -> validate (vget vin "data") (vget vin "spec")));
|
|
161
|
-
run_set "validate.special" (getprop_raw_pub validates "special")
|
|
162
|
-
(arg1 (fun vin ->
|
|
163
|
-
let injm = vget vin "inj" in
|
|
164
|
-
let d = { (default_injdef_pub ()) with d_meta = getprop injm (Str "meta") } in
|
|
165
|
-
validate ~inj:(if is_nullish injm then INone else IDef d) (vget vin "data") (vget vin "spec")));
|
|
166
|
-
|
|
167
|
-
(* select *)
|
|
168
|
-
List.iter (fun gn ->
|
|
169
|
-
run_set ("select." ^ gn) (getprop_raw_pub selects gn)
|
|
170
|
-
(arg1 (fun vin -> select (vget vin "obj") (vget vin "query"))))
|
|
171
|
-
["basic"; "operators"; "edge"; "alts"];
|
|
29
|
+
(* walk/log is authored as one {in, out} pair whose `out.after` is the log of
|
|
30
|
+
* an after-walk. The subject builds that log and returns it; Omni_resolver's
|
|
31
|
+
* `single ~out:["after"]` selects the half the corpus asserts on. *)
|
|
32
|
+
let walk_log_subject vin =
|
|
33
|
+
let log = empty_list () in
|
|
34
|
+
let walklog key v parent path =
|
|
35
|
+
ignore (setprop log (Num (float_of_int (size log)))
|
|
36
|
+
(Str (Printf.sprintf "k=%s, v=%s, p=%s, t=%s"
|
|
37
|
+
(if is_nullish key then stringify Noval else stringify key)
|
|
38
|
+
(stringify v)
|
|
39
|
+
(if is_nullish parent then stringify Noval else stringify parent)
|
|
40
|
+
(pathify path))));
|
|
41
|
+
v in
|
|
42
|
+
ignore (walk ~after:walklog vin);
|
|
43
|
+
log
|
|
172
44
|
|
|
173
|
-
|
|
174
|
-
run_set "sentinels.getprop_unify" ~flags:["null", false] (getprop_raw_pub sentinels "getprop_unify")
|
|
175
|
-
(arg1 (fun vin -> getprop ~alt:(vget vin "alt") (vget vin "val") (vget vin "key")));
|
|
176
|
-
run_set "sentinels.getelem_absent" ~flags:["null", false] (getprop_raw_pub sentinels "getelem_absent")
|
|
177
|
-
(arg1 (fun vin -> getelem ~alt:(vget vin "alt") (vget vin "val") (vget vin "key")));
|
|
178
|
-
run_set "sentinels.haskey_unify" ~flags:["null", false] (getprop_raw_pub sentinels "haskey_unify")
|
|
179
|
-
(arg1 (fun vin -> Bool (haskey (vget vin "val") (vget vin "key"))));
|
|
180
|
-
run_set "sentinels.isempty_unify" ~flags:["null", false] (getprop_raw_pub sentinels "isempty_unify")
|
|
181
|
-
(arg1 (fun v -> Bool (isempty v)));
|
|
182
|
-
run_set "sentinels.isnode_unify" ~flags:["null", false] (getprop_raw_pub sentinels "isnode_unify")
|
|
183
|
-
(arg1 (fun v -> Bool (isnode v)));
|
|
184
|
-
run_set "sentinels.stringify_null" ~flags:["null", false] (getprop_raw_pub sentinels "stringify_null")
|
|
185
|
-
(arg1 (fun vin -> Str (stringify vin)))
|
|
186
|
-
|
|
187
|
-
and run_walk_log group node =
|
|
188
|
-
try
|
|
189
|
-
let test_data = clone node in
|
|
190
|
-
let log = empty_list () in
|
|
191
|
-
let walklog key v parent path =
|
|
192
|
-
ignore (setprop log (Num (float_of_int (size log)))
|
|
193
|
-
(Str (Printf.sprintf "k=%s, v=%s, p=%s, t=%s"
|
|
194
|
-
(if is_nullish key then stringify Noval else stringify key)
|
|
195
|
-
(stringify v)
|
|
196
|
-
(if is_nullish parent then stringify Noval else stringify parent)
|
|
197
|
-
(pathify path))));
|
|
198
|
-
v in
|
|
199
|
-
ignore (walk ~after:walklog (getprop_raw_pub test_data "in"));
|
|
200
|
-
let expected = getprop (getprop_raw_pub test_data "out") (Str "after") in
|
|
201
|
-
if eqv expected log then record group "log" true ""
|
|
202
|
-
else record group "log" false (Printf.sprintf "Expected: %s, got: %s" (stringify expected) (stringify log))
|
|
203
|
-
with e -> record group "log" false (match e with Struct_error m -> m | _ -> Printexc.to_string e)
|
|
204
|
-
|
|
205
|
-
and walk_copy_subject vin =
|
|
45
|
+
let walk_copy_subject vin =
|
|
206
46
|
let cur = ref (lst [Noval]) in
|
|
207
47
|
let walkcopy key v _parent path =
|
|
208
48
|
if is_nullish key then begin
|
|
@@ -222,7 +62,7 @@ and walk_copy_subject vin =
|
|
|
222
62
|
ignore (walk ~before:walkcopy vin);
|
|
223
63
|
getelem !cur (Num 0.0)
|
|
224
64
|
|
|
225
|
-
|
|
65
|
+
let walk_depth_subject vin =
|
|
226
66
|
let top = ref Noval and curr = ref Noval in
|
|
227
67
|
let copy key v _parent _path =
|
|
228
68
|
(if is_nullish key || isnode v then begin
|
|
@@ -231,20 +71,204 @@ and walk_depth_subject vin =
|
|
|
231
71
|
else (ignore (setprop !curr key child); curr := child)
|
|
232
72
|
end else ignore (setprop !curr key v));
|
|
233
73
|
v in
|
|
234
|
-
ignore (walk ~before:copy ~maxdepth:(
|
|
74
|
+
ignore (walk ~before:copy ~maxdepth:(R.getp vin "maxdepth") (R.getp vin "src"));
|
|
235
75
|
!top
|
|
236
76
|
|
|
77
|
+
(* ---------------- test groups ---------------- *)
|
|
78
|
+
|
|
79
|
+
let run_all (r : R.run) =
|
|
80
|
+
let g k = O.jget (R.spec r) k in
|
|
81
|
+
let minor = g "minor" and walks = g "walk" and merges = g "merge"
|
|
82
|
+
and getpaths = g "getpath" and injects = g "inject" and transforms = g "transform"
|
|
83
|
+
and validates = g "validate" and selects = g "select" and nullsem = g "nullsem" in
|
|
84
|
+
let mg n = O.jget minor n in
|
|
85
|
+
let set = R.runset r in
|
|
86
|
+
|
|
87
|
+
(* minor *)
|
|
88
|
+
set "minor.isnode" (mg "isnode") (fun v -> Bool (isnode v));
|
|
89
|
+
set "minor.ismap" (mg "ismap") (fun v -> Bool (ismap v));
|
|
90
|
+
set "minor.islist" (mg "islist") (fun v -> Bool (islist v));
|
|
91
|
+
set ~nullflag:false "minor.iskey" (mg "iskey") (fun v -> Bool (iskey v));
|
|
92
|
+
set ~nullflag:false "minor.strkey" (mg "strkey") (fun v -> Str (strkey ~key:v ()));
|
|
93
|
+
set ~nullflag:false "minor.isempty" (mg "isempty") (fun v -> Bool (isempty v));
|
|
94
|
+
set "minor.isfunc" (mg "isfunc") (fun v -> Bool (isfunc v));
|
|
95
|
+
set ~nullflag:false "minor.clone" (mg "clone") clone;
|
|
96
|
+
set "minor.escre" (mg "escre") escre;
|
|
97
|
+
set "minor.escurl" (mg "escurl") escurl;
|
|
98
|
+
set ~nullflag:false "minor.stringify" (mg "stringify")
|
|
99
|
+
(fun vin -> if R.hasp vin "val" then Str (stringify ~maxlen:(R.getp vin "max") (R.getp vin "val"))
|
|
100
|
+
else Str (stringify Noval));
|
|
101
|
+
set ~nullflag:false "minor.jsonify" (mg "jsonify")
|
|
102
|
+
(fun vin -> Str (jsonify ~flags:(R.getp vin "flags") (R.getp vin "val")));
|
|
103
|
+
(* `alt` is read by PRESENCE, not by nullishness: two `minor/getprop`
|
|
104
|
+
* entries pass an EXPLICIT null alt and expect it back, and treating that
|
|
105
|
+
* as "no alt given" answers no-value instead. The retired hand-written
|
|
106
|
+
* runner hid it — its `eqv` matched Noval against Null — which is exactly
|
|
107
|
+
* the leniency the vendored engine does not have. Kept identical in both
|
|
108
|
+
* lanes (as go's `hasAlt` is) so they cannot drift. *)
|
|
109
|
+
set ~nullflag:false "minor.getelem" (mg "getelem")
|
|
110
|
+
(fun vin -> if R.hasp vin "alt" then getelem ~alt:(R.getp vin "alt") (R.getp vin "val") (R.getp vin "key")
|
|
111
|
+
else getelem (R.getp vin "val") (R.getp vin "key"));
|
|
112
|
+
set "minor.delprop" (mg "delprop")
|
|
113
|
+
(fun vin -> delprop (R.getp vin "parent") (R.getp vin "key"));
|
|
114
|
+
set ~nullflag:false "minor.size" (mg "size") (fun v -> vint (size v));
|
|
115
|
+
set ~nullflag:false "minor.slice" (mg "slice")
|
|
116
|
+
(fun vin -> slice ~start:(R.getp vin "start") ~stop:(R.getp vin "end") (R.getp vin "val"));
|
|
117
|
+
set ~nullflag:false "minor.pad" (mg "pad")
|
|
118
|
+
(fun vin -> Str (pad ~padding:(R.getp vin "pad") ~padchar:(R.getp vin "char") (R.getp vin "val")));
|
|
119
|
+
set ~nullflag:false "minor.pathify" (mg "pathify")
|
|
120
|
+
(fun vin -> if R.hasp vin "path" then Str (pathify ~startin:(R.getp vin "from") (R.getp vin "path"))
|
|
121
|
+
else Str (pathify ~startin:(R.getp vin "from") ~absent:true Noval));
|
|
122
|
+
set "minor.items" (mg "items") items;
|
|
123
|
+
set ~nullflag:false "minor.getprop" (mg "getprop")
|
|
124
|
+
(fun vin -> if R.hasp vin "alt" then getprop ~alt:(R.getp vin "alt") (R.getp vin "val") (R.getp vin "key")
|
|
125
|
+
else getprop (R.getp vin "val") (R.getp vin "key"));
|
|
126
|
+
set "minor.setprop" (mg "setprop")
|
|
127
|
+
(fun vin -> setprop (R.getp vin "parent") (R.getp vin "key") (R.getp vin "val"));
|
|
128
|
+
set ~nullflag:false "minor.haskey" (mg "haskey")
|
|
129
|
+
(fun vin -> Bool (haskey (R.getp vin "src") (R.getp vin "key")));
|
|
130
|
+
set "minor.keysof" (mg "keysof") (fun v -> lst (List.map (fun s -> Str s) (keysof v)));
|
|
131
|
+
set ~nullflag:false "minor.join" (mg "join")
|
|
132
|
+
(fun vin -> Str (join ~sep:(R.getp vin "sep")
|
|
133
|
+
~url:(match R.getp vin "url" with Bool true -> true | _ -> false)
|
|
134
|
+
(R.getp vin "val")));
|
|
135
|
+
set ~nullflag:false "minor.typify" (mg "typify") (fun v -> vint (typify v));
|
|
136
|
+
set ~nullflag:false "minor.setpath" (mg "setpath")
|
|
137
|
+
(fun vin -> setpath (R.getp vin "store") (R.getp vin "path") (R.getp vin "val"));
|
|
138
|
+
set "minor.filter" (mg "filter")
|
|
139
|
+
(fun vin -> let check = (match R.getp vin "check" with
|
|
140
|
+
| Str "gt3" -> (fun (_, x) -> match x with Num n -> n > 3.0 | _ -> false)
|
|
141
|
+
| Str "lt3" -> (fun (_, x) -> match x with Num n -> n < 3.0 | _ -> false)
|
|
142
|
+
| _ -> (fun _ -> false)) in
|
|
143
|
+
filter (R.getp vin "val") check);
|
|
144
|
+
set "minor.typename" (mg "typename")
|
|
145
|
+
(fun v -> Str (typename (match v with Num n -> int_of_float n | _ -> 0)));
|
|
146
|
+
set "minor.flatten" (mg "flatten")
|
|
147
|
+
(fun vin -> flatten ?depth:(match R.getp vin "depth" with Num n -> Some (int_of_float n) | _ -> None)
|
|
148
|
+
(R.getp vin "val"));
|
|
149
|
+
|
|
150
|
+
(* walk *)
|
|
151
|
+
set "walk.log" (R.single ~out:["after"] (O.jget walks "log")) walk_log_subject;
|
|
152
|
+
set "walk.basic" (O.jget walks "basic")
|
|
153
|
+
(fun vin -> walk ~after:(fun _k v _p path ->
|
|
154
|
+
match v with
|
|
155
|
+
| Str s -> Str (s ^ "~" ^ String.concat "." (List.map js_string (match path with List r -> !r | _ -> [])))
|
|
156
|
+
| _ -> v) vin);
|
|
157
|
+
set "walk.copy" (O.jget walks "copy") walk_copy_subject;
|
|
158
|
+
set ~nullflag:false "walk.depth" (O.jget walks "depth") walk_depth_subject;
|
|
159
|
+
|
|
160
|
+
(* merge *)
|
|
161
|
+
set "merge.basic" (R.single (O.jget merges "basic")) (fun v -> merge (clone v));
|
|
162
|
+
set "merge.cases" (O.jget merges "cases") merge;
|
|
163
|
+
set "merge.array" (O.jget merges "array") merge;
|
|
164
|
+
set "merge.integrity" (O.jget merges "integrity") merge;
|
|
165
|
+
set "merge.depth" (O.jget merges "depth")
|
|
166
|
+
(fun vin -> merge ~maxdepth:(R.getp vin "depth") (R.getp vin "val"));
|
|
167
|
+
|
|
168
|
+
(* getpath *)
|
|
169
|
+
set "getpath.basic" (O.jget getpaths "basic")
|
|
170
|
+
(fun vin -> getpath (R.getp vin "store") (R.getp vin "path"));
|
|
171
|
+
set "getpath.relative" (O.jget getpaths "relative")
|
|
172
|
+
(fun vin ->
|
|
173
|
+
let dpath = (match R.getp vin "dpath" with
|
|
174
|
+
| Str s -> lst (List.map (fun x -> Str x) (String.split_on_char '.' s))
|
|
175
|
+
| _ -> Noval) in
|
|
176
|
+
let d = { (R.default_injdef ()) with d_dparent = R.getp vin "dparent"; d_dpath = dpath } in
|
|
177
|
+
getpath ~inj:(IDef d) (R.getp vin "store") (R.getp vin "path"));
|
|
178
|
+
set "getpath.special" (O.jget getpaths "special")
|
|
179
|
+
(fun vin ->
|
|
180
|
+
let injm = R.getp vin "inj" in
|
|
181
|
+
let d = { (R.default_injdef ()) with
|
|
182
|
+
d_base = getprop injm (Str "base"); d_meta = getprop injm (Str "meta");
|
|
183
|
+
d_dparent = getprop injm (Str "dparent"); d_dpath = getprop injm (Str "dpath");
|
|
184
|
+
d_key = getprop injm (Str "key") } in
|
|
185
|
+
getpath ~inj:(if is_nullish injm then INone else IDef d) (R.getp vin "store") (R.getp vin "path"));
|
|
186
|
+
set "getpath.handler" (O.jget getpaths "handler")
|
|
187
|
+
(fun vin ->
|
|
188
|
+
let store = R.omap_v ["$TOP", R.getp vin "store"; "$FOO", Func (fun _ _ _ _ -> Str "foo")] in
|
|
189
|
+
let d = { (R.default_injdef ()) with
|
|
190
|
+
d_handler = Some (fun _inj v _ref _store ->
|
|
191
|
+
match v with Func f -> f (Obj.magic 0) Noval "" Noval | _ -> v) } in
|
|
192
|
+
getpath ~inj:(IDef d) store (R.getp vin "path"));
|
|
193
|
+
|
|
194
|
+
(* inject *)
|
|
195
|
+
set "inject.basic" (R.single (O.jget injects "basic"))
|
|
196
|
+
(fun vin -> inject (clone (R.getp vin "val")) (clone (R.getp vin "store")));
|
|
197
|
+
set "inject.string" (O.jget injects "string")
|
|
198
|
+
(fun vin ->
|
|
199
|
+
let d = { (R.default_injdef ()) with d_modify = Some null_modifier; d_extra = R.getp vin "current" } in
|
|
200
|
+
inject ~inj:(IDef d) (R.getp vin "val") (R.getp vin "store"));
|
|
201
|
+
set "inject.deep" (O.jget injects "deep")
|
|
202
|
+
(fun vin -> inject (R.getp vin "val") (R.getp vin "store"));
|
|
203
|
+
|
|
204
|
+
(* transform *)
|
|
205
|
+
set "transform.basic" (R.single (O.jget transforms "basic"))
|
|
206
|
+
(fun vin -> transform (R.getp vin "data") (R.getp vin "spec"));
|
|
207
|
+
List.iter (fun gn ->
|
|
208
|
+
set ("transform." ^ gn) (O.jget transforms gn)
|
|
209
|
+
(fun vin -> transform (R.getp vin "data") (R.getp vin "spec")))
|
|
210
|
+
["paths"; "cmds"; "each"; "pack"; "ref"];
|
|
211
|
+
set "transform.modify" (O.jget transforms "modify")
|
|
212
|
+
(fun vin ->
|
|
213
|
+
let d = { (R.default_injdef ()) with
|
|
214
|
+
d_modify = Some (fun v key parent _inj ->
|
|
215
|
+
(match v with
|
|
216
|
+
| Str s when not (is_nullish key) && not (is_nullish parent) ->
|
|
217
|
+
ignore (setprop parent key (Str ("@" ^ s)))
|
|
218
|
+
| _ -> ()));
|
|
219
|
+
d_extra = R.getp vin "store" } in
|
|
220
|
+
transform ~inj:(IDef d) (R.getp vin "data") (R.getp vin "spec"));
|
|
221
|
+
set ~nullflag:false "transform.format" (O.jget transforms "format")
|
|
222
|
+
(fun vin -> transform (R.getp vin "data") (R.getp vin "spec"));
|
|
223
|
+
set "transform.apply" (O.jget transforms "apply")
|
|
224
|
+
(fun vin -> transform (R.getp vin "data") (R.getp vin "spec"));
|
|
225
|
+
|
|
226
|
+
(* validate *)
|
|
227
|
+
set ~nullflag:false "validate.basic" (O.jget validates "basic")
|
|
228
|
+
(fun vin -> validate (R.getp vin "data") (R.getp vin "spec"));
|
|
229
|
+
List.iter (fun gn ->
|
|
230
|
+
set ("validate." ^ gn) (O.jget validates gn)
|
|
231
|
+
(fun vin -> validate (R.getp vin "data") (R.getp vin "spec")))
|
|
232
|
+
["child"; "one"; "exact"];
|
|
233
|
+
set ~nullflag:false "validate.invalid" (O.jget validates "invalid")
|
|
234
|
+
(fun vin -> validate (R.getp vin "data") (R.getp vin "spec"));
|
|
235
|
+
set "validate.special" (O.jget validates "special")
|
|
236
|
+
(fun vin ->
|
|
237
|
+
let injm = R.getp vin "inj" in
|
|
238
|
+
let d = { (R.default_injdef ()) with d_meta = getprop injm (Str "meta") } in
|
|
239
|
+
validate ~inj:(if is_nullish injm then INone else IDef d) (R.getp vin "data") (R.getp vin "spec"));
|
|
240
|
+
|
|
241
|
+
(* select *)
|
|
242
|
+
List.iter (fun gn ->
|
|
243
|
+
set ("select." ^ gn) (O.jget selects gn)
|
|
244
|
+
(fun vin -> select (R.getp vin "obj") (R.getp vin "query")))
|
|
245
|
+
["basic"; "operators"; "edge"; "alts"];
|
|
246
|
+
|
|
247
|
+
(* nullsem: does a PRESENT key holding a JSON null read as "no value"?
|
|
248
|
+
* Every lane runs {null: false} — the whole point of the section is the
|
|
249
|
+
* distinction the null flag would erase. `alt` is read by PRESENCE, not by
|
|
250
|
+
* nullishness: several entries pass no alt at all, and one passes a null
|
|
251
|
+
* one deliberately. (This section used to be looked up as "sentinels",
|
|
252
|
+
* a name the shipped corpus has never carried — so all six of its groups
|
|
253
|
+
* silently ran ZERO cases. Omni_resolver now names a missing group out
|
|
254
|
+
* loud, which is how that was found.) *)
|
|
255
|
+
set ~nullflag:false "nullsem.getprop" (O.jget nullsem "getprop")
|
|
256
|
+
(fun vin -> if R.hasp vin "alt" then getprop ~alt:(R.getp vin "alt") (R.getp vin "val") (R.getp vin "key")
|
|
257
|
+
else getprop (R.getp vin "val") (R.getp vin "key"));
|
|
258
|
+
set ~nullflag:false "nullsem.getelem" (O.jget nullsem "getelem")
|
|
259
|
+
(fun vin -> if R.hasp vin "alt" then getelem ~alt:(R.getp vin "alt") (R.getp vin "val") (R.getp vin "key")
|
|
260
|
+
else getelem (R.getp vin "val") (R.getp vin "key"));
|
|
261
|
+
set ~nullflag:false "nullsem.getpath" (O.jget nullsem "getpath")
|
|
262
|
+
(fun vin -> getpath (R.getp vin "store") (R.getp vin "path"));
|
|
263
|
+
set ~nullflag:false "nullsem.haskey" (O.jget nullsem "haskey")
|
|
264
|
+
(fun vin -> Bool (haskey (R.getp vin "src") (R.getp vin "key")));
|
|
265
|
+
set ~nullflag:false "nullsem.keysof" (O.jget nullsem "keysof")
|
|
266
|
+
(fun v -> lst (List.map (fun s -> Str s) (keysof v)))
|
|
267
|
+
|
|
237
268
|
(* ---------------- main ---------------- *)
|
|
238
269
|
|
|
239
270
|
let () =
|
|
240
271
|
let testfile = if Array.length Sys.argv > 1 then Sys.argv.(1) else "../.sdk/test/test.json" in
|
|
241
|
-
let
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
close_in ic;
|
|
245
|
-
let alltests = json_read raw in
|
|
246
|
-
let spec = getprop_raw_pub alltests "struct" in
|
|
247
|
-
run_all spec;
|
|
248
|
-
List.iter print_endline (List.rev !failures);
|
|
249
|
-
Printf.printf "\nPASS %d FAIL %d\n" !npass !nfail;
|
|
250
|
-
if !nfail > 0 then exit 1
|
|
272
|
+
let r = R.make_run testfile "struct" in
|
|
273
|
+
run_all r;
|
|
274
|
+
R.report r ""
|