@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
|
@@ -78,7 +78,10 @@ const Package = cmp(async function Package(props: any) {
|
|
|
78
78
|
|
|
79
79
|
${depsBlock}
|
|
80
80
|
|
|
81
|
-
|
|
81
|
+
# test/vendor carries the vendored @voxgig/omni engine the corpus suites
|
|
82
|
+
# run through; it is a .ex tree, so mix has to be told to compile it, and
|
|
83
|
+
# only under :test - a consumer's library build never sees the runner.
|
|
84
|
+
defp elixirc_paths(:test), do: ["lib", "test/support", "test/vendor"]
|
|
82
85
|
defp elixirc_paths(_), do: ["lib"]
|
|
83
86
|
|
|
84
87
|
defp package do
|
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
each,
|
|
12
12
|
configDefinition,
|
|
13
13
|
configReprSetting,
|
|
14
|
+
goModule,
|
|
14
15
|
isAuthActive,
|
|
15
16
|
isConfigData,
|
|
16
17
|
resolveAuthPrefix,
|
|
@@ -75,6 +76,53 @@ const Config = cmp(async function Config(props: any) {
|
|
|
75
76
|
const { def: configDef, json: configJson } = configDefinition(model, target.name)
|
|
76
77
|
const asData = isConfigData(configJson, configReprSetting(model))
|
|
77
78
|
|
|
79
|
+
// PLUGIN DEFINITION IMPORTS AND THE FeaturePlugins MAP (the go peer of
|
|
80
|
+
// Config_ts's pluginImports/pluginDefs).
|
|
81
|
+
//
|
|
82
|
+
// Upstream sekreto replaced its self-registration registry with
|
|
83
|
+
// voxgig/plugin definitions: a provider kind the caller did not pass in
|
|
84
|
+
// via `Plugins: [...]` is unknown to that Sekreto. So the config imports
|
|
85
|
+
// each active plugin's exported Definition BY NAME (the model's
|
|
86
|
+
// per-target `def` map - `aws.Secrets`, a package-qualified go symbol)
|
|
87
|
+
// and hands the list to the feature through core.FeaturePlugins.
|
|
88
|
+
//
|
|
89
|
+
// Emitted in core (not in the feature package) so the dependency runs
|
|
90
|
+
// core -> plugins -> sekreto -> plugin with no cycle; the feature reads
|
|
91
|
+
// it back as []any and type-asserts, so a tree with the feature present
|
|
92
|
+
// but never selected still compiles.
|
|
93
|
+
const gomodule = goModule(model, target.name)
|
|
94
|
+
const pluginPaths = new Set<string>()
|
|
95
|
+
const featurePlugins: Record<string, string[]> = {}
|
|
96
|
+
|
|
97
|
+
each(feature, (f: any) => {
|
|
98
|
+
const syms: string[] = []
|
|
99
|
+
each(f.plugin, (plugin: any) => {
|
|
100
|
+
// Filter on `active` HERE rather than trusting the feature object to
|
|
101
|
+
// arrive filtered (see Config_ts.pluginImports: getting this wrong
|
|
102
|
+
// emits an import for a package the trim just deleted).
|
|
103
|
+
if (false === plugin.active || null == plugin.active) return
|
|
104
|
+
for (const [sym, one] of Object.entries(plugin.def?.go || {})) {
|
|
105
|
+
// 'feature/secrets/plugins/aws/aws.go' -> its PACKAGE directory.
|
|
106
|
+
pluginPaths.add(String(one).replace(/\/[^/]+$/, ''))
|
|
107
|
+
syms.push(sym)
|
|
108
|
+
}
|
|
109
|
+
})
|
|
110
|
+
if (0 < syms.length) {
|
|
111
|
+
featurePlugins[f.name] = syms.sort()
|
|
112
|
+
}
|
|
113
|
+
})
|
|
114
|
+
|
|
115
|
+
const pluginImportLines = Array.from(pluginPaths).sort()
|
|
116
|
+
.map((p: string) => `\t"${gomodule}/${p}"\n`).join('')
|
|
117
|
+
const pluginImportBlock = '' === pluginImportLines ? '' :
|
|
118
|
+
'\n' + pluginImportLines
|
|
119
|
+
|
|
120
|
+
const featurePluginsBlock =
|
|
121
|
+
'var featurePlugins = map[string][]any{\n' +
|
|
122
|
+
Object.keys(featurePlugins).sort().map((fname: string) =>
|
|
123
|
+
`\t"${fname}": {${featurePlugins[fname].join(', ')}},\n`).join('') +
|
|
124
|
+
'}\n'
|
|
125
|
+
|
|
78
126
|
File({ name: 'config.' + target.ext }, () => {
|
|
79
127
|
|
|
80
128
|
// ABOVE THE THRESHOLD: emit the model as DATA.
|
|
@@ -96,7 +144,7 @@ import (
|
|
|
96
144
|
"encoding/json"
|
|
97
145
|
"math"
|
|
98
146
|
"sync"
|
|
99
|
-
)
|
|
147
|
+
${pluginImportBlock})
|
|
100
148
|
|
|
101
149
|
// The API model, emitted as data rather than as a composite literal: see
|
|
102
150
|
// sdkgen rung L1. Parsed by MakeConfig, and parsed once by SharedConfig.
|
|
@@ -153,7 +201,7 @@ func MakeConfig() map[string]any {
|
|
|
153
201
|
|
|
154
202
|
import (
|
|
155
203
|
"sync"
|
|
156
|
-
)
|
|
204
|
+
${pluginImportBlock})
|
|
157
205
|
|
|
158
206
|
`)
|
|
159
207
|
|
|
@@ -206,6 +254,15 @@ configDef.entity, 2)},
|
|
|
206
254
|
}
|
|
207
255
|
|
|
208
256
|
Content(`
|
|
257
|
+
// The plugin definitions the model selected per feature, as []any so a
|
|
258
|
+
// feature package can consume them without core naming its types. Empty
|
|
259
|
+
// when no active feature declares active plugin groups for this target.
|
|
260
|
+
${featurePluginsBlock}
|
|
261
|
+
// FeaturePlugins is the definitions list for one feature's chain.
|
|
262
|
+
func FeaturePlugins(name string) []any {
|
|
263
|
+
return featurePlugins[name]
|
|
264
|
+
}
|
|
265
|
+
|
|
209
266
|
var (
|
|
210
267
|
sharedConfigOnce sync.Once
|
|
211
268
|
sharedConfigVal map[string]any
|
|
@@ -4,7 +4,7 @@ import * as Path from 'node:path'
|
|
|
4
4
|
import {
|
|
5
5
|
cmp, each, names, cmap,
|
|
6
6
|
List, File, Content, Copy, Folder, Fragment, Line, FeatureHook,
|
|
7
|
-
entityClassName, entityCollection, goModule, goPackageIdent,
|
|
7
|
+
entityClassName, entityCollection, goModule, goPackageIdent, pluginExcludes,
|
|
8
8
|
targetFeatures,
|
|
9
9
|
TEST_CONTROL_EXCLUDE
|
|
10
10
|
} from '@voxgig/sdkgen'
|
|
@@ -60,7 +60,13 @@ const Main = cmp(async function Main(props: any) {
|
|
|
60
60
|
// downstream consumers.
|
|
61
61
|
Copy({
|
|
62
62
|
from: 'tm/' + target.name,
|
|
63
|
-
|
|
63
|
+
// pluginExcludes: the generate-time plugin trim (an INACTIVE plugin
|
|
64
|
+
// group's declared files stay out of the tree - the model's `path`
|
|
65
|
+
// entries are target-root-relative, which is this Copy's root). The
|
|
66
|
+
// FEATURE-level trim for go stays an add-time concern (vendor-tag
|
|
67
|
+
// rollout, Decision 5).
|
|
68
|
+
exclude: [/src\//, /utility\/struct\/go\.mod$/, TEST_CONTROL_EXCLUDE,
|
|
69
|
+
...pluginExcludes(model)],
|
|
64
70
|
replace: {
|
|
65
71
|
...props.ctx$.stdrep,
|
|
66
72
|
GOMODULE: gomodule,
|
|
@@ -24,11 +24,12 @@ const Test = cmp(function Test(props: any) {
|
|
|
24
24
|
// Write-once: a project's edited control file survives regeneration.
|
|
25
25
|
TestControl({ target, dir: 'test' })
|
|
26
26
|
|
|
27
|
-
// The shared test infrastructure (RunnerSupport,
|
|
28
|
-
//
|
|
29
|
-
//
|
|
30
|
-
//
|
|
31
|
-
//
|
|
27
|
+
// The shared test infrastructure (RunnerSupport, the vendored omni
|
|
28
|
+
// runner under test/vendor/omni with its OmniResolver/OmniSmokeTest,
|
|
29
|
+
// FeatureHarness, PipelineTest, FeatureTest, NetsimTest,
|
|
30
|
+
// PrimaryUtilityTest, CustomUtilityTest, StructCorpusTest, ExistsTest
|
|
31
|
+
// and sdk-test-control.json) ships as templates in tm/java/test/ and
|
|
32
|
+
// is copied by Main_java. Here we generate only the API-specific tests.
|
|
32
33
|
const entity = each(entityCollection(model))
|
|
33
34
|
.filter((e: any) => false !== e.active)
|
|
34
35
|
each(entity, (entity: ModelEntity) => {
|
|
@@ -24,11 +24,12 @@ const Test = cmp(function Test(props: any) {
|
|
|
24
24
|
// Write-once: a project's edited control file survives regeneration.
|
|
25
25
|
TestControl({ target, dir: 'test' })
|
|
26
26
|
|
|
27
|
-
// The shared test infrastructure (RunnerSupport,
|
|
28
|
-
//
|
|
29
|
-
//
|
|
30
|
-
//
|
|
31
|
-
//
|
|
27
|
+
// The shared test infrastructure (RunnerSupport, the vendored omni
|
|
28
|
+
// runner under test/vendor/omni with its OmniResolver/OmniSmokeTest,
|
|
29
|
+
// FeatureHarness, PipelineTest, FeatureTest, NetsimTest,
|
|
30
|
+
// PrimaryUtilityTest, CustomUtilityTest, StructCorpusTest, ExistsTest
|
|
31
|
+
// and sdk-test-control.json) ships as templates in tm/kotlin/test/ and
|
|
32
|
+
// is copied by Main_kotlin. Here we generate only the API-specific tests.
|
|
32
33
|
const entity = each(entityCollection(model))
|
|
33
34
|
.filter((e: any) => false !== e.active)
|
|
34
35
|
each(entity, (entity: ModelEntity) => {
|
|
@@ -36,6 +36,22 @@ version = "${packageVersion(model, target.name)}"
|
|
|
36
36
|
defaultTargets = ["SdkClient"]
|
|
37
37
|
|
|
38
38
|
${libBlocks}
|
|
39
|
+
# The corpus ENGINE: the vendored @voxgig/omni Lean port, source rather than
|
|
40
|
+
# a dependency. Its own lean_lib so Lake can find the module, and
|
|
41
|
+
# deliberately NOT in defaultTargets: only the test executables import it, so
|
|
42
|
+
# \`lake build\` compiles the shipped library without it and nothing a
|
|
43
|
+
# consumer installs ever names omni. Lake has no test-scoped dependency, so
|
|
44
|
+
# vendoring is what keeps that isolation.
|
|
45
|
+
[[lean_lib]]
|
|
46
|
+
name = "Omni"
|
|
47
|
+
srcDir = "test/vendor/omni"
|
|
48
|
+
|
|
49
|
+
# The adapter that drives omni's native API with subjects built from this
|
|
50
|
+
# SDK's own utilities. Imported by the corpus suites and the smoke test.
|
|
51
|
+
[[lean_lib]]
|
|
52
|
+
name = "OmniResolver"
|
|
53
|
+
srcDir = "test"
|
|
54
|
+
|
|
39
55
|
[[lean_exe]]
|
|
40
56
|
name = "runner"
|
|
41
57
|
srcDir = "test"
|
|
@@ -55,6 +71,13 @@ root = "TPrimaryUtility"
|
|
|
55
71
|
name = "feature"
|
|
56
72
|
srcDir = "test"
|
|
57
73
|
root = "TFeature"
|
|
74
|
+
|
|
75
|
+
# Smoke test for the vendored engine itself: a runner that cannot FAIL a bad
|
|
76
|
+
# entry would turn every corpus suite vacuously green.
|
|
77
|
+
[[lean_exe]]
|
|
78
|
+
name = "omnismoke"
|
|
79
|
+
srcDir = "test"
|
|
80
|
+
root = "OmniSmoke"
|
|
58
81
|
`)
|
|
59
82
|
})
|
|
60
83
|
|
|
@@ -6,6 +6,7 @@ const ReadmeTopTest = cmp(function ReadmeTopTest(props: any) {
|
|
|
6
6
|
Content(`\`\`\`bash
|
|
7
7
|
cd ${target.name}
|
|
8
8
|
lake build
|
|
9
|
+
lake exe omnismoke # the vendored @voxgig/omni corpus engine itself
|
|
9
10
|
lake exe primary # shared corpus: request-shaping utilities
|
|
10
11
|
lake exe feature # the feature catalog (retry, cache, rbac, netsim, …)
|
|
11
12
|
lake exe structcorpus # shared corpus: the vendored struct model
|
|
@@ -37,11 +37,15 @@ const Main = cmp(async function Main(props: any) {
|
|
|
37
37
|
|
|
38
38
|
// Copy tm/ocaml verbatim with ProjectName replacement. The src/ subtree
|
|
39
39
|
// only stages per-feature custom-source dirs (srcfeature: false, so unused),
|
|
40
|
-
// excluded like the go/rust targets. Stray compiled artifacts
|
|
41
|
-
// defensively.
|
|
40
|
+
// excluded like the go/rust targets. Stray compiled artifacts and built
|
|
41
|
+
// test binaries are excluded defensively. test/vendor/omni (the vendored
|
|
42
|
+
// @voxgig/omni corpus engine) rides along verbatim - the replacements are
|
|
43
|
+
// ProjectName-shaped and the port names nothing project-specific, so it
|
|
44
|
+
// lands byte-identical to its recorded vendored.json digest.
|
|
42
45
|
Copy({
|
|
43
46
|
from: 'tm/' + target.name,
|
|
44
|
-
exclude: [/src\//, /\.(cmi|cmo|cmx|cma|cmxa|o|a)$/, /a\.out$/,
|
|
47
|
+
exclude: [/src\//, /\.(cmi|cmo|cmx|cma|cmxa|o|a)$/, /a\.out$/,
|
|
48
|
+
/run_sdk_test$/, /run_omni_smoke$/, /run_struct_corpus$/, /run_primary_corpus$/],
|
|
45
49
|
replace: {
|
|
46
50
|
...props.ctx$.stdrep,
|
|
47
51
|
}
|
|
@@ -32,6 +32,64 @@ import {
|
|
|
32
32
|
} from './utility_py'
|
|
33
33
|
|
|
34
34
|
|
|
35
|
+
// PLUGIN DEFINITION IMPORTS AND THE FEATURE_PLUGINS MAP (mirrors
|
|
36
|
+
// cmp/ts/Config_ts.ts).
|
|
37
|
+
//
|
|
38
|
+
// Upstream sekreto replaced its self-registration registry with
|
|
39
|
+
// voxgig/plugin definitions: a provider kind the caller did not pass in
|
|
40
|
+
// via `plugins: [...]` is unknown to that Sekreto. So config imports each
|
|
41
|
+
// active plugin's exported definition BY NAME (the model's `def.py` map)
|
|
42
|
+
// and hands the list to the feature through FEATURE_PLUGINS.
|
|
43
|
+
//
|
|
44
|
+
// The `def` map is declared in the model rather than derived from
|
|
45
|
+
// filenames because one module may export several definitions (sekreto's
|
|
46
|
+
// aws.py exports awssecrets AND awsparams). A def value is the module's
|
|
47
|
+
// path under tm/py ('pkg/feature/.../aws.py'); Main copies tm/py/pkg INTO
|
|
48
|
+
// the <name>_sdk package, so the import module is the path with `pkg/`
|
|
49
|
+
// swapped for the package name and slashes for dots.
|
|
50
|
+
function pluginImports(feature: any, pkg: string) {
|
|
51
|
+
each(feature, (f: any) => {
|
|
52
|
+
// path -> [symbol, ...], so one import line serves a two-definition
|
|
53
|
+
// module.
|
|
54
|
+
const bypath: Record<string, string[]> = {}
|
|
55
|
+
|
|
56
|
+
each(f.plugin, (plugin: any) => {
|
|
57
|
+
// Filter on `active` HERE rather than trusting the feature object
|
|
58
|
+
// to arrive filtered: getting it wrong in this direction emits an
|
|
59
|
+
// import for a module the plugin trim just deleted - an SDK that
|
|
60
|
+
// does not import, rather than one that merely carries too much.
|
|
61
|
+
if (false === plugin.active || null == plugin.active) return
|
|
62
|
+
|
|
63
|
+
for (const [sym, one] of Object.entries(plugin.def?.py || {})) {
|
|
64
|
+
const path = String(one)
|
|
65
|
+
; (bypath[path] = bypath[path] || []).push(sym)
|
|
66
|
+
}
|
|
67
|
+
})
|
|
68
|
+
|
|
69
|
+
for (const path of Object.keys(bypath).sort()) {
|
|
70
|
+
const mod = pkg + '.' +
|
|
71
|
+
path.replace(/^pkg\//, '').replace(/\.py$/, '').replace(/\//g, '.')
|
|
72
|
+
Line(`from ${mod} import ${bypath[path].sort().join(', ')}`)
|
|
73
|
+
}
|
|
74
|
+
})
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
// The FEATURE_PLUGINS entries: one line per feature that has any active
|
|
78
|
+
// plugin definitions, listing the imported symbols.
|
|
79
|
+
function pluginDefs(feature: any) {
|
|
80
|
+
each(feature, (f: any) => {
|
|
81
|
+
const syms: string[] = []
|
|
82
|
+
each(f.plugin, (plugin: any) => {
|
|
83
|
+
if (false === plugin.active || null == plugin.active) return
|
|
84
|
+
syms.push(...Object.keys(plugin.def?.py || {}))
|
|
85
|
+
})
|
|
86
|
+
if (0 < syms.length) {
|
|
87
|
+
Line(` "${f.name}": [${syms.sort().join(', ')}],`)
|
|
88
|
+
}
|
|
89
|
+
})
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
|
|
35
93
|
const Config = cmp(async function Config(props: any) {
|
|
36
94
|
const ctx$ = props.ctx$
|
|
37
95
|
const target = props.target
|
|
@@ -76,10 +134,33 @@ const Config = cmp(async function Config(props: any) {
|
|
|
76
134
|
const { def: configDef, json: configJson } = configDefinition(model, target.name)
|
|
77
135
|
const asData = isConfigData(configJson, configReprSetting(model))
|
|
78
136
|
|
|
137
|
+
const pkg = model.const.Name.toLowerCase() + '_sdk'
|
|
138
|
+
|
|
79
139
|
File({ name: 'config.' + target.ext }, () => {
|
|
80
140
|
|
|
81
141
|
Content(`# ${model.const.Name} SDK configuration
|
|
82
|
-
${asData ? '\nimport json\n' : ''}
|
|
142
|
+
${asData ? '\nimport json\n' : ''}`)
|
|
143
|
+
|
|
144
|
+
pluginImports(feature, pkg)
|
|
145
|
+
|
|
146
|
+
// The FEATURE_PLUGINS map is ALWAYS emitted, even empty: the secrets
|
|
147
|
+
// feature module imports it unconditionally, and (unlike ts) the py
|
|
148
|
+
// feature source is copied by Main's blanket pkg copy whether or not
|
|
149
|
+
// the model declares the feature - an import of a missing name would
|
|
150
|
+
// fail the whole package at collection time.
|
|
151
|
+
Content(`
|
|
152
|
+
|
|
153
|
+
# The sekreto plugin DEFINITIONS the model selected per feature, imported
|
|
154
|
+
# above by name from the modules the catalogue's active \`plugin.def\`
|
|
155
|
+
# entries declare. Handed to each feature (secrets builds its Sekreto
|
|
156
|
+
# with them): a provider kind not listed here is unknown to that SDK.
|
|
157
|
+
FEATURE_PLUGINS = {
|
|
158
|
+
`)
|
|
159
|
+
|
|
160
|
+
pluginDefs(feature)
|
|
161
|
+
|
|
162
|
+
Content(`}
|
|
163
|
+
|
|
83
164
|
|
|
84
165
|
_shared_config = None
|
|
85
166
|
|
|
@@ -5,6 +5,7 @@ import {
|
|
|
5
5
|
cmp, each, names, cmap,
|
|
6
6
|
List, File, Content, Copy, Folder, Fragment, Line, FeatureHook,
|
|
7
7
|
entityClassName, entityCollection,
|
|
8
|
+
pluginExcludes,
|
|
8
9
|
targetFeatures,
|
|
9
10
|
TEST_CONTROL_EXCLUDE
|
|
10
11
|
} from '@voxgig/sdkgen'
|
|
@@ -39,6 +40,10 @@ const Main = cmp(async function Main(props: any) {
|
|
|
39
40
|
// helpers/applicability.
|
|
40
41
|
const feature = targetFeatures(model, target)
|
|
41
42
|
|
|
43
|
+
// Does the secrets feature apply here and is it switched on? Both, since
|
|
44
|
+
// targetFeatures already dropped it for a target with no sekreto port.
|
|
45
|
+
const secrets = null != (feature as any).secrets
|
|
46
|
+
|
|
42
47
|
// The one package directory everything the SDK owns lives in.
|
|
43
48
|
const pkgdir = model.const.Name.toLowerCase() + '_sdk'
|
|
44
49
|
|
|
@@ -73,6 +78,13 @@ const Main = cmp(async function Main(props: any) {
|
|
|
73
78
|
|
|
74
79
|
Copy({
|
|
75
80
|
from: 'tm/' + target.name + '/pkg',
|
|
81
|
+
// An ACTIVE feature's INACTIVE plugins do not ship. py has no
|
|
82
|
+
// src/feature layout (srcfeature: false), so this blanket pkg copy is
|
|
83
|
+
// the one place the generate-time plugin trim can act; the model's
|
|
84
|
+
// `plugin.<group>.path` entries name their files relative to THIS
|
|
85
|
+
// copy's root ('feature/secrets/voxgig_sekreto/plugins/<kind>.py').
|
|
86
|
+
// See helpers/featureSource.pluginExcludes.
|
|
87
|
+
exclude: [...pluginExcludes(model)],
|
|
76
88
|
replace: {
|
|
77
89
|
...props.ctx$.stdrep,
|
|
78
90
|
}
|
|
@@ -87,6 +99,38 @@ const Main = cmp(async function Main(props: any) {
|
|
|
87
99
|
replace: {
|
|
88
100
|
...props.ctx$.stdrep,
|
|
89
101
|
|
|
102
|
+
// SECRETS. Both slots are emitted only when the secrets feature
|
|
103
|
+
// applies to this target AND the model activates it - an
|
|
104
|
+
// unconditional edit would land in every generated SDK, and with
|
|
105
|
+
// the feature off the marker line is REMOVED, so the inactive
|
|
106
|
+
// output is byte-identical to pre-migration. `feature` is
|
|
107
|
+
// already gated by targetFeatures, so a target that does not
|
|
108
|
+
// provide 'sekreto' never reaches these.
|
|
109
|
+
//
|
|
110
|
+
// CUSTOM-REGEX keys, like Entity_py's hook markers: jostraca's
|
|
111
|
+
// built-in `#Name` tag pattern is hardcoded to `//` comments,
|
|
112
|
+
// so a bare '#SecretsAccessor' key would silently never match a
|
|
113
|
+
// python `# #SecretsAccessor` marker line.
|
|
114
|
+
|
|
115
|
+
// The LIVE Sekreto, not a clone: sekreto holds provider and
|
|
116
|
+
// cache state, so a clone would resolve into a copy that
|
|
117
|
+
// prepare_auth never sees.
|
|
118
|
+
'/(?<indent>[ \\t]*)#[ \\t]*#SecretsAccessor[ \\t]*\\n?/':
|
|
119
|
+
({ indent }: any) => !secrets ? '' :
|
|
120
|
+
`${indent}def secrets(self):\n` +
|
|
121
|
+
`${indent} _s = getattr(self, "_secrets", None)\n` +
|
|
122
|
+
`${indent} return None if _s is None else _s.sekreto()\n\n`,
|
|
123
|
+
|
|
124
|
+
// prepare() bypasses the feature hook pipeline, so the PreSpec
|
|
125
|
+
// hook that resolves the secret for entity ops never runs on
|
|
126
|
+
// this path and the resolve has to be explicit. It RAISES on a
|
|
127
|
+
// broken provider - prepare() already raises on prepare_auth
|
|
128
|
+
// errors, so the direct path's error contract is unchanged.
|
|
129
|
+
'/(?<indent>[ \\t]*)#[ \\t]*#SecretsResolve[ \\t]*\\n?/':
|
|
130
|
+
({ indent }: any) => !secrets ? '' :
|
|
131
|
+
`${indent}if getattr(self, "_secrets", None) is not None:\n` +
|
|
132
|
+
`${indent} self._secrets.resolve()\n\n`,
|
|
133
|
+
|
|
90
134
|
'#BuildFeatures': ({ indent }: any) => {
|
|
91
135
|
each(feature, (feat: any) => {
|
|
92
136
|
const fname = feat.name.charAt(0).toUpperCase() + feat.name.slice(1)
|
|
@@ -99,6 +99,7 @@ class ProjectNameSDK:
|
|
|
99
99
|
def get_root_ctx(self):
|
|
100
100
|
return self._rootctx
|
|
101
101
|
|
|
102
|
+
# #SecretsAccessor
|
|
102
103
|
def prepare(self, fetchargs=None):
|
|
103
104
|
utility = self._utility
|
|
104
105
|
|
|
@@ -114,6 +115,7 @@ class ProjectNameSDK:
|
|
|
114
115
|
"ctrl": ctrl,
|
|
115
116
|
}, self._rootctx)
|
|
116
117
|
|
|
118
|
+
# #SecretsResolve
|
|
117
119
|
options = self.options
|
|
118
120
|
|
|
119
121
|
path = vs.getprop(fetchargs, "path") or ""
|
|
@@ -82,6 +82,16 @@ const Main = cmp(async function Main(props: any) {
|
|
|
82
82
|
ProjectName: model.const.Name,
|
|
83
83
|
}
|
|
84
84
|
})
|
|
85
|
+
|
|
86
|
+
// The vendored @voxgig/omni corpus engine. Its path is FIXED (Package
|
|
87
|
+
// .swift declares an `Omni` target over Tests/vendor/omni, and the port
|
|
88
|
+
// calls `Omni.errify` by module name), and its files are vendored
|
|
89
|
+
// verbatim - no ProjectName substitution, which would rewrite an
|
|
90
|
+
// upstream file.
|
|
91
|
+
Copy({
|
|
92
|
+
from: 'tm/' + target.name + '/Tests/vendor',
|
|
93
|
+
to: 'vendor',
|
|
94
|
+
})
|
|
85
95
|
})
|
|
86
96
|
|
|
87
97
|
// Generated sources join the copied runtime under Sources/ProjectNameSDK.
|
|
@@ -44,6 +44,15 @@ import type {
|
|
|
44
44
|
// An entry WITHOUT a `url` is not expressible in a SwiftPM manifest (no
|
|
45
45
|
// registry-less by-name dependencies), so it is skipped - unadorned entries
|
|
46
46
|
// keep today's zero-dependency output.
|
|
47
|
+
//
|
|
48
|
+
// The `Omni` target is the VENDORED corpus test engine (Tests/vendor/omni,
|
|
49
|
+
// @voxgig/omni at the shared tag). It has to be its own MODULE, not files
|
|
50
|
+
// folded into the test target: the port calls `Omni.errify` by module name,
|
|
51
|
+
// and its top-level `clone`/`getpath`/`walk`/`stringify`/`pathify` collide
|
|
52
|
+
// head-on with the struct utility's functions of the same names. It is
|
|
53
|
+
// declared as a .testTarget rather than a .target so `swift build` - a
|
|
54
|
+
// consumer's library build - never compiles the test engine; `swift test`
|
|
55
|
+
// builds it and the suite target depends on it.
|
|
47
56
|
const Package = cmp(async function Package(props: any) {
|
|
48
57
|
const ctx$ = props.ctx$
|
|
49
58
|
const target = props.target
|
|
@@ -95,9 +104,12 @@ let package = Package(
|
|
|
95
104
|
.target(
|
|
96
105
|
name: "${Name}Sdk",${targetdeps}
|
|
97
106
|
path: "Sources/${swiftTargetDir(model)}"),
|
|
107
|
+
.testTarget(
|
|
108
|
+
name: "Omni",
|
|
109
|
+
path: "Tests/vendor/omni"),
|
|
98
110
|
.testTarget(
|
|
99
111
|
name: "${Name}SdkTests",
|
|
100
|
-
dependencies: ["${Name}Sdk"],
|
|
112
|
+
dependencies: ["${Name}Sdk", "Omni"],
|
|
101
113
|
path: "Tests/${swiftTestDir(model)}"),
|
|
102
114
|
]
|
|
103
115
|
)
|
|
@@ -110,6 +110,8 @@ const Config = cmp(async function Config(props: any) {
|
|
|
110
110
|
Line(` ${f.name}: ${nom(f, 'Name')}Feature,`)
|
|
111
111
|
}),
|
|
112
112
|
|
|
113
|
+
'// #FeaturePlugins': () => pluginDefs(feature),
|
|
114
|
+
|
|
113
115
|
// A JS string literal, so the JSON survives verbatim. JSON.stringify
|
|
114
116
|
// escapes the quotes and backslashes the model contains (values like
|
|
115
117
|
// `$STRING` carry backticks, which a template literal could not).
|
|
@@ -154,6 +156,8 @@ const Config = cmp(async function Config(props: any) {
|
|
|
154
156
|
Line(` ${f.name}: ${nom(f, 'Name')}Feature,`)
|
|
155
157
|
}),
|
|
156
158
|
|
|
159
|
+
'// #FeaturePlugins': () => pluginDefs(feature),
|
|
160
|
+
|
|
157
161
|
// Rendered from configDefinition's def, not from f.config, so the
|
|
158
162
|
// literal carries the feature's `transport` role (station design
|
|
159
163
|
// §8.4) beside its options and cannot drift from the data rep.
|
|
@@ -183,22 +187,26 @@ const Config = cmp(async function Config(props: any) {
|
|
|
183
187
|
|
|
184
188
|
|
|
185
189
|
|
|
186
|
-
// PLUGIN
|
|
190
|
+
// PLUGIN DEFINITION IMPORTS AND THE FEATURE_PLUGINS MAP.
|
|
187
191
|
//
|
|
188
|
-
//
|
|
189
|
-
//
|
|
190
|
-
//
|
|
191
|
-
//
|
|
192
|
+
// Upstream sekreto replaced its self-registration registry with
|
|
193
|
+
// voxgig/plugin definitions: a provider kind the caller did not pass in
|
|
194
|
+
// via `plugins: [...]` is unknown to that Sekreto. So Config no longer
|
|
195
|
+
// imports provider modules for their side effects — it imports each
|
|
196
|
+
// active plugin's exported Definition BY NAME (the model's `def` map)
|
|
197
|
+
// and hands the list to the feature through FEATURE_PLUGINS.
|
|
192
198
|
//
|
|
193
|
-
//
|
|
194
|
-
//
|
|
195
|
-
//
|
|
196
|
-
//
|
|
197
|
-
//
|
|
198
|
-
// Import for SIDE EFFECT only — `import '...'`, no bindings. The module's
|
|
199
|
-
// top-level `register()` call is the whole point.
|
|
199
|
+
// Emitted here because Config already imports every active feature from
|
|
200
|
+
// the model, and this is the same list one level down. The `def` map is
|
|
201
|
+
// declared in the model rather than derived from filenames because one
|
|
202
|
+
// file may export several definitions (sekreto's aws.ts exports
|
|
203
|
+
// awssecrets AND awsparams).
|
|
200
204
|
function pluginImports(feature: any) {
|
|
201
205
|
each(feature, (f: any) => {
|
|
206
|
+
// path -> [symbol, ...], so one import line serves a two-definition
|
|
207
|
+
// module.
|
|
208
|
+
const bypath: Record<string, string[]> = {}
|
|
209
|
+
|
|
202
210
|
each(f.plugin, (plugin: any) => {
|
|
203
211
|
// Filter on `active` HERE rather than trusting the feature object to
|
|
204
212
|
// arrive filtered. Whether a model path was read with `only_active`
|
|
@@ -207,14 +215,31 @@ function pluginImports(feature: any) {
|
|
|
207
215
|
// not compile, rather than one that merely carries too much.
|
|
208
216
|
if (false === plugin.active || null == plugin.active) return
|
|
209
217
|
|
|
210
|
-
for (const one of (plugin.
|
|
218
|
+
for (const [sym, one] of Object.entries(plugin.def?.ts || {})) {
|
|
211
219
|
const path = String(one)
|
|
212
|
-
|
|
213
|
-
// files (Sigv4.ts is signing support, not a provider).
|
|
214
|
-
if (!/\/provider\/[^/]+\.ts$/.test(path)) continue
|
|
215
|
-
Line(`import '${'./' + path.replace(/^src\//, '').replace(/\.ts$/, '')}'`)
|
|
220
|
+
; (bypath[path] = bypath[path] || []).push(sym)
|
|
216
221
|
}
|
|
217
222
|
})
|
|
223
|
+
|
|
224
|
+
for (const path of Object.keys(bypath).sort()) {
|
|
225
|
+
const spec = './' + path.replace(/^src\//, '').replace(/\.ts$/, '')
|
|
226
|
+
Line(`import { ${bypath[path].sort().join(', ')} } from '${spec}'`)
|
|
227
|
+
}
|
|
228
|
+
})
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
// The FEATURE_PLUGINS entries: one line per feature that has any active
|
|
232
|
+
// plugin definitions, listing the imported symbols.
|
|
233
|
+
function pluginDefs(feature: any) {
|
|
234
|
+
each(feature, (f: any) => {
|
|
235
|
+
const syms: string[] = []
|
|
236
|
+
each(f.plugin, (plugin: any) => {
|
|
237
|
+
if (false === plugin.active || null == plugin.active) return
|
|
238
|
+
syms.push(...Object.keys(plugin.def?.ts || {}))
|
|
239
|
+
})
|
|
240
|
+
if (0 < syms.length) {
|
|
241
|
+
Line(` ${f.name}: [${syms.sort().join(', ')}],`)
|
|
242
|
+
}
|
|
218
243
|
})
|
|
219
244
|
}
|
|
220
245
|
|
|
@@ -8,6 +8,17 @@ const FEATURE_CLASS: Record<string, typeof BaseFeature> = {
|
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
|
|
11
|
+
// Per-feature plugin DEFINITIONS (voxgig/plugin `Definition` values), from
|
|
12
|
+
// the model's active plugin groups. A feature that takes a `plugins` option
|
|
13
|
+
// (secrets over sekreto) reads its own entry; a feature with no plugins has
|
|
14
|
+
// none. Named imports above make each definition statically reachable, so
|
|
15
|
+
// an SDK carries exactly the plugin modules its model selects — the same
|
|
16
|
+
// leanness the old side-effect registry imports bought, without a registry.
|
|
17
|
+
const FEATURE_PLUGINS: Record<string, any[]> = {
|
|
18
|
+
// #FeaturePlugins
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
|
|
11
22
|
// THE API MODEL, EMBEDDED AS DATA (sdkgen rung L1).
|
|
12
23
|
//
|
|
13
24
|
// The literal form of this file declares the whole model as nested object
|
|
@@ -53,5 +64,6 @@ class Config {
|
|
|
53
64
|
const config: any = Object.assign(new Config(), JSON.parse(CONFIG_DATA))
|
|
54
65
|
|
|
55
66
|
export {
|
|
56
|
-
config
|
|
67
|
+
config,
|
|
68
|
+
FEATURE_PLUGINS,
|
|
57
69
|
}
|
|
@@ -8,6 +8,17 @@ const FEATURE_CLASS: Record<string, typeof BaseFeature> = {
|
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
|
|
11
|
+
// Per-feature plugin DEFINITIONS (voxgig/plugin `Definition` values), from
|
|
12
|
+
// the model's active plugin groups. A feature that takes a `plugins` option
|
|
13
|
+
// (secrets over sekreto) reads its own entry; a feature with no plugins has
|
|
14
|
+
// none. Named imports above make each definition statically reachable, so
|
|
15
|
+
// an SDK carries exactly the plugin modules its model selects — the same
|
|
16
|
+
// leanness the old side-effect registry imports bought, without a registry.
|
|
17
|
+
const FEATURE_PLUGINS: Record<string, any[]> = {
|
|
18
|
+
// #FeaturePlugins
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
|
|
11
22
|
class Config {
|
|
12
23
|
|
|
13
24
|
makeFeature(this: any, fn: string) {
|
|
@@ -54,6 +65,7 @@ class Config {
|
|
|
54
65
|
const config = new Config()
|
|
55
66
|
|
|
56
67
|
export {
|
|
57
|
-
config
|
|
68
|
+
config,
|
|
69
|
+
FEATURE_PLUGINS,
|
|
58
70
|
}
|
|
59
71
|
|