@voxgig/sdkgen 4.8.2 → 4.8.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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/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/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 +209 -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 +151 -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 +439 -0
- package/project/.sdk/tm/go/feature/secrets/sekreto/sekreto.go +685 -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 +897 -0
- package/project/.sdk/tm/go/test/omni/util.go +360 -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 +613 -0
- package/project/.sdk/tm/js/test/vendor/omni/util.js +212 -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 +74 -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 +152 -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 +92 -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 +455 -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 +566 -0
- package/project/.sdk/tm/py/test/voxgig_omni/util.py +237 -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/test/primary_utility_test.zig +1 -1
- package/project/.sdk/tm/zig/test/struct_runner.zig +5 -4
- 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
|
@@ -0,0 +1,322 @@
|
|
|
1
|
+
// VENDORED: @voxgig/omni sdk-20260904-1610-0 (java/src/com/voxgig/omni/Util.java)
|
|
2
|
+
// Source: https://github.com/voxgig/omni @ 8c3e1b573a8d35796f7fc45e3226b977023cabf7 [tag: sdk-20260904-1610-0]
|
|
3
|
+
// License: MIT (c) voxgig - see repository LICENSE. Do not edit: resync from upstream.
|
|
4
|
+
// Omni internal JSON utilities.
|
|
5
|
+
//
|
|
6
|
+
// Self-contained by design: the omni runner must be able to test *any*
|
|
7
|
+
// library, including libraries that provide these same operations.
|
|
8
|
+
|
|
9
|
+
package com.voxgig.omni;
|
|
10
|
+
|
|
11
|
+
import java.util.ArrayList;
|
|
12
|
+
import java.util.Arrays;
|
|
13
|
+
import java.util.LinkedHashMap;
|
|
14
|
+
import java.util.List;
|
|
15
|
+
import java.util.Map;
|
|
16
|
+
import java.util.TreeMap;
|
|
17
|
+
|
|
18
|
+
public final class Util {
|
|
19
|
+
|
|
20
|
+
public static final String NULLMARK = "__NULL__"; // Value is JSON null.
|
|
21
|
+
public static final String UNDEFMARK = "__UNDEF__"; // Value is not present.
|
|
22
|
+
public static final String EXISTSMARK = "__EXISTS__"; // Value exists.
|
|
23
|
+
|
|
24
|
+
private Util() {}
|
|
25
|
+
|
|
26
|
+
/** A map (JSON object)? */
|
|
27
|
+
public static boolean ismap(Object val) {
|
|
28
|
+
return val instanceof Map;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/** A list (JSON array)? */
|
|
32
|
+
public static boolean islist(Object val) {
|
|
33
|
+
return val instanceof List;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/** A container (map or list)? */
|
|
37
|
+
public static boolean isnode(Object val) {
|
|
38
|
+
return ismap(val) || islist(val);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/** A JSON number? Booleans are not numbers. */
|
|
42
|
+
public static boolean isnum(Object val) {
|
|
43
|
+
return val instanceof Number;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/** Absent (no value at all)? */
|
|
47
|
+
public static boolean isabsent(Object val) {
|
|
48
|
+
return val instanceof Json.Absent;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/** Deep copy a JSON value. Other values pass through by reference. */
|
|
52
|
+
@SuppressWarnings("unchecked")
|
|
53
|
+
public static Object clone(Object val) {
|
|
54
|
+
if (islist(val)) {
|
|
55
|
+
List<Object> out = new ArrayList<>();
|
|
56
|
+
for (Object entry : (List<Object>) val) {
|
|
57
|
+
out.add(clone(entry));
|
|
58
|
+
}
|
|
59
|
+
return out;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
if (ismap(val)) {
|
|
63
|
+
Map<String, Object> out = new LinkedHashMap<>();
|
|
64
|
+
for (Map.Entry<String, Object> entry : ((Map<String, Object>) val).entrySet()) {
|
|
65
|
+
out.put(entry.getKey(), clone(entry.getValue()));
|
|
66
|
+
}
|
|
67
|
+
return out;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
return val;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/** Read a value by path. Returns ABSENT when any step is missing. */
|
|
74
|
+
@SuppressWarnings("unchecked")
|
|
75
|
+
public static Object getpath(Object val, List<Object> path) {
|
|
76
|
+
Object current = val;
|
|
77
|
+
|
|
78
|
+
for (Object part : path) {
|
|
79
|
+
if (islist(current)) {
|
|
80
|
+
List<Object> list = (List<Object>) current;
|
|
81
|
+
int index;
|
|
82
|
+
try {
|
|
83
|
+
index = isnum(part) ? ((Number) part).intValue() : Integer.parseInt(String.valueOf(part));
|
|
84
|
+
} catch (NumberFormatException err) {
|
|
85
|
+
return Json.ABSENT;
|
|
86
|
+
}
|
|
87
|
+
if (index < 0 || index >= list.size()) {
|
|
88
|
+
return Json.ABSENT;
|
|
89
|
+
}
|
|
90
|
+
current = list.get(index);
|
|
91
|
+
continue;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
if (ismap(current)) {
|
|
95
|
+
Map<String, Object> map = (Map<String, Object>) current;
|
|
96
|
+
String key = strkey(part);
|
|
97
|
+
if (!map.containsKey(key)) {
|
|
98
|
+
return Json.ABSENT;
|
|
99
|
+
}
|
|
100
|
+
current = map.get(key);
|
|
101
|
+
continue;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
return Json.ABSENT;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
return current;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/** Render a path part as a map key. */
|
|
111
|
+
public static String strkey(Object part) {
|
|
112
|
+
if (part instanceof String) {
|
|
113
|
+
return (String) part;
|
|
114
|
+
}
|
|
115
|
+
if (isnum(part)) {
|
|
116
|
+
return numstr(((Number) part).doubleValue());
|
|
117
|
+
}
|
|
118
|
+
return String.valueOf(part);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/** The callback of a walk. */
|
|
122
|
+
public interface Apply {
|
|
123
|
+
Object apply(Object key, Object val, Object parent, List<Object> path);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/** Depth-first walk: children first, then the containing node. */
|
|
127
|
+
public static Object walk(Object val, Apply apply) {
|
|
128
|
+
return walkdown(val, apply, null, null, new ArrayList<>());
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
@SuppressWarnings("unchecked")
|
|
132
|
+
private static Object walkdown(
|
|
133
|
+
Object val, Apply apply, Object key, Object parent, List<Object> path) {
|
|
134
|
+
|
|
135
|
+
if (islist(val)) {
|
|
136
|
+
List<Object> list = (List<Object>) val;
|
|
137
|
+
for (int index = 0; index < list.size(); index++) {
|
|
138
|
+
List<Object> childpath = new ArrayList<>(path);
|
|
139
|
+
childpath.add(index);
|
|
140
|
+
list.set(index, walkdown(list.get(index), apply, index, list, childpath));
|
|
141
|
+
}
|
|
142
|
+
} else if (ismap(val)) {
|
|
143
|
+
Map<String, Object> map = (Map<String, Object>) val;
|
|
144
|
+
for (String childkey : new ArrayList<>(map.keySet())) {
|
|
145
|
+
List<Object> childpath = new ArrayList<>(path);
|
|
146
|
+
childpath.add(childkey);
|
|
147
|
+
map.put(childkey, walkdown(map.get(childkey), apply, childkey, map, childpath));
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
return apply.apply(key, val, parent, path);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
/** Deep structural equality: numbers by value, bools never numbers. */
|
|
155
|
+
@SuppressWarnings("unchecked")
|
|
156
|
+
public static boolean deepequal(Object a, Object b) {
|
|
157
|
+
if (a == b) {
|
|
158
|
+
return true;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
if (a instanceof Boolean || b instanceof Boolean) {
|
|
162
|
+
return a instanceof Boolean && b instanceof Boolean && a.equals(b);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
if (isnum(a) || isnum(b)) {
|
|
166
|
+
if (!isnum(a) || !isnum(b)) {
|
|
167
|
+
return false;
|
|
168
|
+
}
|
|
169
|
+
double anum = ((Number) a).doubleValue();
|
|
170
|
+
double bnum = ((Number) b).doubleValue();
|
|
171
|
+
return anum == bnum || (Double.isNaN(anum) && Double.isNaN(bnum));
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
if (isabsent(a) || isabsent(b)) {
|
|
175
|
+
return isabsent(a) && isabsent(b);
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
if (null == a || null == b) {
|
|
179
|
+
return null == a && null == b;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
if (islist(a) || islist(b)) {
|
|
183
|
+
if (!islist(a) || !islist(b)) {
|
|
184
|
+
return false;
|
|
185
|
+
}
|
|
186
|
+
List<Object> alist = (List<Object>) a;
|
|
187
|
+
List<Object> blist = (List<Object>) b;
|
|
188
|
+
if (alist.size() != blist.size()) {
|
|
189
|
+
return false;
|
|
190
|
+
}
|
|
191
|
+
for (int index = 0; index < alist.size(); index++) {
|
|
192
|
+
if (!deepequal(alist.get(index), blist.get(index))) {
|
|
193
|
+
return false;
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
return true;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
if (ismap(a) || ismap(b)) {
|
|
200
|
+
if (!ismap(a) || !ismap(b)) {
|
|
201
|
+
return false;
|
|
202
|
+
}
|
|
203
|
+
Map<String, Object> amap = (Map<String, Object>) a;
|
|
204
|
+
Map<String, Object> bmap = (Map<String, Object>) b;
|
|
205
|
+
if (amap.size() != bmap.size()) {
|
|
206
|
+
return false;
|
|
207
|
+
}
|
|
208
|
+
for (Map.Entry<String, Object> entry : amap.entrySet()) {
|
|
209
|
+
if (!bmap.containsKey(entry.getKey())) {
|
|
210
|
+
return false;
|
|
211
|
+
}
|
|
212
|
+
if (!deepequal(entry.getValue(), bmap.get(entry.getKey()))) {
|
|
213
|
+
return false;
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
return true;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
return a.equals(b);
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
/** Render a number the same way in every port: 5.0 prints as 5. */
|
|
223
|
+
public static String numstr(double val) {
|
|
224
|
+
if (Double.isNaN(val) || Double.isInfinite(val)) {
|
|
225
|
+
return "null";
|
|
226
|
+
}
|
|
227
|
+
if (val == Math.rint(val) && Math.abs(val) < 9007199254740992.0) {
|
|
228
|
+
return Long.toString((long) val);
|
|
229
|
+
}
|
|
230
|
+
String out = Double.toString(val);
|
|
231
|
+
return out;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
/** Render a string as a JSON string literal. */
|
|
235
|
+
public static String quote(String val) {
|
|
236
|
+
StringBuilder out = new StringBuilder("\"");
|
|
237
|
+
for (int index = 0; index < val.length(); index++) {
|
|
238
|
+
char c = val.charAt(index);
|
|
239
|
+
switch (c) {
|
|
240
|
+
case '"':
|
|
241
|
+
out.append("\\\"");
|
|
242
|
+
break;
|
|
243
|
+
case '\\':
|
|
244
|
+
out.append("\\\\");
|
|
245
|
+
break;
|
|
246
|
+
case '\n':
|
|
247
|
+
out.append("\\n");
|
|
248
|
+
break;
|
|
249
|
+
case '\r':
|
|
250
|
+
out.append("\\r");
|
|
251
|
+
break;
|
|
252
|
+
case '\t':
|
|
253
|
+
out.append("\\t");
|
|
254
|
+
break;
|
|
255
|
+
default:
|
|
256
|
+
if (c < 0x20) {
|
|
257
|
+
out.append(String.format("\\u%04x", (int) c));
|
|
258
|
+
} else {
|
|
259
|
+
out.append(c);
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
return out.append('"').toString();
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
/** Compact JSON text with map keys sorted, identical in every port. */
|
|
267
|
+
@SuppressWarnings("unchecked")
|
|
268
|
+
public static String jsonstr(Object val) {
|
|
269
|
+
if (isabsent(val)) {
|
|
270
|
+
return "undefined";
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
if (null == val) {
|
|
274
|
+
return "null";
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
if (val instanceof Boolean) {
|
|
278
|
+
return ((Boolean) val) ? "true" : "false";
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
if (val instanceof String) {
|
|
282
|
+
return quote((String) val);
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
if (isnum(val)) {
|
|
286
|
+
return numstr(((Number) val).doubleValue());
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
if (islist(val)) {
|
|
290
|
+
List<String> parts = new ArrayList<>();
|
|
291
|
+
for (Object entry : (List<Object>) val) {
|
|
292
|
+
parts.add(jsonstr(entry));
|
|
293
|
+
}
|
|
294
|
+
return "[" + String.join(",", parts) + "]";
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
if (ismap(val)) {
|
|
298
|
+
Map<String, Object> sorted = new TreeMap<>((Map<String, Object>) val);
|
|
299
|
+
List<String> parts = new ArrayList<>();
|
|
300
|
+
for (Map.Entry<String, Object> entry : sorted.entrySet()) {
|
|
301
|
+
parts.add(quote(entry.getKey()) + ":" + jsonstr(entry.getValue()));
|
|
302
|
+
}
|
|
303
|
+
return "{" + String.join(",", parts) + "}";
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
return quote(String.valueOf(val));
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
/** Strings verbatim, everything else as compact JSON. */
|
|
310
|
+
public static String stringify(Object val) {
|
|
311
|
+
return val instanceof String ? (String) val : jsonstr(val);
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
/** Render a path as a dotted string. */
|
|
315
|
+
public static String pathify(List<Object> path) {
|
|
316
|
+
List<String> parts = new ArrayList<>();
|
|
317
|
+
for (Object entry : (null == path ? Arrays.asList() : path)) {
|
|
318
|
+
parts.add(strkey(entry));
|
|
319
|
+
}
|
|
320
|
+
return String.join(".", parts);
|
|
321
|
+
}
|
|
322
|
+
}
|
|
@@ -45,7 +45,9 @@ final class MakeSpec {
|
|
|
45
45
|
|
|
46
46
|
Object allowMethodRaw = Struct.getpath(options, List.of("allow", "method"));
|
|
47
47
|
String allowMethod = allowMethodRaw instanceof String ? (String) allowMethodRaw : "";
|
|
48
|
-
|
|
48
|
+
// null-safe: an op outside the convention resolves NO method (see
|
|
49
|
+
// PrepareMethod), which the allow list can never contain.
|
|
50
|
+
if (null == ctx.spec.method || !allowMethod.contains(ctx.spec.method)) {
|
|
49
51
|
throw ctx.makeError("spec_method_allow",
|
|
50
52
|
"Method \"" + ctx.spec.method
|
|
51
53
|
+ "\" not allowed by SDK option allow.method value: \"" + allowMethod + "\"");
|
|
@@ -28,10 +28,10 @@ final class PrepareMethod {
|
|
|
28
28
|
return ((String) pm).toUpperCase();
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
return
|
|
31
|
+
// No default: an op name outside the convention resolves to NO method,
|
|
32
|
+
// exactly as the ts reference (`methodMap[key]` is undefined there).
|
|
33
|
+
// The silent-pass engine hid a stray "GET" fallback here; the shared
|
|
34
|
+
// corpus (prepareMethod, opname "bad" -> null) pins it now.
|
|
35
|
+
return METHOD_MAP.get(opname);
|
|
36
36
|
}
|
|
37
37
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
//
|
|
2
|
-
//
|
|
1
|
+
// VENDORED: @voxgig/struct 0.1.1 (java/src/Struct.java)
|
|
2
|
+
// Source: https://github.com/voxgig/struct @ 2caf7f448f265144c18dd6fab6ba270a7f3bca07 [tag: sdk-20260904-1610-0]
|
|
3
|
+
// License: MIT (c) voxgig - see repository LICENSE. Do not edit: resync from upstream.
|
|
3
4
|
package JAVAPACKAGE.utility.struct;
|
|
4
5
|
|
|
5
6
|
|
|
@@ -2636,9 +2637,21 @@ public class Struct {
|
|
|
2636
2637
|
setprop(pl, i, clone(childtm));
|
|
2637
2638
|
}
|
|
2638
2639
|
while (pl.size() > dpl.size()) pl.remove(pl.size() - 1);
|
|
2639
|
-
inj.keyI = 0;
|
|
2640
2640
|
|
|
2641
|
-
|
|
2641
|
+
// NOTE: modifying inj! This extends the child value loop in inject
|
|
2642
|
+
// to cover every cloned child.
|
|
2643
|
+
for (int ckeyI = size(inj.keys); ckeyI < size(pl); ckeyI++) {
|
|
2644
|
+
inj.keys.add(strkey(ckeyI));
|
|
2645
|
+
}
|
|
2646
|
+
|
|
2647
|
+
// Restart the child value loop at the first element (the loop
|
|
2648
|
+
// increments keyI on resume) so that the first element is also
|
|
2649
|
+
// validated against the child template.
|
|
2650
|
+
inj.keyI = -1;
|
|
2651
|
+
|
|
2652
|
+
// SKIP leaves the cloned child template in place at the first
|
|
2653
|
+
// element so the resumed loop can validate it.
|
|
2654
|
+
return SKIP;
|
|
2642
2655
|
}
|
|
2643
2656
|
|
|
2644
2657
|
return UNDEF;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
// VENDORED: @voxgig/struct 0.
|
|
2
|
-
// Source: https://github.com/voxgig/struct @
|
|
1
|
+
// VENDORED: @voxgig/struct 0.1.4 (javascript/src/struct.js)
|
|
2
|
+
// Source: https://github.com/voxgig/struct @ 2caf7f448f265144c18dd6fab6ba270a7f3bca07 [tag: sdk-20260904-1610-0]
|
|
3
3
|
// License: MIT (c) voxgig - see repository LICENSE. Do not edit: resync from upstream.
|
|
4
4
|
/* Copyright (c) 2025-2026 Voxgig Ltd. MIT LICENSE. */
|
|
5
|
-
// VERSION: @voxgig/struct 0.
|
|
5
|
+
// VERSION: @voxgig/struct-js 0.1.4
|
|
6
6
|
/* Voxgig Struct
|
|
7
7
|
* =============
|
|
8
8
|
*
|
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
// The corpus test runner: vendored @voxgig/omni driven through its NATIVE
|
|
2
|
+
// API (`makeRunner(specref, provider)`), presented to the corpus tests in
|
|
3
|
+
// the struct-runner shape they already use (`R.spec`, `R.runset`,
|
|
4
|
+
// `R.runsetflags`, `R.client`). No compat shim is vendored: the adapter
|
|
5
|
+
// below IS the whole bridge, per language, per the vendor-tag rollout
|
|
6
|
+
// (docs/design/vendor-tag-rollout.md, Decision 4).
|
|
7
|
+
//
|
|
8
|
+
// Two local decisions, both required (mirroring tm/ts/test/omni.ts):
|
|
9
|
+
//
|
|
10
|
+
// 1. SPEC PATH. omni's own spec resolution expects the caller to hand it a
|
|
11
|
+
// usable path — its docs say a port must resolve the path itself. This
|
|
12
|
+
// module lives at test/omni.js, the same depth as the old
|
|
13
|
+
// test/runner.js, so the existing TEST_JSON_FILE constant keeps working
|
|
14
|
+
// verbatim: a relative path is absolutized against __dirname.
|
|
15
|
+
//
|
|
16
|
+
// 2. PROVIDER DELEGATION. Corpus-driven contexts get `ctx.client` set to
|
|
17
|
+
// the runner's provider (omni overwrites it on any ctx/args map entry).
|
|
18
|
+
// A five-hook provider object HIDES the live SDK from the generated
|
|
19
|
+
// utilities that reach through it — prepareHeaders via client.options(),
|
|
20
|
+
// fetcher via client._mode, the feature helpers via client._rootctx and
|
|
21
|
+
// even ASSIGNING client._features. So the provider here is built by
|
|
22
|
+
// PROTOTYPE DELEGATION over the live SDK instance: every SDK member
|
|
23
|
+
// resolves, while the omni hooks sit on top. (Upstream omni#56 tracks
|
|
24
|
+
// giving the stock provider the same shape.)
|
|
25
|
+
//
|
|
26
|
+
// ZERO-ARGUMENT ENTRIES, checked and deliberately NOT corrected here: six
|
|
27
|
+
// of omni's eight upstream compat shims rewrite entries with no in/args/ctx
|
|
28
|
+
// to a true zero-argument call. The javascript shim carries no such
|
|
29
|
+
// correction, because JavaScript cannot tell `subject(undefined)` from
|
|
30
|
+
// `subject()` (default parameters fire either way), and omni's native rule
|
|
31
|
+
// (`args = [clone(entry.in)]`) is byte-identical to what the retired
|
|
32
|
+
// tm/js/test/runner.js already did. There is nothing to port, and the
|
|
33
|
+
// shared corpus keeps asserting exactly what it asserted before the swap.
|
|
34
|
+
//
|
|
35
|
+
// THE VENDORED JS PORT LACKS THE omni#54 RUNNER FIXES the TypeScript port
|
|
36
|
+
// has at this tag (upstream omni#57 tracks porting them). Vendored files
|
|
37
|
+
// are resynced, never edited, so each gap is worked around HERE instead:
|
|
38
|
+
//
|
|
39
|
+
// a. `errify`/`errmessage` collapse non-Error throwables to `String(err)`
|
|
40
|
+
// = '[object Object]'. The shared corpus throws error-shaped plain maps
|
|
41
|
+
// (generated makeError rethrows the fixture's err verbatim), which the
|
|
42
|
+
// retired runner matched by `.message` regardless of class. Every
|
|
43
|
+
// subject is therefore wrapped (`wrapsubject`) to rethrow such a map as
|
|
44
|
+
// a real Error carrying the map's own properties — errmessage() then
|
|
45
|
+
// reads the right message, and the native errify's spread preserves the
|
|
46
|
+
// map's fields for `match.err`.
|
|
47
|
+
//
|
|
48
|
+
// b. `match()` clones its base, and the vendored clone() has no cycle
|
|
49
|
+
// guard, so any ctx-carrying `match` entry — the corpus has fourteen —
|
|
50
|
+
// would blow the stack. The live cycles reach the match base on three
|
|
51
|
+
// edges, every one of them runner/SDK bookkeeping the corpus never
|
|
52
|
+
// asserts on, so the resolver makes exactly those NON-ENUMERABLE —
|
|
53
|
+
// invisible to clone()/fixjson()'s Object.keys() walks while every
|
|
54
|
+
// property READ still works:
|
|
55
|
+
// - `ctx.client` (assigned by the runner after contextify): the
|
|
56
|
+
// provider, whose `sdk._rootctx.client` reaches the SDK again;
|
|
57
|
+
// - the provider's own `sdk`: same cycle, one hop earlier;
|
|
58
|
+
// - `err.ctx` on Error objects a subject returns or throws:
|
|
59
|
+
// generated `ctx.error()` attaches the LIVE context to every error
|
|
60
|
+
// it makes, so `ctx.result.err.ctx === ctx` — a cycle entirely
|
|
61
|
+
// inside the entry's own result (`sanitizeerrs`, applied at the
|
|
62
|
+
// subject boundary by `wrapsubject`).
|
|
63
|
+
// This also keeps the unguarded jsonstr() away from cyclic values:
|
|
64
|
+
// failure messages only ever render acyclic data.
|
|
65
|
+
|
|
66
|
+
const { isAbsolute, join } = require('node:path')
|
|
67
|
+
|
|
68
|
+
const {
|
|
69
|
+
EXISTSMARK,
|
|
70
|
+
NULLMARK,
|
|
71
|
+
UNDEFMARK,
|
|
72
|
+
OmniError,
|
|
73
|
+
nullmodifier,
|
|
74
|
+
makeRunner: omnimakerunner,
|
|
75
|
+
} = require('./vendor/omni/index')
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
// Keep a property readable and writable but invisible to Object.keys(),
|
|
79
|
+
// which is how the vendored clone()/fixjson() walk. A later plain
|
|
80
|
+
// assignment (the runner does `ctx.client = provider`) updates the value
|
|
81
|
+
// and keeps the non-enumerability.
|
|
82
|
+
function hideprop(obj, key) {
|
|
83
|
+
Object.defineProperty(obj, key, {
|
|
84
|
+
value: obj[key],
|
|
85
|
+
enumerable: false,
|
|
86
|
+
writable: true,
|
|
87
|
+
configurable: true,
|
|
88
|
+
})
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
// Workaround (a): rethrow an error-shaped plain map as a real Error so the
|
|
93
|
+
// vendored errmessage() reads `.message` instead of '[object Object]'. The
|
|
94
|
+
// map's own properties ride along for the native errify's spread. Real
|
|
95
|
+
// Errors and everything else pass through untouched.
|
|
96
|
+
function normthrown(err) {
|
|
97
|
+
if (err instanceof Error) {
|
|
98
|
+
return err
|
|
99
|
+
}
|
|
100
|
+
if (null != err && 'object' === typeof err && 'string' === typeof err.message) {
|
|
101
|
+
return Object.assign(new Error(err.message), err)
|
|
102
|
+
}
|
|
103
|
+
return err
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
// Workaround (b), third edge: generated `ctx.error()` attaches the live
|
|
107
|
+
// Context to the errors it makes (`err.ctx`), so a returned result or a
|
|
108
|
+
// thrown error can carry a cycle entirely inside itself
|
|
109
|
+
// (ctx.result.err.ctx === ctx). Walk a subject's outcome and hide that
|
|
110
|
+
// bookkeeping on every Error found; the corpus never asserts on `err.ctx`.
|
|
111
|
+
function sanitizeerrs(val, seen) {
|
|
112
|
+
if (null == val || 'object' !== typeof val) {
|
|
113
|
+
return val
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
seen = seen || new Set()
|
|
117
|
+
if (seen.has(val)) {
|
|
118
|
+
return val
|
|
119
|
+
}
|
|
120
|
+
seen.add(val)
|
|
121
|
+
|
|
122
|
+
if (val instanceof Error && Object.prototype.propertyIsEnumerable.call(val, 'ctx')) {
|
|
123
|
+
hideprop(val, 'ctx')
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
for (const key of Object.keys(val)) {
|
|
127
|
+
sanitizeerrs(val[key], seen)
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
return val
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
function wrapsubject(subject) {
|
|
134
|
+
if ('function' !== typeof subject) {
|
|
135
|
+
return subject
|
|
136
|
+
}
|
|
137
|
+
return async function (...args) {
|
|
138
|
+
try {
|
|
139
|
+
return sanitizeerrs(await subject.apply(this, args))
|
|
140
|
+
}
|
|
141
|
+
catch (err) {
|
|
142
|
+
throw sanitizeerrs(normthrown(err))
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
// The omni hooks for an SDK subject — what the retired compat shim called
|
|
149
|
+
// `structprovider`, inlined here because this resolver is the one consumer.
|
|
150
|
+
function sdkhooks(sdk) {
|
|
151
|
+
return {
|
|
152
|
+
// A subject is resolved from the utility, or from utility.struct.
|
|
153
|
+
subject: (name) => {
|
|
154
|
+
const utility = sdk.utility()
|
|
155
|
+
return wrapsubject(utility[name] || (utility.struct && utility.struct[name]))
|
|
156
|
+
},
|
|
157
|
+
|
|
158
|
+
// A DEF.client entry becomes another SDK instance — rewrapped with the
|
|
159
|
+
// same delegating shape, not a plain hook object.
|
|
160
|
+
client: async (options) => sdkprovider(await sdk.tester(options)),
|
|
161
|
+
|
|
162
|
+
// The SDK supplies its own context wrapper.
|
|
163
|
+
contextify: (val) => {
|
|
164
|
+
const utility = sdk.utility()
|
|
165
|
+
const hook =
|
|
166
|
+
'function' === typeof utility.contextify ? utility.contextify
|
|
167
|
+
: 'function' === typeof utility.makeContext ? utility.makeContext
|
|
168
|
+
: null
|
|
169
|
+
const ctx = null == hook ? val : hook.call(utility, val)
|
|
170
|
+
if (null != ctx && 'object' === typeof ctx) {
|
|
171
|
+
ctx.utility = utility
|
|
172
|
+
|
|
173
|
+
// Workaround (b): the runner assigns the provider here right after
|
|
174
|
+
// this hook returns; hidden, the cycle never enters clone()'s walk.
|
|
175
|
+
hideprop(ctx, 'client')
|
|
176
|
+
}
|
|
177
|
+
return ctx
|
|
178
|
+
},
|
|
179
|
+
|
|
180
|
+
// Client options may reference the runner store.
|
|
181
|
+
inject: (options, store) => {
|
|
182
|
+
const structutils = sdk.utility().struct
|
|
183
|
+
if (structutils && 'function' === typeof structutils.inject) {
|
|
184
|
+
return structutils.inject(options, store)
|
|
185
|
+
}
|
|
186
|
+
return options
|
|
187
|
+
},
|
|
188
|
+
|
|
189
|
+
utility: () => sdk.utility(),
|
|
190
|
+
tester: (options) => sdk.tester(options),
|
|
191
|
+
sdk,
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
// Wrap the SDK as an omni provider WITHOUT hiding it: hooks from sdkhooks,
|
|
197
|
+
// everything else through the prototype chain.
|
|
198
|
+
function sdkprovider(sdk) {
|
|
199
|
+
const provider = Object.assign(Object.create(sdk), sdkhooks(sdk))
|
|
200
|
+
|
|
201
|
+
// Workaround (b), second edge: `provider.sdk` stays readable (tests
|
|
202
|
+
// unwrap the live SDK through it) but leaves clone()'s walk.
|
|
203
|
+
hideprop(provider, 'sdk')
|
|
204
|
+
|
|
205
|
+
return provider
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
// struct's makeRunner(testfile, client) signature, backed by vendored omni.
|
|
210
|
+
// Also accepts an already-parsed spec object (omni's own capability), which
|
|
211
|
+
// keeps smoke tests free of fixture files.
|
|
212
|
+
async function makeRunner(testfile, client) {
|
|
213
|
+
const specref = 'string' !== typeof testfile ? testfile
|
|
214
|
+
: isAbsolute(testfile) ? testfile
|
|
215
|
+
: join(__dirname, testfile)
|
|
216
|
+
|
|
217
|
+
const provider = sdkprovider(client)
|
|
218
|
+
const runner = await omnimakerunner(specref, provider)
|
|
219
|
+
|
|
220
|
+
return async function structrunner(name, store) {
|
|
221
|
+
const runpack = await runner(name, store)
|
|
222
|
+
|
|
223
|
+
return {
|
|
224
|
+
spec: runpack.spec,
|
|
225
|
+
|
|
226
|
+
// Explicitly passed subjects need workaround (a) too — the corpus
|
|
227
|
+
// tests hand most subjects in per-set rather than by name.
|
|
228
|
+
runset: async (testspec, testsubject) =>
|
|
229
|
+
runpack.runset(testspec, wrapsubject(testsubject)),
|
|
230
|
+
runsetflags: async (testspec, flags, testsubject) =>
|
|
231
|
+
runpack.runsetflags(testspec, flags, wrapsubject(testsubject)),
|
|
232
|
+
|
|
233
|
+
subject: runpack.subject,
|
|
234
|
+
client: provider,
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
|
|
240
|
+
// struct's flag-modifier name, served from native omni.
|
|
241
|
+
const nullModifier = nullmodifier
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
module.exports = {
|
|
245
|
+
EXISTSMARK,
|
|
246
|
+
NULLMARK,
|
|
247
|
+
UNDEFMARK,
|
|
248
|
+
OmniError,
|
|
249
|
+
makeRunner,
|
|
250
|
+
nullModifier,
|
|
251
|
+
}
|