@voxgig/sdkgen 4.8.2 → 4.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/voxgig-sdkgen +1 -1
- package/dist/action/doctor.d.ts +1 -0
- package/dist/action/doctor.js +50 -2
- package/dist/action/doctor.js.map +1 -1
- package/dist/helpers/naming.js +4 -2
- package/dist/helpers/naming.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/model/sdkgen.aon +21 -0
- package/package.json +1 -1
- package/project/.sdk/model/feature/secrets.aon +120 -18
- package/project/.sdk/model/target/c.aon +10 -0
- package/project/.sdk/model/target/clojure.aon +13 -0
- package/project/.sdk/model/target/cpp.aon +10 -0
- package/project/.sdk/model/target/csharp.aon +9 -0
- package/project/.sdk/model/target/dart.aon +10 -0
- package/project/.sdk/model/target/elixir.aon +9 -0
- package/project/.sdk/model/target/go.aon +13 -0
- package/project/.sdk/model/target/java.aon +9 -0
- package/project/.sdk/model/target/js.aon +7 -0
- package/project/.sdk/model/target/kotlin.aon +9 -0
- package/project/.sdk/model/target/lean.aon +17 -0
- package/project/.sdk/model/target/lua.aon +8 -0
- package/project/.sdk/model/target/ocaml.aon +9 -0
- package/project/.sdk/model/target/perl.aon +8 -0
- package/project/.sdk/model/target/php.aon +8 -0
- package/project/.sdk/model/target/py.aon +13 -0
- package/project/.sdk/model/target/rb.aon +8 -0
- package/project/.sdk/model/target/rust.aon +10 -0
- package/project/.sdk/model/target/scala.aon +21 -2
- package/project/.sdk/model/target/swift.aon +18 -0
- package/project/.sdk/model/target/ts.aon +13 -0
- package/project/.sdk/model/target/zig.aon +9 -0
- package/project/.sdk/src/cmp/clojure/Package_clojure.ts +9 -2
- package/project/.sdk/src/cmp/cpp/Gitignore_cpp.ts +3 -0
- package/project/.sdk/src/cmp/dart/Test_dart.ts +2 -0
- package/project/.sdk/src/cmp/elixir/Package_elixir.ts +4 -1
- package/project/.sdk/src/cmp/go/Config_go.ts +59 -2
- package/project/.sdk/src/cmp/go/Main_go.ts +8 -2
- package/project/.sdk/src/cmp/java/Test_java.ts +6 -5
- package/project/.sdk/src/cmp/kotlin/Test_kotlin.ts +6 -5
- package/project/.sdk/src/cmp/lean/Package_lean.ts +23 -0
- package/project/.sdk/src/cmp/lean/ReadmeInstall_lean.ts +1 -0
- package/project/.sdk/src/cmp/lean/ReadmeTopTest_lean.ts +1 -0
- package/project/.sdk/src/cmp/ocaml/Gitignore_ocaml.ts +1 -0
- package/project/.sdk/src/cmp/ocaml/Main_ocaml.ts +7 -3
- package/project/.sdk/src/cmp/py/Config_py.ts +82 -1
- package/project/.sdk/src/cmp/py/Main_py.ts +44 -0
- package/project/.sdk/src/cmp/py/fragment/Main.fragment.py +2 -0
- package/project/.sdk/src/cmp/swift/Main_swift.ts +10 -0
- package/project/.sdk/src/cmp/swift/Package_swift.ts +13 -1
- package/project/.sdk/src/cmp/ts/Config_ts.ts +42 -17
- package/project/.sdk/src/cmp/ts/fragment/Config.data.fragment.ts +13 -1
- package/project/.sdk/src/cmp/ts/fragment/Config.fragment.ts +13 -1
- package/project/.sdk/src/cmp/zig/Package_zig.ts +15 -11
- package/project/.sdk/src/cmp/zig/fragment/Entity.fragment.zig +3 -3
- package/project/.sdk/src/cmp/zig/fragment/EntityListOp.fragment.zig +3 -3
- package/project/.sdk/src/cmp/zig/fragment/Main.fragment.zig +3 -3
- package/project/.sdk/src/cmp/zig/utility_zig.ts +50 -1
- package/project/.sdk/tm/c/Makefile +38 -3
- package/project/.sdk/tm/c/tests/omni_resolver.h +361 -0
- package/project/.sdk/tm/c/tests/omni_smoke_test.c +237 -0
- package/project/.sdk/tm/c/tests/primary_corpus_test.c +205 -284
- package/project/.sdk/tm/c/tests/struct_corpus_test.c +292 -212
- package/project/.sdk/tm/c/tests/vendor/omni/json.c +811 -0
- package/project/.sdk/tm/c/tests/vendor/omni/omni.h +240 -0
- package/project/.sdk/tm/c/tests/vendor/omni/runner.c +940 -0
- package/project/.sdk/tm/c/tests/vendor/omni/util.c +351 -0
- package/project/.sdk/tm/c/utility/struct/utility.c +7 -2
- package/project/.sdk/tm/clojure/test/sdk/test/omni.clj +401 -0
- package/project/.sdk/tm/clojure/test/sdk/test/omni_smoke.clj +81 -0
- package/project/.sdk/tm/clojure/test/sdk/test/primary.clj +92 -58
- package/project/.sdk/tm/clojure/test/sdk/test/struct_corpus.clj +122 -149
- package/project/.sdk/tm/clojure/test/sdk/test_runner.clj +8 -3
- package/project/.sdk/tm/clojure/test/vendor/omni/voxgig/omni/json.clj +145 -0
- package/project/.sdk/tm/clojure/test/vendor/omni/voxgig/omni/runner.clj +445 -0
- package/project/.sdk/tm/clojure/test/vendor/omni/voxgig/omni/util.clj +145 -0
- package/project/.sdk/tm/cpp/Makefile +5 -1
- package/project/.sdk/tm/cpp/test/omni_resolver.hpp +473 -0
- package/project/.sdk/tm/cpp/test/omni_smoke_test.cpp +209 -0
- package/project/.sdk/tm/cpp/test/primary_utility_test.cpp +243 -184
- package/project/.sdk/tm/cpp/test/runner_support.hpp +68 -181
- package/project/.sdk/tm/cpp/test/struct_corpus_test.cpp +183 -56
- package/project/.sdk/tm/cpp/test/vendor/omni/json.hpp +406 -0
- package/project/.sdk/tm/cpp/test/vendor/omni/omni.hpp +751 -0
- package/project/.sdk/tm/cpp/test/vendor/omni/util.hpp +256 -0
- package/project/.sdk/tm/cpp/utility/pipeline.hpp +7 -1
- package/project/.sdk/tm/csharp/test/OmniResolver.cs +491 -0
- package/project/.sdk/tm/csharp/test/OmniSmokeTest.cs +106 -0
- package/project/.sdk/tm/csharp/test/PrimaryUtilityTest.cs +299 -316
- package/project/.sdk/tm/csharp/test/Runner.cs +104 -269
- package/project/.sdk/tm/csharp/test/StructUtilityTest.cs +535 -724
- package/project/.sdk/tm/csharp/test/vendor/omni/Runner.cs +864 -0
- package/project/.sdk/tm/csharp/test/vendor/omni/Util.cs +347 -0
- package/project/.sdk/tm/csharp/utility/MakeSpec.cs +3 -1
- package/project/.sdk/tm/csharp/utility/PrepareMethod.cs +6 -1
- package/project/.sdk/tm/csharp/utility/struct/Struct.cs +21 -5
- package/project/.sdk/tm/dart/test/omni.dart +520 -0
- package/project/.sdk/tm/dart/test/omni_smoke_test.dart +143 -0
- package/project/.sdk/tm/dart/test/primary_test.dart +86 -28
- package/project/.sdk/tm/dart/test/struct_test.dart +438 -11
- package/project/.sdk/tm/dart/test/vendor/omni/omni.dart +7 -0
- package/project/.sdk/tm/dart/test/vendor/omni/runner.dart +653 -0
- package/project/.sdk/tm/dart/test/vendor/omni/util.dart +232 -0
- package/project/.sdk/tm/elixir/Makefile +11 -3
- package/project/.sdk/tm/elixir/test/omni_smoke_test.exs +117 -0
- package/project/.sdk/tm/elixir/test/primary_utility_test.exs +341 -16
- package/project/.sdk/tm/elixir/test/struct_corpus_test.exs +554 -9
- package/project/.sdk/tm/elixir/test/support/omni.ex +377 -0
- package/project/.sdk/tm/elixir/test/vendor/omni/json.ex +122 -0
- package/project/.sdk/tm/elixir/test/vendor/omni/runner.ex +623 -0
- package/project/.sdk/tm/elixir/test/vendor/omni/util.ex +187 -0
- package/project/.sdk/tm/go/core/context.go +32 -16
- package/project/.sdk/tm/go/feature/secrets/plugin/capability.go +261 -0
- package/project/.sdk/tm/go/feature/secrets/plugin/catalog.go +78 -0
- package/project/.sdk/tm/go/feature/secrets/plugin/config.go +652 -0
- package/project/.sdk/tm/go/feature/secrets/plugin/depend.go +250 -0
- package/project/.sdk/tm/go/feature/secrets/plugin/env.go +194 -0
- package/project/.sdk/tm/go/feature/secrets/plugin/export.go +80 -0
- package/project/.sdk/tm/go/feature/secrets/plugin/graph.go +238 -0
- package/project/.sdk/tm/go/feature/secrets/plugin/host.go +1575 -0
- package/project/.sdk/tm/go/feature/secrets/plugin/order.go +248 -0
- package/project/.sdk/tm/go/feature/secrets/plugin/point.go +184 -0
- package/project/.sdk/tm/go/feature/secrets/plugin/ref.go +123 -0
- package/project/.sdk/tm/go/feature/secrets/plugin/resolve.go +79 -0
- package/project/.sdk/tm/go/feature/secrets/plugin/types.go +296 -0
- package/project/.sdk/tm/go/feature/secrets/plugin/util.go +87 -0
- package/project/.sdk/tm/go/feature/secrets/plugin/version.go +161 -0
- package/project/.sdk/tm/go/feature/secrets/plugins/aws/aws.go +292 -0
- package/project/.sdk/tm/go/feature/secrets/plugins/aws/sigv4.go +201 -0
- package/project/.sdk/tm/go/feature/secrets/plugins/azuresecrets/azuresecrets.go +187 -0
- package/project/.sdk/tm/go/feature/secrets/plugins/boru/boru.go +184 -0
- package/project/.sdk/tm/go/feature/secrets/plugins/doppler/doppler.go +114 -0
- package/project/.sdk/tm/go/feature/secrets/plugins/gcpsecrets/gcpsecrets.go +156 -0
- package/project/.sdk/tm/go/feature/secrets/plugins/hashicorp/hashicorp.go +208 -0
- package/project/.sdk/tm/go/feature/secrets/plugins/httpjson/httpjson.go +241 -0
- package/project/.sdk/tm/go/feature/secrets/plugins/infisical/infisical.go +150 -0
- package/project/.sdk/tm/go/feature/secrets/plugins/onepassword/onepassword.go +152 -0
- package/project/.sdk/tm/go/feature/secrets/plugins/secretspec/secretspec.go +143 -0
- package/project/.sdk/tm/go/feature/secrets/sekreto/addr.go +120 -0
- package/project/.sdk/tm/go/feature/secrets/sekreto/providers.go +442 -0
- package/project/.sdk/tm/go/feature/secrets/sekreto/sekreto.go +714 -0
- package/project/.sdk/tm/go/feature/secrets_feature.go +675 -0
- package/project/.sdk/tm/go/src/feature/secrets/.gitkeep +0 -0
- package/project/.sdk/tm/go/test/feature/secrets/secrets_feature_test.go +799 -0
- package/project/.sdk/tm/go/test/omni/omni.go +902 -0
- package/project/.sdk/tm/go/test/omni/util.go +381 -0
- package/project/.sdk/tm/go/test/omniresolver_test.go +748 -0
- package/project/.sdk/tm/go/test/omnismoke_test.go +112 -0
- package/project/.sdk/tm/go/test/primary_utility_test.go +123 -191
- package/project/.sdk/tm/go/test/struct_utility_test.go +323 -16
- package/project/.sdk/tm/go/test/testsupport_test.go +294 -0
- package/project/.sdk/tm/go/utility/make_options.go +8 -1
- package/project/.sdk/tm/go/utility/prepare_method.go +5 -1
- package/project/.sdk/tm/go/utility/struct/voxgigstruct.go +2 -2
- package/project/.sdk/tm/java/test/OmniResolver.java +355 -0
- package/project/.sdk/tm/java/test/OmniSmokeTest.java +99 -0
- package/project/.sdk/tm/java/test/PrimaryUtilityTest.java +254 -280
- package/project/.sdk/tm/java/test/RunnerSupport.java +9 -194
- package/project/.sdk/tm/java/test/StructCorpusTest.java +119 -42
- package/project/.sdk/tm/java/test/vendor/omni/Json.java +287 -0
- package/project/.sdk/tm/java/test/vendor/omni/Runner.java +851 -0
- package/project/.sdk/tm/java/test/vendor/omni/Util.java +322 -0
- package/project/.sdk/tm/java/utility/MakeSpec.java +3 -1
- package/project/.sdk/tm/java/utility/PrepareMethod.java +5 -5
- package/project/.sdk/tm/java/utility/struct/Struct.java +17 -4
- package/project/.sdk/tm/js/src/utility/StructUtility.js +3 -3
- package/project/.sdk/tm/js/test/omni.js +251 -0
- package/project/.sdk/tm/js/test/omni.test.js +105 -0
- package/project/.sdk/tm/js/test/utility/PrimaryUtility.test.js +6 -2
- package/project/.sdk/tm/js/test/utility/StructUtility.test.js +27 -2
- package/project/.sdk/tm/js/test/vendor/omni/index.js +77 -0
- package/project/.sdk/tm/js/test/vendor/omni/runner.js +628 -0
- package/project/.sdk/tm/js/test/vendor/omni/util.js +229 -0
- package/project/.sdk/tm/kotlin/core/Utility.kt +1 -1
- package/project/.sdk/tm/kotlin/test/OmniResolver.kt +343 -0
- package/project/.sdk/tm/kotlin/test/OmniSmokeTest.kt +100 -0
- package/project/.sdk/tm/kotlin/test/PrimaryUtilityTest.kt +244 -262
- package/project/.sdk/tm/kotlin/test/RunnerSupport.kt +9 -178
- package/project/.sdk/tm/kotlin/test/StructCorpusTest.kt +121 -32
- package/project/.sdk/tm/kotlin/test/vendor/omni/Json.kt +264 -0
- package/project/.sdk/tm/kotlin/test/vendor/omni/Runner.kt +615 -0
- package/project/.sdk/tm/kotlin/test/vendor/omni/Util.kt +139 -0
- package/project/.sdk/tm/kotlin/utility/MakeSpecUrl.kt +6 -3
- package/project/.sdk/tm/kotlin/utility/Prepare.kt +6 -6
- package/project/.sdk/tm/kotlin/utility/struct/Struct.kt +18 -2
- package/project/.sdk/tm/lean/Makefile +12 -5
- package/project/.sdk/tm/lean/src/SdkUtility.lean +14 -1
- package/project/.sdk/tm/lean/test/OmniResolver.lean +358 -0
- package/project/.sdk/tm/lean/test/OmniSmoke.lean +174 -0
- package/project/.sdk/tm/lean/test/StructCorpus.lean +245 -574
- package/project/.sdk/tm/lean/test/TPrimaryUtility.lean +155 -291
- package/project/.sdk/tm/lean/test/vendor/omni/Omni.lean +997 -0
- package/project/.sdk/tm/lua/test/omni.lua +456 -0
- package/project/.sdk/tm/lua/test/omni_smoke_test.lua +103 -0
- package/project/.sdk/tm/lua/test/primary_utility_test.lua +250 -509
- package/project/.sdk/tm/lua/test/struct_utility_test.lua +161 -70
- package/project/.sdk/tm/lua/test/vendor/omni/json.lua +268 -0
- package/project/.sdk/tm/lua/test/vendor/omni/regex.lua +385 -0
- package/project/.sdk/tm/lua/test/vendor/omni/runner.lua +641 -0
- package/project/.sdk/tm/lua/test/vendor/omni/util.lua +282 -0
- package/project/.sdk/tm/lua/utility/prepare_method.lua +5 -1
- package/project/.sdk/tm/lua/utility/struct/regex.lua +663 -0
- package/project/.sdk/tm/lua/utility/struct/struct.lua +660 -420
- package/project/.sdk/tm/ocaml/Makefile +37 -12
- package/project/.sdk/tm/ocaml/test/omni_resolver.ml +284 -0
- package/project/.sdk/tm/ocaml/test/omni_smoke_test.ml +169 -0
- package/project/.sdk/tm/ocaml/test/primary_utility_test.ml +84 -100
- package/project/.sdk/tm/ocaml/test/struct_corpus.ml +225 -201
- package/project/.sdk/tm/ocaml/test/vendor/omni/omni.ml +1157 -0
- package/project/.sdk/tm/perl/lib/Voxgig/Struct.pm +88 -12
- package/project/.sdk/tm/perl/t/omni.pm +647 -0
- package/project/.sdk/tm/perl/t/omni_smoke.t +87 -0
- package/project/.sdk/tm/perl/t/primary_utility.t +189 -487
- package/project/.sdk/tm/perl/t/struct_utility.t +455 -389
- package/project/.sdk/tm/perl/t/vendor/omni/Voxgig/Omni/Runner.pm +649 -0
- package/project/.sdk/tm/perl/t/vendor/omni/Voxgig/Omni/Util.pm +253 -0
- package/project/.sdk/tm/perl/t/vendor/omni/Voxgig/Omni.pm +24 -0
- package/project/.sdk/tm/perl/utility/prepare_method.pm +7 -2
- package/project/.sdk/tm/php/test/Omni.php +691 -0
- package/project/.sdk/tm/php/test/OmniSmokeTest.php +93 -0
- package/project/.sdk/tm/php/test/PrimaryUtilityTest.php +210 -571
- package/project/.sdk/tm/php/test/StructUtilityTest.php +320 -342
- package/project/.sdk/tm/php/test/vendor/omni/Runner.php +644 -0
- package/project/.sdk/tm/php/test/vendor/omni/Util.php +283 -0
- package/project/.sdk/tm/php/utility/MakeSpec.php +10 -3
- package/project/.sdk/tm/php/utility/PrepareBody.php +7 -1
- package/project/.sdk/tm/php/utility/PrepareMethod.php +6 -2
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/__init__.py +36 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/capability.py +141 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/catalog.py +50 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/config.py +333 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/depend.py +198 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/env.py +147 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/export.py +52 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/graph.py +139 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/host.py +1053 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/order.py +171 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/point.py +95 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/ref.py +116 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/resolve.py +59 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/types.py +87 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/version.py +112 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/__init__.py +76 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/addr.py +116 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/aws.py +192 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/azuresecrets.py +120 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/boru.py +140 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/doppler.py +62 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/gcpsecrets.py +101 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/hashicorp.py +151 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/httpjson.py +115 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/infisical.py +90 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/onepassword.py +101 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/secretspec.py +119 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/sigv4.py +125 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/providers.py +211 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/sekreto.py +475 -0
- package/project/.sdk/tm/py/pkg/feature/secrets_feature.py +467 -0
- package/project/.sdk/tm/py/pkg/utility/prepare_method.py +5 -1
- package/project/.sdk/tm/py/pkg/utility/voxgig_struct/__init__.py +0 -2
- package/project/.sdk/tm/py/pkg/utility/voxgig_struct/voxgig_struct.py +780 -529
- package/project/.sdk/tm/py/src/feature/secrets/.gitkeep +0 -0
- package/project/.sdk/tm/py/test/feature/__init__.py +0 -0
- package/project/.sdk/tm/py/test/feature/secrets/__init__.py +0 -0
- package/project/.sdk/tm/py/test/feature/secrets/test_secrets.py +337 -0
- package/project/.sdk/tm/py/test/omni.py +415 -0
- package/project/.sdk/tm/py/test/test_omni_smoke.py +74 -0
- package/project/.sdk/tm/py/test/test_primary_utility.py +144 -668
- package/project/.sdk/tm/py/test/test_struct_utility.py +74 -27
- package/project/.sdk/tm/py/test/voxgig_omni/__init__.py +62 -0
- package/project/.sdk/tm/py/test/voxgig_omni/runner.py +580 -0
- package/project/.sdk/tm/py/test/voxgig_omni/util.py +252 -0
- package/project/.sdk/tm/rb/test/omni.rb +505 -0
- package/project/.sdk/tm/rb/test/omni_smoke_test.rb +72 -0
- package/project/.sdk/tm/rb/test/primary_utility_test.rb +174 -560
- package/project/.sdk/tm/rb/test/struct_utility_test.rb +13 -7
- package/project/.sdk/tm/rb/test/vendor/omni/runner.rb +493 -0
- package/project/.sdk/tm/rb/test/vendor/omni/util.rb +199 -0
- package/project/.sdk/tm/rb/test/vendor/omni/voxgig_omni.rb +15 -0
- package/project/.sdk/tm/rb/utility/prepare_method.rb +5 -1
- package/project/.sdk/tm/rust/tests/common/mod.rs +19 -242
- package/project/.sdk/tm/rust/tests/omni_resolver/mod.rs +888 -0
- package/project/.sdk/tm/rust/tests/omni_smoke_test.rs +286 -0
- package/project/.sdk/tm/rust/tests/primary_utility_test.rs +318 -312
- package/project/.sdk/tm/rust/tests/struct_utility_test.rs +66 -28
- package/project/.sdk/tm/rust/tests/vendor/omni/json.rs +412 -0
- package/project/.sdk/tm/rust/tests/vendor/omni/mod.rs +38 -0
- package/project/.sdk/tm/rust/tests/vendor/omni/regex.rs +392 -0
- package/project/.sdk/tm/rust/tests/vendor/omni/runner.rs +1001 -0
- package/project/.sdk/tm/rust/tests/vendor/omni/util.rs +161 -0
- package/project/.sdk/tm/rust/utility/prepare_method.rs +5 -1
- package/project/.sdk/tm/scala/Makefile +16 -6
- package/project/.sdk/tm/scala/sdktest/OmniResolver.scala +497 -0
- package/project/.sdk/tm/scala/sdktest/OmniSmoke.scala +192 -0
- package/project/.sdk/tm/scala/sdktest/PrimaryCorpus.scala +47 -19
- package/project/.sdk/tm/scala/sdktest/StructCorpus.scala +0 -0
- package/project/.sdk/tm/scala/sdktest/vendor/omni/Json.scala +229 -0
- package/project/.sdk/tm/scala/sdktest/vendor/omni/Runner.scala +552 -0
- package/project/.sdk/tm/scala/sdktest/vendor/omni/Util.scala +104 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/Constants.swift +10 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/Inject.swift +28 -5
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/Injection.swift +5 -1
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/Minor.swift +4 -1
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/Validate.swift +15 -5
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/utility/Prepare.swift +6 -1
- package/project/.sdk/tm/swift/Tests/ProjectNameSDKTests/OmniResolver.swift +474 -0
- package/project/.sdk/tm/swift/Tests/ProjectNameSDKTests/OmniSmokeTest.swift +107 -0
- package/project/.sdk/tm/swift/Tests/ProjectNameSDKTests/PrimaryUtilityTest.swift +141 -178
- package/project/.sdk/tm/swift/Tests/ProjectNameSDKTests/Runner.swift +17 -113
- package/project/.sdk/tm/swift/Tests/ProjectNameSDKTests/StructUtilityTest.swift +295 -446
- package/project/.sdk/tm/swift/Tests/vendor/omni/Json.swift +364 -0
- package/project/.sdk/tm/swift/Tests/vendor/omni/Runner.swift +730 -0
- package/project/.sdk/tm/swift/Tests/vendor/omni/Util.swift +162 -0
- package/project/.sdk/tm/ts/src/feature/secrets/SecretsFeature.ts +7 -0
- package/project/.sdk/tm/ts/src/feature/secrets/plugin/Capability.ts +148 -0
- package/project/.sdk/tm/ts/src/feature/secrets/plugin/Catalog.ts +55 -0
- package/project/.sdk/tm/ts/src/feature/secrets/plugin/Config.ts +344 -0
- package/project/.sdk/tm/ts/src/feature/secrets/plugin/Depend.ts +205 -0
- package/project/.sdk/tm/ts/src/feature/secrets/plugin/Env.ts +138 -0
- package/project/.sdk/tm/ts/src/feature/secrets/plugin/Export.ts +46 -0
- package/project/.sdk/tm/ts/src/feature/secrets/plugin/FeatureHost.ts +349 -0
- package/project/.sdk/tm/ts/src/feature/secrets/plugin/Graph.ts +181 -0
- package/project/.sdk/tm/ts/src/feature/secrets/plugin/Host.ts +1132 -0
- package/project/.sdk/tm/ts/src/feature/secrets/plugin/Order.ts +177 -0
- package/project/.sdk/tm/ts/src/feature/secrets/plugin/Point.ts +119 -0
- package/project/.sdk/tm/ts/src/feature/secrets/plugin/Ref.ts +102 -0
- package/project/.sdk/tm/ts/src/feature/secrets/plugin/Resolve.ts +61 -0
- package/project/.sdk/tm/ts/src/feature/secrets/plugin/Types.ts +112 -0
- package/project/.sdk/tm/ts/src/feature/secrets/plugin/Version.ts +100 -0
- package/project/.sdk/tm/ts/src/feature/secrets/plugin/index.ts +37 -0
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/Sekreto.ts +163 -30
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/index.ts +27 -22
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/{provider → plugins}/aws.ts +26 -36
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/{provider → plugins}/azuresecrets.ts +19 -21
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/{provider → plugins}/boru.ts +36 -17
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/{provider → plugins}/doppler.ts +14 -21
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/{provider → plugins}/gcpsecrets.ts +27 -27
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/{provider → plugins}/hashicorp.ts +25 -39
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/plugins/httpjson.ts +99 -0
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/{provider → plugins}/infisical.ts +14 -16
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/{provider → plugins}/onepassword.ts +15 -22
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/plugins/secretspec.ts +98 -0
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/{Sigv4.ts → plugins/sigv4.ts} +7 -6
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/addr.ts +97 -23
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/builtin.ts +37 -0
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/dotenv.ts +4 -17
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/env.ts +4 -16
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/file.ts +11 -25
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/memory.ts +6 -23
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/support.ts +106 -39
- package/project/.sdk/tm/ts/src/utility/StructUtility.ts +3 -3
- package/project/.sdk/tm/ts/test/omni.ts +104 -32
- package/project/.sdk/tm/ts/test/utility/StructUtility.test.ts +27 -0
- package/project/.sdk/tm/ts/test/vendor/omni/Runner.ts +32 -5
- package/project/.sdk/tm/ts/test/vendor/omni/Util.ts +2 -2
- package/project/.sdk/tm/ts/test/vendor/omni/index.ts +2 -2
- package/project/.sdk/tm/zig/Makefile +15 -1
- package/project/.sdk/tm/zig/build.zig +23 -5
- package/project/.sdk/tm/zig/core/helpers.zig +52 -11
- package/project/.sdk/tm/zig/core/mem.zig +17 -1
- package/project/.sdk/tm/zig/core/utility.zig +23 -19
- package/project/.sdk/tm/zig/feature/audit.zig +2 -2
- package/project/.sdk/tm/zig/feature/cache.zig +2 -2
- package/project/.sdk/tm/zig/feature/debug.zig +5 -5
- package/project/.sdk/tm/zig/feature/netsim.zig +2 -2
- package/project/.sdk/tm/zig/feature/paging.zig +2 -2
- package/project/.sdk/tm/zig/feature/proxy.zig +15 -8
- package/project/.sdk/tm/zig/feature/streaming.zig +5 -5
- package/project/.sdk/tm/zig/feature/support.zig +3 -3
- package/project/.sdk/tm/zig/feature/telemetry.zig +5 -5
- package/project/.sdk/tm/zig/feature/test.zig +10 -5
- package/project/.sdk/tm/zig/test/fh.zig +10 -10
- package/project/.sdk/tm/zig/test/gotcha_test.zig +5 -5
- package/project/.sdk/tm/zig/test/omniresolver.zig +515 -0
- package/project/.sdk/tm/zig/test/omnismoke_test.zig +284 -0
- package/project/.sdk/tm/zig/test/pipeline_test.zig +8 -8
- package/project/.sdk/tm/zig/test/primary_utility_test.zig +145 -155
- package/project/.sdk/tm/zig/test/struct_corpus.zig +264 -187
- package/project/.sdk/tm/zig/test/vendor/omni/omni.zig +1314 -0
- package/project/.sdk/tm/zig/test/vendor/omni/regex.zig +446 -0
- package/project/.sdk/tm/zig/utility/voxgigstruct/regex.zig +7 -4
- package/project/.sdk/tm/zig/utility/voxgigstruct/struct.zig +356 -157
- package/project/sdkgen-package.json +1 -1
- package/src/action/doctor.ts +66 -2
- package/src/helpers/naming.ts +4 -2
- package/project/.sdk/tm/c/tests/runner.h +0 -274
- package/project/.sdk/tm/cpp/test/struct_runner.hpp +0 -314
- package/project/.sdk/tm/csharp/test/StructRunner.cs +0 -276
- package/project/.sdk/tm/dart/test/runner.dart +0 -406
- package/project/.sdk/tm/dart/test/struct_corpus.dart +0 -531
- package/project/.sdk/tm/elixir/test/support/struct_corpus.ex +0 -1088
- package/project/.sdk/tm/go/test/runner_test.go +0 -629
- package/project/.sdk/tm/go/test/struct_runner_test.go +0 -1094
- package/project/.sdk/tm/java/test/StructRunner.java +0 -281
- package/project/.sdk/tm/js/test/runner.js +0 -387
- package/project/.sdk/tm/kotlin/test/StructRunner.kt +0 -177
- package/project/.sdk/tm/lua/test/struct_runner.lua +0 -602
- package/project/.sdk/tm/ocaml/test/corpus_runner.ml +0 -185
- package/project/.sdk/tm/perl/t/struct_runner.pm +0 -275
- package/project/.sdk/tm/php/test/StructRunner.php +0 -275
- package/project/.sdk/tm/py/test/struct_runner.py +0 -411
- package/project/.sdk/tm/rb/test/struct_runner.rb +0 -309
- package/project/.sdk/tm/rust/tests/struct_runner/mod.rs +0 -424
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/Registry.ts +0 -90
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/http.ts +0 -66
- package/project/.sdk/tm/ts/test/vendor/omni/compat.ts +0 -188
- package/project/.sdk/tm/zig/test/struct_runner.zig +0 -464
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
<?php
|
|
2
|
+
// VENDORED: @voxgig/omni sdk-20260907-0029-0 (php/src/Util.php)
|
|
3
|
+
// Source: https://github.com/voxgig/omni @ 274708cc2d12b21707d975543953f845f8444be0 [tag: sdk-20260907-0029-0]
|
|
4
|
+
// License: MIT (c) voxgig - see repository LICENSE. Do not edit: resync from upstream.
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Omni internal JSON utilities.
|
|
8
|
+
*
|
|
9
|
+
* This module is deliberately self-contained: the omni runner must be able
|
|
10
|
+
* to test *any* library, including libraries that provide these same
|
|
11
|
+
* operations, so it can never borrow them from the system under test.
|
|
12
|
+
* Zero third-party dependencies, by design.
|
|
13
|
+
*
|
|
14
|
+
* NOTE: JSON is decoded into associative arrays, so an empty map and an
|
|
15
|
+
* empty list are the same PHP value. This is the one place where the PHP
|
|
16
|
+
* port cannot distinguish two spec values that other ports can.
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
declare(strict_types=1);
|
|
20
|
+
|
|
21
|
+
namespace Voxgig\Omni;
|
|
22
|
+
|
|
23
|
+
/** PHP has no `undefined`, so absence needs its own marker. */
|
|
24
|
+
final class Absent
|
|
25
|
+
{
|
|
26
|
+
private static ?Absent $instance = null;
|
|
27
|
+
|
|
28
|
+
public static function mark(): Absent
|
|
29
|
+
{
|
|
30
|
+
if (null === self::$instance) {
|
|
31
|
+
self::$instance = new Absent();
|
|
32
|
+
}
|
|
33
|
+
return self::$instance;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
public function __toString(): string
|
|
37
|
+
{
|
|
38
|
+
return 'ABSENT';
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
final class Util
|
|
43
|
+
{
|
|
44
|
+
public const NULLMARK = '__NULL__'; // Value is JSON null.
|
|
45
|
+
public const UNDEFMARK = '__UNDEF__'; // Value is not present.
|
|
46
|
+
public const EXISTSMARK = '__EXISTS__'; // Value exists (not undefined).
|
|
47
|
+
|
|
48
|
+
/** A map (JSON object)? */
|
|
49
|
+
public static function ismap($val): bool
|
|
50
|
+
{
|
|
51
|
+
return is_array($val) && !array_is_list($val);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/** A list (JSON array)? */
|
|
55
|
+
public static function islist($val): bool
|
|
56
|
+
{
|
|
57
|
+
return is_array($val) && array_is_list($val);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/** A container (map or list)? */
|
|
61
|
+
public static function isnode($val): bool
|
|
62
|
+
{
|
|
63
|
+
return is_array($val);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/** A JSON number? Booleans are not numbers. */
|
|
67
|
+
public static function isnum($val): bool
|
|
68
|
+
{
|
|
69
|
+
return (is_int($val) || is_float($val)) && !is_bool($val);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
public static function isabsent($val): bool
|
|
73
|
+
{
|
|
74
|
+
return $val instanceof Absent;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/** Deep copy a JSON value. Other values pass through by reference. */
|
|
78
|
+
public static function clone($val)
|
|
79
|
+
{
|
|
80
|
+
if (is_array($val)) {
|
|
81
|
+
$out = [];
|
|
82
|
+
foreach ($val as $key => $subval) {
|
|
83
|
+
$out[$key] = self::clone($subval);
|
|
84
|
+
}
|
|
85
|
+
return $out;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
return $val;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/** Read a value by path. Returns Absent when any step is missing. */
|
|
92
|
+
public static function getpath($val, array $path)
|
|
93
|
+
{
|
|
94
|
+
$current = $val;
|
|
95
|
+
|
|
96
|
+
foreach ($path as $part) {
|
|
97
|
+
if (self::islist($current)) {
|
|
98
|
+
if (!is_numeric($part)) {
|
|
99
|
+
return Absent::mark();
|
|
100
|
+
}
|
|
101
|
+
$index = (int) $part;
|
|
102
|
+
if ($index < 0 || $index >= count($current)) {
|
|
103
|
+
return Absent::mark();
|
|
104
|
+
}
|
|
105
|
+
$current = $current[$index];
|
|
106
|
+
} elseif (is_array($current)) {
|
|
107
|
+
$key = (string) $part;
|
|
108
|
+
if (!array_key_exists($key, $current)) {
|
|
109
|
+
return Absent::mark();
|
|
110
|
+
}
|
|
111
|
+
$current = $current[$key];
|
|
112
|
+
} else {
|
|
113
|
+
return Absent::mark();
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
return $current;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/** Depth-first walk: children first, then the containing node. */
|
|
121
|
+
public static function walk($val, callable $apply, $key = null, $parent = null, ?array $path = null)
|
|
122
|
+
{
|
|
123
|
+
$curpath = null === $path ? [] : $path;
|
|
124
|
+
|
|
125
|
+
if (is_array($val)) {
|
|
126
|
+
foreach (array_keys($val) as $childkey) {
|
|
127
|
+
$childpath = $curpath;
|
|
128
|
+
$childpath[] = $childkey;
|
|
129
|
+
$val[$childkey] = self::walk($val[$childkey], $apply, $childkey, $val, $childpath);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
return $apply($key, $val, $parent, $curpath);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/** Deep structural equality: numbers by value, bools never numbers. */
|
|
137
|
+
public static function deepequal($a, $b): bool
|
|
138
|
+
{
|
|
139
|
+
if (is_bool($a) || is_bool($b)) {
|
|
140
|
+
return $a === $b;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
if (self::isnum($a) && self::isnum($b)) {
|
|
144
|
+
// NaN equals NaN: deepequal is structural, not IEEE (as canonical).
|
|
145
|
+
return (float) $a === (float) $b
|
|
146
|
+
|| (is_nan((float) $a) && is_nan((float) $b));
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
if (self::isabsent($a) || self::isabsent($b)) {
|
|
150
|
+
return $a === $b;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
if (null === $a || null === $b) {
|
|
154
|
+
return $a === $b;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
if (is_array($a) && is_array($b)) {
|
|
158
|
+
if (count($a) !== count($b)) {
|
|
159
|
+
return false;
|
|
160
|
+
}
|
|
161
|
+
if (self::islist($a) !== self::islist($b) && 0 < count($a)) {
|
|
162
|
+
return false;
|
|
163
|
+
}
|
|
164
|
+
foreach ($a as $key => $val) {
|
|
165
|
+
if (!array_key_exists($key, $b)) {
|
|
166
|
+
return false;
|
|
167
|
+
}
|
|
168
|
+
if (!self::deepequal($val, $b[$key])) {
|
|
169
|
+
return false;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
return true;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
if (is_array($a) !== is_array($b)) {
|
|
176
|
+
return false;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
return $a === $b;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
/** Render a number the same way in every port: 5.0 prints as 5. */
|
|
183
|
+
public static function numstr($val): string
|
|
184
|
+
{
|
|
185
|
+
if (is_float($val)) {
|
|
186
|
+
if (is_nan($val) || is_infinite($val)) {
|
|
187
|
+
return 'null';
|
|
188
|
+
}
|
|
189
|
+
if ($val === floor($val) && abs($val) < 9007199254740992.0) {
|
|
190
|
+
return (string) (int) $val;
|
|
191
|
+
}
|
|
192
|
+
return rtrim(rtrim(sprintf('%.17g', $val), '0'), '.');
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
return (string) $val;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
public static function quote($val): string
|
|
199
|
+
{
|
|
200
|
+
$out = '"';
|
|
201
|
+
$text = (string) $val;
|
|
202
|
+
$len = strlen($text);
|
|
203
|
+
for ($i = 0; $i < $len; $i++) {
|
|
204
|
+
$char = $text[$i];
|
|
205
|
+
if ('"' === $char) {
|
|
206
|
+
$out .= '\\"';
|
|
207
|
+
} elseif ('\\' === $char) {
|
|
208
|
+
$out .= '\\\\';
|
|
209
|
+
} elseif ("\n" === $char) {
|
|
210
|
+
$out .= '\\n';
|
|
211
|
+
} elseif ("\r" === $char) {
|
|
212
|
+
$out .= '\\r';
|
|
213
|
+
} elseif ("\t" === $char) {
|
|
214
|
+
$out .= '\\t';
|
|
215
|
+
} elseif (ord($char) < 0x20) {
|
|
216
|
+
$out .= sprintf('\\u%04x', ord($char));
|
|
217
|
+
} else {
|
|
218
|
+
$out .= $char;
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
return $out . '"';
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
/** Compact JSON text with map keys sorted, identical in every port. */
|
|
225
|
+
public static function jsonstr($val): string
|
|
226
|
+
{
|
|
227
|
+
if (self::isabsent($val)) {
|
|
228
|
+
return 'undefined';
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
if (null === $val) {
|
|
232
|
+
return 'null';
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
if (is_bool($val)) {
|
|
236
|
+
return $val ? 'true' : 'false';
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
if (is_string($val)) {
|
|
240
|
+
return self::quote($val);
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
if (self::isnum($val)) {
|
|
244
|
+
return self::numstr($val);
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
if (self::islist($val)) {
|
|
248
|
+
$parts = [];
|
|
249
|
+
foreach ($val as $entry) {
|
|
250
|
+
$parts[] = self::jsonstr($entry);
|
|
251
|
+
}
|
|
252
|
+
return '[' . implode(',', $parts) . ']';
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
if (is_array($val)) {
|
|
256
|
+
$keys = array_map('strval', array_keys($val));
|
|
257
|
+
sort($keys);
|
|
258
|
+
$parts = [];
|
|
259
|
+
foreach ($keys as $key) {
|
|
260
|
+
$parts[] = self::quote($key) . ':' . self::jsonstr($val[$key]);
|
|
261
|
+
}
|
|
262
|
+
return '{' . implode(',', $parts) . '}';
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
if (is_callable($val)) {
|
|
266
|
+
return '[Function]';
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
return self::quote((string) $val);
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
/** Strings verbatim, everything else as compact JSON. */
|
|
273
|
+
public static function stringify($val): string
|
|
274
|
+
{
|
|
275
|
+
return is_string($val) ? $val : self::jsonstr($val);
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
/** Render a path as a dotted string. */
|
|
279
|
+
public static function pathify(?array $path): string
|
|
280
|
+
{
|
|
281
|
+
return implode('.', array_map('strval', $path ?? []));
|
|
282
|
+
}
|
|
283
|
+
}
|
|
@@ -37,13 +37,20 @@ class ProjectNameMakeSpec
|
|
|
37
37
|
'suffix' => $suffix, 'step' => 'start',
|
|
38
38
|
]);
|
|
39
39
|
|
|
40
|
-
|
|
40
|
+
// prepare_method answers null for an op name outside the convention
|
|
41
|
+
// (mirrors the ts reference, where methodMap[key] is undefined) -
|
|
42
|
+
// which then fails the allow check below, never a TypeError and
|
|
43
|
+
// never a silently-allowed empty method.
|
|
44
|
+
$method = ($utility->prepare_method)($ctx);
|
|
41
45
|
|
|
42
46
|
$allow_method = \Voxgig\Struct\Struct::getpath($options, 'allow.method') ?? '';
|
|
43
|
-
if (
|
|
47
|
+
if (!is_string($method) || '' === $method
|
|
48
|
+
|| strpos($allow_method, $method) === false) {
|
|
49
|
+
$shown = is_string($method) ? $method : '';
|
|
44
50
|
return [null, $ctx->make_error('spec_method_allow',
|
|
45
|
-
"Method \"{$
|
|
51
|
+
"Method \"{$shown}\" not allowed by SDK option allow.method value: \"{$allow_method}\"")];
|
|
46
52
|
}
|
|
53
|
+
$ctx->spec->method = $method;
|
|
47
54
|
|
|
48
55
|
$ctx->spec->params = ($utility->prepare_params)($ctx);
|
|
49
56
|
$ctx->spec->query = ($utility->prepare_query)($ctx);
|
|
@@ -8,7 +8,13 @@ class ProjectNamePrepareBody
|
|
|
8
8
|
public static function call(ProjectNameContext $ctx): mixed
|
|
9
9
|
{
|
|
10
10
|
if ($ctx->op->input === 'data') {
|
|
11
|
-
|
|
11
|
+
$body = ($ctx->utility->transform_request)($ctx);
|
|
12
|
+
// PHP cannot tell an empty map from an empty list, and this
|
|
13
|
+
// vendored struct answers [] where the canonical transform
|
|
14
|
+
// answers NO VALUE for a reference that resolves to nothing -
|
|
15
|
+
// collapse both to "no body" (the shared corpus pins the
|
|
16
|
+
// missing-reference case to null).
|
|
17
|
+
return (is_array($body) && 0 === count($body)) ? null : $body;
|
|
12
18
|
}
|
|
13
19
|
return null;
|
|
14
20
|
}
|
|
@@ -14,7 +14,7 @@ class ProjectNamePrepareMethod
|
|
|
14
14
|
'patch' => 'PATCH',
|
|
15
15
|
];
|
|
16
16
|
|
|
17
|
-
public static function call(ProjectNameContext $ctx): string
|
|
17
|
+
public static function call(ProjectNameContext $ctx): ?string
|
|
18
18
|
{
|
|
19
19
|
// The API definition is authoritative: a POST-only or PATCH-based API
|
|
20
20
|
// exposes `update` as POST or PATCH, not the PUT the op name implies.
|
|
@@ -27,6 +27,10 @@ class ProjectNamePrepareMethod
|
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
// No default: an op name outside the convention resolves to no method,
|
|
31
|
+
// exactly as the ts reference (`methodMap[key]` is undefined there).
|
|
32
|
+
// The silent-pass inline runner hid a stray 'GET' fallback here; the
|
|
33
|
+
// shared corpus (prepareMethod, opname "bad" -> null) pins it now.
|
|
34
|
+
return self::METHOD_MAP[$ctx->op->name] ?? null;
|
|
31
35
|
}
|
|
32
36
|
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# VENDORED: @voxgig/plugin 0.1.6 (python/voxgig_plugin/__init__.py)
|
|
2
|
+
# Source: https://github.com/voxgig/plugin @ b48ae643eb0eb56c5ebe3198da98cecdf6a7f7fc [tag: sdk-20260907-0029-0]
|
|
3
|
+
# License: MIT (c) voxgig - see repository LICENSE. Do not edit: resync from upstream.
|
|
4
|
+
"""The canonical surface `make parity` checks (AGENTS.md section 4).
|
|
5
|
+
|
|
6
|
+
Small on purpose (section 19): everything else is methods on the host and
|
|
7
|
+
instance types, because a library that grows a second public entry point
|
|
8
|
+
per feature is a library twenty ports pay for twice.
|
|
9
|
+
"""
|
|
10
|
+
|
|
11
|
+
from .types import PluginError, formaterror, codeof, DETAIL_ORDER, STATUSES
|
|
12
|
+
from .ref import parse_ref, format_ref, check_name, check_tag, canon_ref
|
|
13
|
+
from .config import normalize_config, resolve_options, check_shape
|
|
14
|
+
from .order import resolve_order
|
|
15
|
+
from .resolve import resolve_candidates, resolve_from
|
|
16
|
+
from .env import apply_env, encode_ref
|
|
17
|
+
from .version import parse_range, parse_version, satisfies
|
|
18
|
+
from .capability import resolve_capability, matches
|
|
19
|
+
from .graph import resolve_graph
|
|
20
|
+
from .point import emit, compose, provider
|
|
21
|
+
from .export import resolve_export
|
|
22
|
+
from .catalog import make_catalog, Catalog
|
|
23
|
+
from .host import make_host, Host, Inst
|
|
24
|
+
|
|
25
|
+
__all__ = [
|
|
26
|
+
'make_host', 'make_catalog',
|
|
27
|
+
'parse_ref', 'format_ref', 'check_name', 'check_tag', 'canon_ref',
|
|
28
|
+
'normalize_config', 'resolve_options', 'check_shape',
|
|
29
|
+
'resolve_order', 'resolve_candidates', 'resolve_from',
|
|
30
|
+
'apply_env', 'encode_ref',
|
|
31
|
+
'parse_range', 'parse_version', 'satisfies',
|
|
32
|
+
'resolve_capability', 'matches', 'resolve_graph',
|
|
33
|
+
'emit', 'compose', 'provider', 'resolve_export',
|
|
34
|
+
'PluginError', 'formaterror', 'codeof', 'DETAIL_ORDER', 'STATUSES',
|
|
35
|
+
'Catalog', 'Host', 'Inst',
|
|
36
|
+
]
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
# VENDORED: @voxgig/plugin 0.1.6 (python/voxgig_plugin/capability.py)
|
|
2
|
+
# Source: https://github.com/voxgig/plugin @ b48ae643eb0eb56c5ebe3198da98cecdf6a7f7fc [tag: sdk-20260907-0029-0]
|
|
3
|
+
# License: MIT (c) voxgig - see repository LICENSE. Do not edit: resync from upstream.
|
|
4
|
+
"""Capabilities (section 11.1).
|
|
5
|
+
|
|
6
|
+
A DEPENDENCY IS ON A CAPABILITY, NOT ON A REF - because it is a dependency
|
|
7
|
+
on something that can do the job, and which instance is doing it is
|
|
8
|
+
exactly the configuration detail a plugin must not care about.
|
|
9
|
+
|
|
10
|
+
But A BINDING IS TO AN INSTANCE, not to a capability, which is what
|
|
11
|
+
decides behaviour when the bound provider leaves while another match
|
|
12
|
+
remains.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
import functools
|
|
16
|
+
|
|
17
|
+
from .version import satisfiesq
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
def resolve_capability(req, candidates):
|
|
21
|
+
"""Rank the matching live providers and return them best-first:
|
|
22
|
+
highest `version`, then LOWEST `priority` (default 0), then
|
|
23
|
+
declaration position `pos` ascending.
|
|
24
|
+
|
|
25
|
+
`priority` is a field on the capability rather than section 7's
|
|
26
|
+
`order` band, because bands live on POINT BINDINGS: a provider may
|
|
27
|
+
have several bindings with different bands, or none at all, so a rank
|
|
28
|
+
reaching for one would be undefined in the common case.
|
|
29
|
+
|
|
30
|
+
Without a total rank, "any provider satisfies" is true of the GRAPH
|
|
31
|
+
and useless to the PLUGIN - two ports could bind different `store`
|
|
32
|
+
instances, both resolve green, and behave differently, which is
|
|
33
|
+
precisely the divergence a shared corpus exists to catch.
|
|
34
|
+
"""
|
|
35
|
+
hits = [c for c in candidates if matches(req, c.get('provides') or {})]
|
|
36
|
+
return sorted(hits, key=functools.cmp_to_key(rank))
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
def rank(a, b):
|
|
40
|
+
ap, bp = a.get('provides') or {}, b.get('provides') or {}
|
|
41
|
+
av, bv = ap.get('version'), bp.get('version')
|
|
42
|
+
if av != bv:
|
|
43
|
+
# An ABSENT version sorts LAST, whatever the other is - "no
|
|
44
|
+
# version" loses to every version rather than being read as
|
|
45
|
+
# 0.0.0.
|
|
46
|
+
if None is av:
|
|
47
|
+
return 1
|
|
48
|
+
if None is bv:
|
|
49
|
+
return -1
|
|
50
|
+
found = compare(bv, av) # highest version FIRST
|
|
51
|
+
if 0 != found:
|
|
52
|
+
return found
|
|
53
|
+
api = ap.get('priority') or 0
|
|
54
|
+
bpi = bp.get('priority') or 0
|
|
55
|
+
if api != bpi:
|
|
56
|
+
return api - bpi # lowest priority first
|
|
57
|
+
return (a.get('pos') or 0) - (b.get('pos') or 0)
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
def matches(req, prov):
|
|
61
|
+
if req.get('name') != prov.get('name'):
|
|
62
|
+
return False
|
|
63
|
+
|
|
64
|
+
if None is not req.get('range'):
|
|
65
|
+
if None is prov.get('version'):
|
|
66
|
+
return False
|
|
67
|
+
if not satisfiesq(prov['version'], req['range']):
|
|
68
|
+
return False
|
|
69
|
+
|
|
70
|
+
# `match` is checked against the provider's `attrs`, key by key. A key
|
|
71
|
+
# the provider does not carry is a miss, not a pass: a requirement
|
|
72
|
+
# asking for `transactional: true` must not be satisfied by a provider
|
|
73
|
+
# that never said.
|
|
74
|
+
if None is not req.get('match'):
|
|
75
|
+
attrs = prov.get('attrs') or {}
|
|
76
|
+
for key in req['match']:
|
|
77
|
+
if key not in attrs:
|
|
78
|
+
return False
|
|
79
|
+
if not matchvalue(req['match'][key], attrs[key]):
|
|
80
|
+
return False
|
|
81
|
+
|
|
82
|
+
return True
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
def matchvalue(want, got):
|
|
86
|
+
"""PARTIAL MATCH, RECURSING INTO MAPS (section 11.1).
|
|
87
|
+
|
|
88
|
+
Section 11.1 defines `match` as "a partial match against `attrs`, with
|
|
89
|
+
exactly the semantics voxgig/struct and the omni corpus already define
|
|
90
|
+
for `match` - every leaf in the requirement must be present and equal
|
|
91
|
+
in the capability, keys not mentioned are not checked."
|
|
92
|
+
|
|
93
|
+
A LIST IS COMPARED LEAF-WISE AT THE SAME LENGTH, not as a subset.
|
|
94
|
+
"the first two of your three regions" is not something `match` can
|
|
95
|
+
say, and inventing a spelling for it would be inventing the filter
|
|
96
|
+
language section 11.1 explicitly declines to add.
|
|
97
|
+
"""
|
|
98
|
+
if isinstance(want, dict):
|
|
99
|
+
if not isinstance(got, dict):
|
|
100
|
+
return False
|
|
101
|
+
for key in want:
|
|
102
|
+
if key not in got:
|
|
103
|
+
return False
|
|
104
|
+
if not matchvalue(want[key], got[key]):
|
|
105
|
+
return False
|
|
106
|
+
return True
|
|
107
|
+
|
|
108
|
+
if isinstance(want, list):
|
|
109
|
+
if not isinstance(got, list) or len(want) != len(got):
|
|
110
|
+
return False
|
|
111
|
+
for i in range(len(want)):
|
|
112
|
+
if not matchvalue(want[i], got[i]):
|
|
113
|
+
return False
|
|
114
|
+
return True
|
|
115
|
+
|
|
116
|
+
# PYTHON'S `True == 1` IS THE TRAP THIS LINE EXISTS FOR. The canonical
|
|
117
|
+
# compares with `===`, under which `true` and `1` are different
|
|
118
|
+
# values; Python's `==` says they are equal, so a capability
|
|
119
|
+
# advertising `transactional: 1` would satisfy a requirement for
|
|
120
|
+
# `transactional: true` here and nowhere else.
|
|
121
|
+
if isinstance(want, bool) != isinstance(got, bool):
|
|
122
|
+
return False
|
|
123
|
+
return want == got
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
def compare(a, b):
|
|
127
|
+
pa = [toint(x) for x in a.split('.')]
|
|
128
|
+
pb = [toint(x) for x in b.split('.')]
|
|
129
|
+
for i in range(3):
|
|
130
|
+
x = pa[i] if i < len(pa) else 0
|
|
131
|
+
y = pb[i] if i < len(pb) else 0
|
|
132
|
+
if x != y:
|
|
133
|
+
return -1 if x < y else 1
|
|
134
|
+
return 0
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
def toint(text):
|
|
138
|
+
try:
|
|
139
|
+
return int(text)
|
|
140
|
+
except ValueError:
|
|
141
|
+
return 0
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# VENDORED: @voxgig/plugin 0.1.6 (python/voxgig_plugin/catalog.py)
|
|
2
|
+
# Source: https://github.com/voxgig/plugin @ b48ae643eb0eb56c5ebe3198da98cecdf6a7f7fc [tag: sdk-20260907-0029-0]
|
|
3
|
+
# License: MIT (c) voxgig - see repository LICENSE. Do not edit: resync from upstream.
|
|
4
|
+
"""The definition catalog (section 10.1).
|
|
5
|
+
|
|
6
|
+
A definition is registered once and may back many instances. Option shapes
|
|
7
|
+
are validated AT REGISTRATION, not when a document happens to exercise a
|
|
8
|
+
key - so a malformed shape fails once, and in the same place everywhere
|
|
9
|
+
(section 9.4).
|
|
10
|
+
"""
|
|
11
|
+
|
|
12
|
+
from .types import fail
|
|
13
|
+
from .ref import check_name
|
|
14
|
+
from .config import check_shape
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class Catalog:
|
|
18
|
+
def __init__(self):
|
|
19
|
+
self._defs = {}
|
|
20
|
+
|
|
21
|
+
def add(self, definition):
|
|
22
|
+
if not isinstance(definition, dict) or \
|
|
23
|
+
not check_name(definition.get('name')):
|
|
24
|
+
name = definition.get('name') if isinstance(definition, dict) \
|
|
25
|
+
else definition
|
|
26
|
+
fail('plugin_definition_name',
|
|
27
|
+
'invalid definition name: ' + str(name))
|
|
28
|
+
# Validate the shape HERE. Deferring it to resolution time means a
|
|
29
|
+
# malformed shape surfaces at a different moment in every host
|
|
30
|
+
# that loads it, which is the divergence the stated domain exists
|
|
31
|
+
# to prevent.
|
|
32
|
+
if definition.get('shape'):
|
|
33
|
+
check_shape(definition['shape'])
|
|
34
|
+
self._defs[definition['name']] = definition
|
|
35
|
+
|
|
36
|
+
def get(self, name):
|
|
37
|
+
return self._defs.get(name)
|
|
38
|
+
|
|
39
|
+
def has(self, name):
|
|
40
|
+
return name in self._defs
|
|
41
|
+
|
|
42
|
+
def names(self):
|
|
43
|
+
return sorted(self._defs)
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
def make_catalog(definitions=None):
|
|
47
|
+
catalog = Catalog()
|
|
48
|
+
for definition in definitions or []:
|
|
49
|
+
catalog.add(definition)
|
|
50
|
+
return catalog
|