@voxgig/sdkgen 4.8.1 → 4.8.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/voxgig-sdkgen +1 -1
- package/dist/action/doctor.d.ts +1 -0
- package/dist/action/doctor.js +50 -2
- package/dist/action/doctor.js.map +1 -1
- package/dist/helpers/naming.js +4 -2
- package/dist/helpers/naming.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/model/sdkgen.aon +21 -0
- package/package.json +2 -2
- package/project/.sdk/model/feature/secrets.aon +120 -18
- package/project/.sdk/model/target/c.aon +10 -0
- package/project/.sdk/model/target/clojure.aon +13 -0
- package/project/.sdk/model/target/cpp.aon +10 -0
- package/project/.sdk/model/target/csharp.aon +9 -0
- package/project/.sdk/model/target/dart.aon +10 -0
- package/project/.sdk/model/target/elixir.aon +9 -0
- package/project/.sdk/model/target/go.aon +13 -0
- package/project/.sdk/model/target/java.aon +9 -0
- package/project/.sdk/model/target/js.aon +7 -0
- package/project/.sdk/model/target/kotlin.aon +9 -0
- package/project/.sdk/model/target/lean.aon +17 -0
- package/project/.sdk/model/target/lua.aon +8 -0
- package/project/.sdk/model/target/ocaml.aon +9 -0
- package/project/.sdk/model/target/perl.aon +8 -0
- package/project/.sdk/model/target/php.aon +8 -0
- package/project/.sdk/model/target/py.aon +13 -0
- package/project/.sdk/model/target/rb.aon +8 -0
- package/project/.sdk/model/target/rust.aon +10 -0
- package/project/.sdk/model/target/scala.aon +21 -2
- package/project/.sdk/model/target/swift.aon +18 -0
- package/project/.sdk/model/target/ts.aon +13 -0
- package/project/.sdk/src/cmp/clojure/Package_clojure.ts +9 -2
- package/project/.sdk/src/cmp/cpp/Gitignore_cpp.ts +3 -0
- package/project/.sdk/src/cmp/dart/Test_dart.ts +2 -0
- package/project/.sdk/src/cmp/elixir/Package_elixir.ts +4 -1
- package/project/.sdk/src/cmp/go/Config_go.ts +59 -2
- package/project/.sdk/src/cmp/go/Main_go.ts +8 -2
- package/project/.sdk/src/cmp/java/Test_java.ts +6 -5
- package/project/.sdk/src/cmp/kotlin/Test_kotlin.ts +6 -5
- package/project/.sdk/src/cmp/lean/Package_lean.ts +23 -0
- package/project/.sdk/src/cmp/lean/ReadmeInstall_lean.ts +1 -0
- package/project/.sdk/src/cmp/lean/ReadmeTopTest_lean.ts +1 -0
- package/project/.sdk/src/cmp/ocaml/Gitignore_ocaml.ts +1 -0
- package/project/.sdk/src/cmp/ocaml/Main_ocaml.ts +7 -3
- package/project/.sdk/src/cmp/py/Config_py.ts +82 -1
- package/project/.sdk/src/cmp/py/Main_py.ts +44 -0
- package/project/.sdk/src/cmp/py/fragment/Main.fragment.py +2 -0
- package/project/.sdk/src/cmp/swift/Main_swift.ts +10 -0
- package/project/.sdk/src/cmp/swift/Package_swift.ts +13 -1
- package/project/.sdk/src/cmp/ts/Config_ts.ts +42 -17
- package/project/.sdk/src/cmp/ts/fragment/Config.data.fragment.ts +13 -1
- package/project/.sdk/src/cmp/ts/fragment/Config.fragment.ts +13 -1
- package/project/.sdk/tm/c/Makefile +38 -3
- package/project/.sdk/tm/c/tests/omni_resolver.h +361 -0
- package/project/.sdk/tm/c/tests/omni_smoke_test.c +237 -0
- package/project/.sdk/tm/c/tests/primary_corpus_test.c +205 -284
- package/project/.sdk/tm/c/tests/struct_corpus_test.c +292 -212
- package/project/.sdk/tm/c/tests/vendor/omni/json.c +811 -0
- package/project/.sdk/tm/c/tests/vendor/omni/omni.h +240 -0
- package/project/.sdk/tm/c/tests/vendor/omni/runner.c +940 -0
- package/project/.sdk/tm/c/tests/vendor/omni/util.c +351 -0
- package/project/.sdk/tm/c/utility/struct/utility.c +7 -2
- package/project/.sdk/tm/clojure/test/sdk/test/omni.clj +401 -0
- package/project/.sdk/tm/clojure/test/sdk/test/omni_smoke.clj +81 -0
- package/project/.sdk/tm/clojure/test/sdk/test/primary.clj +92 -58
- package/project/.sdk/tm/clojure/test/sdk/test/struct_corpus.clj +122 -149
- package/project/.sdk/tm/clojure/test/sdk/test_runner.clj +8 -3
- package/project/.sdk/tm/clojure/test/vendor/omni/voxgig/omni/json.clj +145 -0
- package/project/.sdk/tm/clojure/test/vendor/omni/voxgig/omni/runner.clj +445 -0
- package/project/.sdk/tm/clojure/test/vendor/omni/voxgig/omni/util.clj +145 -0
- package/project/.sdk/tm/cpp/Makefile +5 -1
- package/project/.sdk/tm/cpp/test/omni_resolver.hpp +473 -0
- package/project/.sdk/tm/cpp/test/omni_smoke_test.cpp +209 -0
- package/project/.sdk/tm/cpp/test/primary_utility_test.cpp +243 -184
- package/project/.sdk/tm/cpp/test/runner_support.hpp +68 -181
- package/project/.sdk/tm/cpp/test/struct_corpus_test.cpp +183 -56
- package/project/.sdk/tm/cpp/test/vendor/omni/json.hpp +406 -0
- package/project/.sdk/tm/cpp/test/vendor/omni/omni.hpp +751 -0
- package/project/.sdk/tm/cpp/test/vendor/omni/util.hpp +256 -0
- package/project/.sdk/tm/cpp/utility/pipeline.hpp +7 -1
- package/project/.sdk/tm/csharp/test/OmniResolver.cs +491 -0
- package/project/.sdk/tm/csharp/test/OmniSmokeTest.cs +106 -0
- package/project/.sdk/tm/csharp/test/PrimaryUtilityTest.cs +299 -316
- package/project/.sdk/tm/csharp/test/Runner.cs +104 -269
- package/project/.sdk/tm/csharp/test/StructUtilityTest.cs +535 -724
- package/project/.sdk/tm/csharp/test/vendor/omni/Runner.cs +864 -0
- package/project/.sdk/tm/csharp/test/vendor/omni/Util.cs +347 -0
- package/project/.sdk/tm/csharp/utility/MakeSpec.cs +3 -1
- package/project/.sdk/tm/csharp/utility/PrepareMethod.cs +6 -1
- package/project/.sdk/tm/csharp/utility/struct/Struct.cs +21 -5
- package/project/.sdk/tm/dart/test/omni.dart +520 -0
- package/project/.sdk/tm/dart/test/omni_smoke_test.dart +143 -0
- package/project/.sdk/tm/dart/test/primary_test.dart +86 -28
- package/project/.sdk/tm/dart/test/struct_test.dart +438 -11
- package/project/.sdk/tm/dart/test/vendor/omni/omni.dart +7 -0
- package/project/.sdk/tm/dart/test/vendor/omni/runner.dart +653 -0
- package/project/.sdk/tm/dart/test/vendor/omni/util.dart +232 -0
- package/project/.sdk/tm/elixir/Makefile +11 -3
- package/project/.sdk/tm/elixir/test/omni_smoke_test.exs +117 -0
- package/project/.sdk/tm/elixir/test/primary_utility_test.exs +341 -16
- package/project/.sdk/tm/elixir/test/struct_corpus_test.exs +554 -9
- package/project/.sdk/tm/elixir/test/support/omni.ex +377 -0
- package/project/.sdk/tm/elixir/test/vendor/omni/json.ex +122 -0
- package/project/.sdk/tm/elixir/test/vendor/omni/runner.ex +623 -0
- package/project/.sdk/tm/elixir/test/vendor/omni/util.ex +187 -0
- package/project/.sdk/tm/go/core/context.go +32 -16
- package/project/.sdk/tm/go/feature/secrets/plugin/capability.go +261 -0
- package/project/.sdk/tm/go/feature/secrets/plugin/catalog.go +78 -0
- package/project/.sdk/tm/go/feature/secrets/plugin/config.go +652 -0
- package/project/.sdk/tm/go/feature/secrets/plugin/depend.go +250 -0
- package/project/.sdk/tm/go/feature/secrets/plugin/env.go +194 -0
- package/project/.sdk/tm/go/feature/secrets/plugin/export.go +80 -0
- package/project/.sdk/tm/go/feature/secrets/plugin/graph.go +238 -0
- package/project/.sdk/tm/go/feature/secrets/plugin/host.go +1575 -0
- package/project/.sdk/tm/go/feature/secrets/plugin/order.go +248 -0
- package/project/.sdk/tm/go/feature/secrets/plugin/point.go +184 -0
- package/project/.sdk/tm/go/feature/secrets/plugin/ref.go +123 -0
- package/project/.sdk/tm/go/feature/secrets/plugin/resolve.go +79 -0
- package/project/.sdk/tm/go/feature/secrets/plugin/types.go +296 -0
- package/project/.sdk/tm/go/feature/secrets/plugin/util.go +87 -0
- package/project/.sdk/tm/go/feature/secrets/plugin/version.go +161 -0
- package/project/.sdk/tm/go/feature/secrets/plugins/aws/aws.go +292 -0
- package/project/.sdk/tm/go/feature/secrets/plugins/aws/sigv4.go +201 -0
- package/project/.sdk/tm/go/feature/secrets/plugins/azuresecrets/azuresecrets.go +187 -0
- package/project/.sdk/tm/go/feature/secrets/plugins/boru/boru.go +184 -0
- package/project/.sdk/tm/go/feature/secrets/plugins/doppler/doppler.go +114 -0
- package/project/.sdk/tm/go/feature/secrets/plugins/gcpsecrets/gcpsecrets.go +156 -0
- package/project/.sdk/tm/go/feature/secrets/plugins/hashicorp/hashicorp.go +209 -0
- package/project/.sdk/tm/go/feature/secrets/plugins/httpjson/httpjson.go +241 -0
- package/project/.sdk/tm/go/feature/secrets/plugins/infisical/infisical.go +151 -0
- package/project/.sdk/tm/go/feature/secrets/plugins/onepassword/onepassword.go +152 -0
- package/project/.sdk/tm/go/feature/secrets/plugins/secretspec/secretspec.go +143 -0
- package/project/.sdk/tm/go/feature/secrets/sekreto/addr.go +120 -0
- package/project/.sdk/tm/go/feature/secrets/sekreto/providers.go +439 -0
- package/project/.sdk/tm/go/feature/secrets/sekreto/sekreto.go +685 -0
- package/project/.sdk/tm/go/feature/secrets_feature.go +675 -0
- package/project/.sdk/tm/go/src/feature/secrets/.gitkeep +0 -0
- package/project/.sdk/tm/go/test/feature/secrets/secrets_feature_test.go +799 -0
- package/project/.sdk/tm/go/test/omni/omni.go +897 -0
- package/project/.sdk/tm/go/test/omni/util.go +360 -0
- package/project/.sdk/tm/go/test/omniresolver_test.go +748 -0
- package/project/.sdk/tm/go/test/omnismoke_test.go +112 -0
- package/project/.sdk/tm/go/test/primary_utility_test.go +123 -191
- package/project/.sdk/tm/go/test/struct_utility_test.go +323 -16
- package/project/.sdk/tm/go/test/testsupport_test.go +294 -0
- package/project/.sdk/tm/go/utility/make_options.go +8 -1
- package/project/.sdk/tm/go/utility/prepare_method.go +5 -1
- package/project/.sdk/tm/go/utility/struct/voxgigstruct.go +2 -2
- package/project/.sdk/tm/java/test/OmniResolver.java +355 -0
- package/project/.sdk/tm/java/test/OmniSmokeTest.java +99 -0
- package/project/.sdk/tm/java/test/PrimaryUtilityTest.java +254 -280
- package/project/.sdk/tm/java/test/RunnerSupport.java +9 -194
- package/project/.sdk/tm/java/test/StructCorpusTest.java +119 -42
- package/project/.sdk/tm/java/test/vendor/omni/Json.java +287 -0
- package/project/.sdk/tm/java/test/vendor/omni/Runner.java +851 -0
- package/project/.sdk/tm/java/test/vendor/omni/Util.java +322 -0
- package/project/.sdk/tm/java/utility/MakeSpec.java +3 -1
- package/project/.sdk/tm/java/utility/PrepareMethod.java +5 -5
- package/project/.sdk/tm/java/utility/struct/Struct.java +17 -4
- package/project/.sdk/tm/js/src/utility/StructUtility.js +3 -3
- package/project/.sdk/tm/js/test/omni.js +251 -0
- package/project/.sdk/tm/js/test/omni.test.js +105 -0
- package/project/.sdk/tm/js/test/utility/PrimaryUtility.test.js +6 -2
- package/project/.sdk/tm/js/test/utility/StructUtility.test.js +27 -2
- package/project/.sdk/tm/js/test/vendor/omni/index.js +77 -0
- package/project/.sdk/tm/js/test/vendor/omni/runner.js +613 -0
- package/project/.sdk/tm/js/test/vendor/omni/util.js +212 -0
- package/project/.sdk/tm/kotlin/core/Utility.kt +1 -1
- package/project/.sdk/tm/kotlin/test/OmniResolver.kt +343 -0
- package/project/.sdk/tm/kotlin/test/OmniSmokeTest.kt +100 -0
- package/project/.sdk/tm/kotlin/test/PrimaryUtilityTest.kt +244 -262
- package/project/.sdk/tm/kotlin/test/RunnerSupport.kt +9 -178
- package/project/.sdk/tm/kotlin/test/StructCorpusTest.kt +121 -32
- package/project/.sdk/tm/kotlin/test/vendor/omni/Json.kt +264 -0
- package/project/.sdk/tm/kotlin/test/vendor/omni/Runner.kt +615 -0
- package/project/.sdk/tm/kotlin/test/vendor/omni/Util.kt +139 -0
- package/project/.sdk/tm/kotlin/utility/MakeSpecUrl.kt +6 -3
- package/project/.sdk/tm/kotlin/utility/Prepare.kt +6 -6
- package/project/.sdk/tm/kotlin/utility/struct/Struct.kt +18 -2
- package/project/.sdk/tm/lean/Makefile +12 -5
- package/project/.sdk/tm/lean/src/SdkUtility.lean +14 -1
- package/project/.sdk/tm/lean/test/OmniResolver.lean +358 -0
- package/project/.sdk/tm/lean/test/OmniSmoke.lean +174 -0
- package/project/.sdk/tm/lean/test/StructCorpus.lean +245 -574
- package/project/.sdk/tm/lean/test/TPrimaryUtility.lean +155 -291
- package/project/.sdk/tm/lean/test/vendor/omni/Omni.lean +997 -0
- package/project/.sdk/tm/lua/test/omni.lua +456 -0
- package/project/.sdk/tm/lua/test/omni_smoke_test.lua +103 -0
- package/project/.sdk/tm/lua/test/primary_utility_test.lua +250 -509
- package/project/.sdk/tm/lua/test/struct_utility_test.lua +161 -70
- package/project/.sdk/tm/lua/test/vendor/omni/json.lua +268 -0
- package/project/.sdk/tm/lua/test/vendor/omni/regex.lua +385 -0
- package/project/.sdk/tm/lua/test/vendor/omni/runner.lua +641 -0
- package/project/.sdk/tm/lua/test/vendor/omni/util.lua +282 -0
- package/project/.sdk/tm/lua/utility/prepare_method.lua +5 -1
- package/project/.sdk/tm/lua/utility/struct/regex.lua +663 -0
- package/project/.sdk/tm/lua/utility/struct/struct.lua +660 -420
- package/project/.sdk/tm/ocaml/Makefile +37 -12
- package/project/.sdk/tm/ocaml/test/omni_resolver.ml +284 -0
- package/project/.sdk/tm/ocaml/test/omni_smoke_test.ml +169 -0
- package/project/.sdk/tm/ocaml/test/primary_utility_test.ml +84 -100
- package/project/.sdk/tm/ocaml/test/struct_corpus.ml +225 -201
- package/project/.sdk/tm/ocaml/test/vendor/omni/omni.ml +1157 -0
- package/project/.sdk/tm/perl/lib/Voxgig/Struct.pm +88 -12
- package/project/.sdk/tm/perl/t/omni.pm +647 -0
- package/project/.sdk/tm/perl/t/omni_smoke.t +87 -0
- package/project/.sdk/tm/perl/t/primary_utility.t +189 -487
- package/project/.sdk/tm/perl/t/struct_utility.t +455 -389
- package/project/.sdk/tm/perl/t/vendor/omni/Voxgig/Omni/Runner.pm +649 -0
- package/project/.sdk/tm/perl/t/vendor/omni/Voxgig/Omni/Util.pm +253 -0
- package/project/.sdk/tm/perl/t/vendor/omni/Voxgig/Omni.pm +24 -0
- package/project/.sdk/tm/perl/utility/prepare_method.pm +7 -2
- package/project/.sdk/tm/php/test/Omni.php +691 -0
- package/project/.sdk/tm/php/test/OmniSmokeTest.php +93 -0
- package/project/.sdk/tm/php/test/PrimaryUtilityTest.php +210 -571
- package/project/.sdk/tm/php/test/StructUtilityTest.php +320 -342
- package/project/.sdk/tm/php/test/vendor/omni/Runner.php +644 -0
- package/project/.sdk/tm/php/test/vendor/omni/Util.php +283 -0
- package/project/.sdk/tm/php/utility/MakeSpec.php +10 -3
- package/project/.sdk/tm/php/utility/PrepareBody.php +7 -1
- package/project/.sdk/tm/php/utility/PrepareMethod.php +6 -2
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/__init__.py +36 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/capability.py +141 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/catalog.py +50 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/config.py +333 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/depend.py +198 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/env.py +147 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/export.py +52 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/graph.py +139 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/host.py +1053 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/order.py +171 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/point.py +95 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/ref.py +116 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/resolve.py +59 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/types.py +87 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/version.py +112 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/__init__.py +74 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/addr.py +116 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/aws.py +192 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/azuresecrets.py +120 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/boru.py +140 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/doppler.py +62 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/gcpsecrets.py +101 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/hashicorp.py +152 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/httpjson.py +115 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/infisical.py +92 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/onepassword.py +101 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/secretspec.py +119 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/sigv4.py +125 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/providers.py +211 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/sekreto.py +455 -0
- package/project/.sdk/tm/py/pkg/feature/secrets_feature.py +467 -0
- package/project/.sdk/tm/py/pkg/utility/prepare_method.py +5 -1
- package/project/.sdk/tm/py/pkg/utility/voxgig_struct/__init__.py +0 -2
- package/project/.sdk/tm/py/pkg/utility/voxgig_struct/voxgig_struct.py +780 -529
- package/project/.sdk/tm/py/src/feature/secrets/.gitkeep +0 -0
- package/project/.sdk/tm/py/test/feature/__init__.py +0 -0
- package/project/.sdk/tm/py/test/feature/secrets/__init__.py +0 -0
- package/project/.sdk/tm/py/test/feature/secrets/test_secrets.py +337 -0
- package/project/.sdk/tm/py/test/omni.py +415 -0
- package/project/.sdk/tm/py/test/test_omni_smoke.py +74 -0
- package/project/.sdk/tm/py/test/test_primary_utility.py +144 -668
- package/project/.sdk/tm/py/test/test_struct_utility.py +74 -27
- package/project/.sdk/tm/py/test/voxgig_omni/__init__.py +62 -0
- package/project/.sdk/tm/py/test/voxgig_omni/runner.py +566 -0
- package/project/.sdk/tm/py/test/voxgig_omni/util.py +237 -0
- package/project/.sdk/tm/rb/test/omni.rb +505 -0
- package/project/.sdk/tm/rb/test/omni_smoke_test.rb +72 -0
- package/project/.sdk/tm/rb/test/primary_utility_test.rb +174 -560
- package/project/.sdk/tm/rb/test/struct_utility_test.rb +13 -7
- package/project/.sdk/tm/rb/test/vendor/omni/runner.rb +493 -0
- package/project/.sdk/tm/rb/test/vendor/omni/util.rb +199 -0
- package/project/.sdk/tm/rb/test/vendor/omni/voxgig_omni.rb +15 -0
- package/project/.sdk/tm/rb/utility/prepare_method.rb +5 -1
- package/project/.sdk/tm/rust/tests/common/mod.rs +19 -242
- package/project/.sdk/tm/rust/tests/omni_resolver/mod.rs +888 -0
- package/project/.sdk/tm/rust/tests/omni_smoke_test.rs +286 -0
- package/project/.sdk/tm/rust/tests/primary_utility_test.rs +318 -312
- package/project/.sdk/tm/rust/tests/struct_utility_test.rs +66 -28
- package/project/.sdk/tm/rust/tests/vendor/omni/json.rs +412 -0
- package/project/.sdk/tm/rust/tests/vendor/omni/mod.rs +38 -0
- package/project/.sdk/tm/rust/tests/vendor/omni/regex.rs +392 -0
- package/project/.sdk/tm/rust/tests/vendor/omni/runner.rs +1001 -0
- package/project/.sdk/tm/rust/tests/vendor/omni/util.rs +161 -0
- package/project/.sdk/tm/rust/utility/prepare_method.rs +5 -1
- package/project/.sdk/tm/scala/Makefile +16 -6
- package/project/.sdk/tm/scala/sdktest/OmniResolver.scala +497 -0
- package/project/.sdk/tm/scala/sdktest/OmniSmoke.scala +192 -0
- package/project/.sdk/tm/scala/sdktest/PrimaryCorpus.scala +47 -19
- package/project/.sdk/tm/scala/sdktest/StructCorpus.scala +0 -0
- package/project/.sdk/tm/scala/sdktest/vendor/omni/Json.scala +229 -0
- package/project/.sdk/tm/scala/sdktest/vendor/omni/Runner.scala +552 -0
- package/project/.sdk/tm/scala/sdktest/vendor/omni/Util.scala +104 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/Constants.swift +10 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/Inject.swift +28 -5
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/Injection.swift +5 -1
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/Minor.swift +4 -1
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/Validate.swift +15 -5
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/utility/Prepare.swift +6 -1
- package/project/.sdk/tm/swift/Tests/ProjectNameSDKTests/OmniResolver.swift +474 -0
- package/project/.sdk/tm/swift/Tests/ProjectNameSDKTests/OmniSmokeTest.swift +107 -0
- package/project/.sdk/tm/swift/Tests/ProjectNameSDKTests/PrimaryUtilityTest.swift +141 -178
- package/project/.sdk/tm/swift/Tests/ProjectNameSDKTests/Runner.swift +17 -113
- package/project/.sdk/tm/swift/Tests/ProjectNameSDKTests/StructUtilityTest.swift +295 -446
- package/project/.sdk/tm/swift/Tests/vendor/omni/Json.swift +364 -0
- package/project/.sdk/tm/swift/Tests/vendor/omni/Runner.swift +730 -0
- package/project/.sdk/tm/swift/Tests/vendor/omni/Util.swift +162 -0
- package/project/.sdk/tm/ts/src/feature/secrets/SecretsFeature.ts +7 -0
- package/project/.sdk/tm/ts/src/feature/secrets/plugin/Capability.ts +148 -0
- package/project/.sdk/tm/ts/src/feature/secrets/plugin/Catalog.ts +55 -0
- package/project/.sdk/tm/ts/src/feature/secrets/plugin/Config.ts +344 -0
- package/project/.sdk/tm/ts/src/feature/secrets/plugin/Depend.ts +205 -0
- package/project/.sdk/tm/ts/src/feature/secrets/plugin/Env.ts +138 -0
- package/project/.sdk/tm/ts/src/feature/secrets/plugin/Export.ts +46 -0
- package/project/.sdk/tm/ts/src/feature/secrets/plugin/FeatureHost.ts +349 -0
- package/project/.sdk/tm/ts/src/feature/secrets/plugin/Graph.ts +181 -0
- package/project/.sdk/tm/ts/src/feature/secrets/plugin/Host.ts +1132 -0
- package/project/.sdk/tm/ts/src/feature/secrets/plugin/Order.ts +177 -0
- package/project/.sdk/tm/ts/src/feature/secrets/plugin/Point.ts +119 -0
- package/project/.sdk/tm/ts/src/feature/secrets/plugin/Ref.ts +102 -0
- package/project/.sdk/tm/ts/src/feature/secrets/plugin/Resolve.ts +61 -0
- package/project/.sdk/tm/ts/src/feature/secrets/plugin/Types.ts +112 -0
- package/project/.sdk/tm/ts/src/feature/secrets/plugin/Version.ts +100 -0
- package/project/.sdk/tm/ts/src/feature/secrets/plugin/index.ts +37 -0
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/Sekreto.ts +163 -30
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/index.ts +27 -22
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/{provider → plugins}/aws.ts +26 -36
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/{provider → plugins}/azuresecrets.ts +19 -21
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/{provider → plugins}/boru.ts +36 -17
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/{provider → plugins}/doppler.ts +14 -21
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/{provider → plugins}/gcpsecrets.ts +27 -27
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/{provider → plugins}/hashicorp.ts +25 -39
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/plugins/httpjson.ts +99 -0
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/{provider → plugins}/infisical.ts +14 -16
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/{provider → plugins}/onepassword.ts +15 -22
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/plugins/secretspec.ts +98 -0
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/{Sigv4.ts → plugins/sigv4.ts} +7 -6
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/addr.ts +97 -23
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/builtin.ts +37 -0
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/dotenv.ts +4 -17
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/env.ts +4 -16
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/file.ts +11 -25
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/memory.ts +6 -23
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/support.ts +106 -39
- package/project/.sdk/tm/ts/src/utility/StructUtility.ts +3 -3
- package/project/.sdk/tm/ts/test/omni.ts +104 -32
- package/project/.sdk/tm/ts/test/utility/StructUtility.test.ts +27 -0
- package/project/.sdk/tm/ts/test/vendor/omni/Runner.ts +32 -5
- package/project/.sdk/tm/ts/test/vendor/omni/Util.ts +2 -2
- package/project/.sdk/tm/ts/test/vendor/omni/index.ts +2 -2
- package/project/.sdk/tm/zig/test/primary_utility_test.zig +1 -1
- package/project/.sdk/tm/zig/test/struct_runner.zig +5 -4
- package/project/sdkgen-package.json +1 -1
- package/src/action/doctor.ts +66 -2
- package/src/helpers/naming.ts +4 -2
- package/project/.sdk/tm/c/tests/runner.h +0 -274
- package/project/.sdk/tm/cpp/test/struct_runner.hpp +0 -314
- package/project/.sdk/tm/csharp/test/StructRunner.cs +0 -276
- package/project/.sdk/tm/dart/test/runner.dart +0 -406
- package/project/.sdk/tm/dart/test/struct_corpus.dart +0 -531
- package/project/.sdk/tm/elixir/test/support/struct_corpus.ex +0 -1088
- package/project/.sdk/tm/go/test/runner_test.go +0 -629
- package/project/.sdk/tm/go/test/struct_runner_test.go +0 -1094
- package/project/.sdk/tm/java/test/StructRunner.java +0 -281
- package/project/.sdk/tm/js/test/runner.js +0 -387
- package/project/.sdk/tm/kotlin/test/StructRunner.kt +0 -177
- package/project/.sdk/tm/lua/test/struct_runner.lua +0 -602
- package/project/.sdk/tm/ocaml/test/corpus_runner.ml +0 -185
- package/project/.sdk/tm/perl/t/struct_runner.pm +0 -275
- package/project/.sdk/tm/php/test/StructRunner.php +0 -275
- package/project/.sdk/tm/py/test/struct_runner.py +0 -411
- package/project/.sdk/tm/rb/test/struct_runner.rb +0 -309
- package/project/.sdk/tm/rust/tests/struct_runner/mod.rs +0 -424
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/Registry.ts +0 -90
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/http.ts +0 -66
- package/project/.sdk/tm/ts/test/vendor/omni/compat.ts +0 -188
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
// VENDORED: @voxgig/sekreto 0.
|
|
2
|
-
// Source: https://github.com/voxgig/sekreto @
|
|
1
|
+
// VENDORED: @voxgig/sekreto 0.2.0 (typescript/src/provider/dotenv.ts)
|
|
2
|
+
// Source: https://github.com/voxgig/sekreto @ a5a00db6e6d3a1ddbdef7ac62e8a75be53a9e042 [tag: sdk-20260904-1610-0]
|
|
3
3
|
// License: MIT (c) voxgig - see repository LICENSE. Do not edit: resync from upstream.
|
|
4
4
|
/* Copyright (c) 2025 Voxgig Ltd, MIT License */
|
|
5
5
|
|
|
6
|
-
import {
|
|
6
|
+
import { Provider, SekretoError, envkey, nodemod, parsedotenv } from './support'
|
|
7
7
|
|
|
8
|
+
/** A `.env` file, read once, keyed exactly like the environment. */
|
|
8
9
|
export function dotenvprovider(file: string, prefix?: string): Provider {
|
|
9
10
|
let values: Record<string, string> | undefined
|
|
10
11
|
|
|
@@ -35,17 +36,3 @@ export function dotenvprovider(file: string, prefix?: string): Provider {
|
|
|
35
36
|
describe: () => 'dotenv:' + file,
|
|
36
37
|
}
|
|
37
38
|
}
|
|
38
|
-
|
|
39
|
-
/** Literal values, keyed like environment variables. The spec uses this
|
|
40
|
-
* to test chain behaviour without touching the outside world. */
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
// Registering at import is what makes this module's presence the only
|
|
44
|
-
// thing that decides whether the kind exists in a build.
|
|
45
|
-
import { register } from './Registry'
|
|
46
|
-
|
|
47
|
-
register({
|
|
48
|
-
name: 'dotenv',
|
|
49
|
-
needs: ['fs'],
|
|
50
|
-
define: (spec: ProviderSpec) => dotenvprovider(spec.file || '.env', spec.prefix),
|
|
51
|
-
})
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
// VENDORED: @voxgig/sekreto 0.
|
|
2
|
-
// Source: https://github.com/voxgig/sekreto @
|
|
1
|
+
// VENDORED: @voxgig/sekreto 0.2.0 (typescript/src/provider/env.ts)
|
|
2
|
+
// Source: https://github.com/voxgig/sekreto @ a5a00db6e6d3a1ddbdef7ac62e8a75be53a9e042 [tag: sdk-20260904-1610-0]
|
|
3
3
|
// License: MIT (c) voxgig - see repository LICENSE. Do not edit: resync from upstream.
|
|
4
4
|
/* Copyright (c) 2025 Voxgig Ltd, MIT License */
|
|
5
5
|
|
|
6
|
-
import {
|
|
6
|
+
import { Provider, envkey } from './support'
|
|
7
7
|
|
|
8
|
+
/** Environment variables: `api.token` from `API_TOKEN`. */
|
|
8
9
|
export function envprovider(prefix?: string, source?: Record<string, any>): Provider {
|
|
9
10
|
const env = source || process.env
|
|
10
11
|
|
|
@@ -16,16 +17,3 @@ export function envprovider(prefix?: string, source?: Record<string, any>): Prov
|
|
|
16
17
|
describe: () => 'env' + (prefix ? ':' + prefix : ''),
|
|
17
18
|
}
|
|
18
19
|
}
|
|
19
|
-
|
|
20
|
-
/** A `.env` file, read once, keyed exactly like the environment. */
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
// Registering at import is what makes this module's presence the only
|
|
24
|
-
// thing that decides whether the kind exists in a build.
|
|
25
|
-
import { register } from './Registry'
|
|
26
|
-
|
|
27
|
-
register({
|
|
28
|
-
name: 'env',
|
|
29
|
-
needs: [],
|
|
30
|
-
define: (spec: ProviderSpec) => envprovider(spec.prefix),
|
|
31
|
-
})
|
|
@@ -1,12 +1,18 @@
|
|
|
1
|
-
// VENDORED: @voxgig/sekreto 0.
|
|
2
|
-
// Source: https://github.com/voxgig/sekreto @
|
|
1
|
+
// VENDORED: @voxgig/sekreto 0.2.0 (typescript/src/provider/file.ts)
|
|
2
|
+
// Source: https://github.com/voxgig/sekreto @ a5a00db6e6d3a1ddbdef7ac62e8a75be53a9e042 [tag: sdk-20260904-1610-0]
|
|
3
3
|
// License: MIT (c) voxgig - see repository LICENSE. Do not edit: resync from upstream.
|
|
4
4
|
/* Copyright (c) 2025 Voxgig Ltd, MIT License */
|
|
5
5
|
|
|
6
|
-
import {
|
|
7
|
-
ProviderSpec, Provider, SekretoError, envkey, flatname, nodemod,
|
|
8
|
-
} from './support'
|
|
6
|
+
import { Provider, SekretoError, envkey, nodemod } from './support'
|
|
9
7
|
|
|
8
|
+
/** A directory of one-secret-per-file entries, keyed like the
|
|
9
|
+
* environment: `api.token` reads `<dir>/API_TOKEN`.
|
|
10
|
+
*
|
|
11
|
+
* This is the shape of a mounted Kubernetes Secret, a Docker or Swarm
|
|
12
|
+
* secret, and a systemd credentials directory, so those all work with no
|
|
13
|
+
* further configuration. One trailing newline is stripped - tools that
|
|
14
|
+
* write these files disagree about it, and a newline is never part of a
|
|
15
|
+
* secret on purpose. */
|
|
10
16
|
export function fileprovider(dir: string, prefix?: string): Provider {
|
|
11
17
|
return {
|
|
12
18
|
lookup: (name: string) => {
|
|
@@ -32,23 +38,3 @@ export function fileprovider(dir: string, prefix?: string): Provider {
|
|
|
32
38
|
describe: () => 'file:' + dir,
|
|
33
39
|
}
|
|
34
40
|
}
|
|
35
|
-
|
|
36
|
-
/** Refuse to send a secret-bearing credential in the clear.
|
|
37
|
-
*
|
|
38
|
-
* A vault API is HTTPS in any real deployment; plaintext is a dev-mode
|
|
39
|
-
* convenience. Sending a token over http to anything but the local
|
|
40
|
-
* machine puts both the token and the secret it fetches on the wire for
|
|
41
|
-
* anyone on the path, so sekreto will not do it. Loopback stays allowed:
|
|
42
|
-
* that is `vault server -dev`, `boru vault serve`, and this repo's own
|
|
43
|
-
* test harness. */
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
// Registering at import is what makes this module's presence the only
|
|
47
|
-
// thing that decides whether the kind exists in a build.
|
|
48
|
-
import { register } from './Registry'
|
|
49
|
-
|
|
50
|
-
register({
|
|
51
|
-
name: 'file',
|
|
52
|
-
needs: ['fs'],
|
|
53
|
-
define: (spec: ProviderSpec) => fileprovider(spec.dir || '', spec.prefix),
|
|
54
|
-
})
|
|
@@ -1,33 +1,16 @@
|
|
|
1
|
-
// VENDORED: @voxgig/sekreto 0.
|
|
2
|
-
// Source: https://github.com/voxgig/sekreto @
|
|
1
|
+
// VENDORED: @voxgig/sekreto 0.2.0 (typescript/src/provider/memory.ts)
|
|
2
|
+
// Source: https://github.com/voxgig/sekreto @ a5a00db6e6d3a1ddbdef7ac62e8a75be53a9e042 [tag: sdk-20260904-1610-0]
|
|
3
3
|
// License: MIT (c) voxgig - see repository LICENSE. Do not edit: resync from upstream.
|
|
4
4
|
/* Copyright (c) 2025 Voxgig Ltd, MIT License */
|
|
5
5
|
|
|
6
|
-
import {
|
|
6
|
+
import { Provider, envkey } from './support'
|
|
7
7
|
|
|
8
|
+
/** Literal values, keyed like environment variables. The spec uses this
|
|
9
|
+
* to test chain behaviour without touching the outside world, and an app
|
|
10
|
+
* uses it for defaults. */
|
|
8
11
|
export function memoryprovider(values: Record<string, string>, prefix?: string): Provider {
|
|
9
12
|
return {
|
|
10
13
|
lookup: (name: string) => values[envkey(name, prefix)],
|
|
11
14
|
describe: () => 'memory' + (prefix ? ':' + prefix : ''),
|
|
12
15
|
}
|
|
13
16
|
}
|
|
14
|
-
|
|
15
|
-
/** A directory of one-secret-per-file entries, keyed like the
|
|
16
|
-
* environment: `api.token` reads `<dir>/API_TOKEN`.
|
|
17
|
-
*
|
|
18
|
-
* This is the shape of a mounted Kubernetes Secret, a Docker or Swarm
|
|
19
|
-
* secret, and a systemd credentials directory, so those all work with no
|
|
20
|
-
* further configuration. One trailing newline is stripped - tools that
|
|
21
|
-
* write these files disagree about it, and a newline is never part of a
|
|
22
|
-
* secret on purpose. */
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
// Registering at import is what makes this module's presence the only
|
|
26
|
-
// thing that decides whether the kind exists in a build.
|
|
27
|
-
import { register } from './Registry'
|
|
28
|
-
|
|
29
|
-
register({
|
|
30
|
-
name: 'memory',
|
|
31
|
-
needs: [],
|
|
32
|
-
define: (spec: ProviderSpec) => memoryprovider(spec.values || {}, spec.prefix),
|
|
33
|
-
})
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
// VENDORED: @voxgig/sekreto 0.
|
|
2
|
-
// Source: https://github.com/voxgig/sekreto @
|
|
1
|
+
// VENDORED: @voxgig/sekreto 0.2.0 (typescript/src/provider/support.ts)
|
|
2
|
+
// Source: https://github.com/voxgig/sekreto @ a5a00db6e6d3a1ddbdef7ac62e8a75be53a9e042 [tag: sdk-20260904-1610-0]
|
|
3
3
|
// License: MIT (c) voxgig - see repository LICENSE. Do not edit: resync from upstream.
|
|
4
|
-
//
|
|
4
|
+
// What a provider is, what its declarative form looks like, and how a
|
|
5
|
+
// provider kind becomes a voxgig/plugin definition.
|
|
5
6
|
//
|
|
6
7
|
// A provider answers one question: "do you have this secret?" It returns
|
|
7
8
|
// the value, or undefined to mean "ask the next one". Nothing else about
|
|
@@ -15,6 +16,9 @@
|
|
|
15
16
|
// missing configuration - is an ERROR: falling through there would
|
|
16
17
|
// quietly reach for a weaker store.
|
|
17
18
|
|
|
19
|
+
import { PluginError } from '../../plugin'
|
|
20
|
+
import type { Definition } from '../../plugin'
|
|
21
|
+
|
|
18
22
|
import {
|
|
19
23
|
SekretoError,
|
|
20
24
|
awsparam,
|
|
@@ -27,26 +31,19 @@ import {
|
|
|
27
31
|
|
|
28
32
|
// NODE BUILTINS, LOADED ON FIRST USE.
|
|
29
33
|
//
|
|
30
|
-
//
|
|
31
|
-
//
|
|
32
|
-
//
|
|
33
|
-
//
|
|
34
|
-
// use
|
|
35
|
-
//
|
|
34
|
+
// `fs` and `path` are what the two built-in file-reading providers need,
|
|
35
|
+
// and they are loaded when a lookup runs rather than when sekreto is
|
|
36
|
+
// imported: a caller who only ever configures `memory` or `env` never
|
|
37
|
+
// evaluates them, and a runtime that lacks them fails at the point of
|
|
38
|
+
// use rather than at import. The platform-dependent providers proper -
|
|
39
|
+
// everything that opens a socket or spawns a process - are not in the
|
|
40
|
+
// core at all; they are plugins (docs/design/plugin-providers.md).
|
|
36
41
|
//
|
|
37
|
-
// A plain require(), not `await import()`: dotenvprovider
|
|
38
|
-
//
|
|
39
|
-
// accommodate a dynamic import would change observable behaviour for
|
|
40
|
-
// calling a provider directly. The package is CommonJS ("type":
|
|
42
|
+
// A plain require(), not `await import()`: dotenvprovider and
|
|
43
|
+
// fileprovider have SYNCHRONOUS lookups, and making them async to
|
|
44
|
+
// accommodate a dynamic import would change observable behaviour for
|
|
45
|
+
// anyone calling a provider directly. The package is CommonJS ("type":
|
|
41
46
|
// "commonjs"), so require is available and synchronous.
|
|
42
|
-
//
|
|
43
|
-
// What this buys and what it does not: the builtins are no longer evaluated
|
|
44
|
-
// at import time, so importing sekreto is safe in a runtime that lacks them
|
|
45
|
-
// and a bundler can drop an unreachable provider along with its edge. It is
|
|
46
|
-
// NOT by itself a complete browser story — a bundler still resolves a
|
|
47
|
-
// require it can see statically, so a browser build wants conditional
|
|
48
|
-
// exports ("browser" field) as well. That is a packaging change, tracked
|
|
49
|
-
// separately.
|
|
50
47
|
const nodemods: Record<string, any> = {}
|
|
51
48
|
|
|
52
49
|
function nodemod<T = any>(name: string): T {
|
|
@@ -77,26 +74,14 @@ export type Provider = {
|
|
|
77
74
|
}
|
|
78
75
|
|
|
79
76
|
/** The declarative form of a provider, as used in config and in the
|
|
80
|
-
* shared spec.
|
|
77
|
+
* shared spec. `kind` names a built-in or a plugin; the rest is that
|
|
78
|
+
* kind's own configuration, and a plugin reads it as `inst.options`. */
|
|
81
79
|
export type ProviderSpec = {
|
|
82
|
-
kind:
|
|
83
|
-
| 'env'
|
|
84
|
-
| 'dotenv'
|
|
85
|
-
| 'memory'
|
|
86
|
-
| 'file'
|
|
87
|
-
| 'hashicorp'
|
|
88
|
-
| 'boru'
|
|
89
|
-
| 'awssecrets'
|
|
90
|
-
| 'awsparams'
|
|
91
|
-
| 'gcpsecrets'
|
|
92
|
-
| 'azuresecrets'
|
|
93
|
-
| 'onepassword'
|
|
94
|
-
| 'doppler'
|
|
95
|
-
| 'infisical'
|
|
80
|
+
kind: string
|
|
96
81
|
/** The store name `Sekreto.getfrom` addresses. Defaults to `kind`. */
|
|
97
82
|
name?: string
|
|
98
83
|
prefix?: string
|
|
99
|
-
/** dotenv: the file to read. */
|
|
84
|
+
/** dotenv: the file to read. secretspec: the declaration file. */
|
|
100
85
|
file?: string
|
|
101
86
|
/** memory: literal values, keyed like environment variables. */
|
|
102
87
|
values?: Record<string, string>
|
|
@@ -130,8 +115,18 @@ export type ProviderSpec = {
|
|
|
130
115
|
roleid?: string
|
|
131
116
|
secretid?: string
|
|
132
117
|
}
|
|
133
|
-
/** boru: the executable to run (default
|
|
118
|
+
/** boru / secretspec: the executable to run (default: the kind's own
|
|
119
|
+
* name). */
|
|
134
120
|
command?: string
|
|
121
|
+
/** secretspec: the profile to read (`--profile`). */
|
|
122
|
+
profile?: string
|
|
123
|
+
/** secretspec: which of ITS backends to read from (`--provider`), e.g.
|
|
124
|
+
* `keyring` or `dotenv://.env`. Named `backend` here because
|
|
125
|
+
* `provider` already means a sekreto provider. */
|
|
126
|
+
backend?: string
|
|
127
|
+
/** secretspec: the audit reason recorded for the read (`--reason`).
|
|
128
|
+
* SecretSpec refuses to read without one. */
|
|
129
|
+
reason?: string
|
|
135
130
|
/** boru: the namespace qualifying the alias. */
|
|
136
131
|
namespace?: string
|
|
137
132
|
/** boru: the vault home, passed as BORU_HOME. */
|
|
@@ -168,9 +163,81 @@ export type ProviderSpec = {
|
|
|
168
163
|
path?: string
|
|
169
164
|
}
|
|
170
165
|
|
|
171
|
-
|
|
166
|
+
// --- providers as voxgig/plugin definitions --------------------------
|
|
167
|
+
|
|
168
|
+
/** The export key under which a provider definition publishes the
|
|
169
|
+
* provider it built. `Sekreto` reads `<ref>/provider` off the host. */
|
|
170
|
+
export const PROVIDER_EXPORT = 'provider'
|
|
171
|
+
|
|
172
|
+
/** The voxgig/plugin error code a SekretoError travels under when it is
|
|
173
|
+
* raised inside a definition's `define`.
|
|
174
|
+
*
|
|
175
|
+
* plugin wraps a code-less error raised by a callback as
|
|
176
|
+
* `plugin_define_failed`, and keeps an error that already carries a
|
|
177
|
+
* code. A provider that refuses its own configuration - `kv: 3`, a
|
|
178
|
+
* missing project - raises a SekretoError, and that message is pinned
|
|
179
|
+
* by the spec byte for byte, so it must come back out of the host
|
|
180
|
+
* exactly as it went in. `providerplugin` gives it this code on the way
|
|
181
|
+
* in; `Sekreto` turns it back into a SekretoError on the way out. */
|
|
182
|
+
export const ERROR_CODE = 'sekreto_error'
|
|
183
|
+
|
|
184
|
+
/** A provider kind, as a voxgig/plugin definition.
|
|
185
|
+
*
|
|
186
|
+
* This is the whole bridge between the two libraries. The definition's
|
|
187
|
+
* `name` is the `kind` a ProviderSpec names; its `define` reads the spec
|
|
188
|
+
* as `inst.options`, builds the provider with `make`, and exports it.
|
|
189
|
+
* Nothing runs at `activate`: a provider opens nothing until its first
|
|
190
|
+
* lookup, so there is nothing to capture - a provider that does hold a
|
|
191
|
+
* resource acquires it there and lets the instance scope unwind it.
|
|
192
|
+
*
|
|
193
|
+
* Every built-in and every plugin is made this way, so a custom
|
|
194
|
+
* provider kind is one call:
|
|
195
|
+
*
|
|
196
|
+
* providerplugin('mystore', (spec) => mystoreprovider(spec.addr))
|
|
197
|
+
*/
|
|
198
|
+
export function providerplugin(
|
|
199
|
+
kind: string,
|
|
200
|
+
make: (spec: ProviderSpec) => Provider,
|
|
201
|
+
): Definition {
|
|
202
|
+
return {
|
|
203
|
+
name: kind,
|
|
204
|
+
define: (inst: any) => {
|
|
205
|
+
let provider: Provider
|
|
206
|
+
try {
|
|
207
|
+
provider = make(inst.options as ProviderSpec)
|
|
208
|
+
} catch (err: any) {
|
|
209
|
+
if (err instanceof SekretoError) {
|
|
210
|
+
throw new PluginError(ERROR_CODE, err.message, { ref: inst.ref, cause: err.message })
|
|
211
|
+
}
|
|
212
|
+
throw err
|
|
213
|
+
}
|
|
214
|
+
inst.export(PROVIDER_EXPORT, provider)
|
|
215
|
+
},
|
|
216
|
+
}
|
|
217
|
+
}
|
|
172
218
|
|
|
173
219
|
export {
|
|
174
220
|
SekretoError, awsparam, checkname, envkey, flatname, parsedotenv, vaultref,
|
|
175
221
|
}
|
|
176
222
|
export { nodemod }
|
|
223
|
+
export type { Definition }
|
|
224
|
+
|
|
225
|
+
/** Decode standard base64, or undefined when the text is not base64.
|
|
226
|
+
*
|
|
227
|
+
* `Buffer.from(text, 'base64')` is lenient: it skips anything outside the
|
|
228
|
+
* alphabet and hands back whatever it managed, so a corrupted payload
|
|
229
|
+
* became a plausible-looking string of bytes that the caller then returned
|
|
230
|
+
* AS THE SECRET. The alphabet is checked first so that a store which
|
|
231
|
+
* answered incoherently can be told apart from one that answered.
|
|
232
|
+
*
|
|
233
|
+
* A store that could not answer coherently is an ERROR, never a miss — the
|
|
234
|
+
* same rule this code already applies to a 200 whose body is not JSON. */
|
|
235
|
+
export function unbase64(text: string): string | undefined {
|
|
236
|
+
const trimmed = text.replace(/\s+/g, '')
|
|
237
|
+
|
|
238
|
+
if (!/^[A-Za-z0-9+/]*={0,2}$/.test(trimmed) || 0 !== trimmed.length % 4) {
|
|
239
|
+
return undefined
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
return Buffer.from(trimmed, 'base64').toString('utf8')
|
|
243
|
+
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
// VENDORED: @voxgig/struct 0.3.
|
|
2
|
-
// Source: https://github.com/voxgig/struct @
|
|
1
|
+
// VENDORED: @voxgig/struct 0.3.4 (typescript/src/StructUtility.ts)
|
|
2
|
+
// Source: https://github.com/voxgig/struct @ 2caf7f448f265144c18dd6fab6ba270a7f3bca07 [tag: sdk-20260904-1610-0]
|
|
3
3
|
// License: MIT (c) voxgig - see repository LICENSE. Do not edit: resync from upstream.
|
|
4
4
|
/* Copyright (c) 2025-2026 Voxgig Ltd. MIT LICENSE. */
|
|
5
5
|
|
|
6
|
-
// VERSION: @voxgig/struct 0.3.
|
|
6
|
+
// VERSION: @voxgig/struct 0.3.4
|
|
7
7
|
|
|
8
8
|
/* Voxgig Struct
|
|
9
9
|
* =============
|
|
@@ -1,24 +1,27 @@
|
|
|
1
|
-
// The corpus test runner: vendored @voxgig/omni
|
|
2
|
-
// API
|
|
3
|
-
//
|
|
1
|
+
// The corpus test runner: vendored @voxgig/omni driven through its NATIVE
|
|
2
|
+
// API (`makeRunner(specref, provider)`), presented to the corpus tests in
|
|
3
|
+
// the struct-runner shape they already use (`R.spec`, `R.runset`,
|
|
4
|
+
// `R.runsetflags`, `R.client`). No compat shim is vendored: the adapter
|
|
5
|
+
// below IS the whole bridge, per language, per the vendor-tag rollout
|
|
6
|
+
// (docs/design/vendor-tag-rollout.md, Decision 4).
|
|
4
7
|
//
|
|
5
|
-
// Two local decisions, both required
|
|
8
|
+
// Two local decisions, both required:
|
|
6
9
|
//
|
|
7
|
-
// 1. SPEC PATH.
|
|
8
|
-
//
|
|
9
|
-
//
|
|
10
|
-
//
|
|
11
|
-
//
|
|
12
|
-
// the existing TEST_JSON_FILE constant keeps working verbatim.
|
|
10
|
+
// 1. SPEC PATH. omni's own spec resolution expects the caller to hand it a
|
|
11
|
+
// usable path — its docs say a port must resolve the path itself. This
|
|
12
|
+
// module compiles to dist-test/omni.js, the same depth as the old
|
|
13
|
+
// dist-test/runner.js, so the existing TEST_JSON_FILE constant keeps
|
|
14
|
+
// working verbatim: a relative path is absolutized against __dirname.
|
|
13
15
|
//
|
|
14
16
|
// 2. PROVIDER DELEGATION. Corpus-driven contexts get `ctx.client` set to
|
|
15
|
-
// the runner's provider
|
|
16
|
-
//
|
|
17
|
-
//
|
|
18
|
-
// client.
|
|
19
|
-
//
|
|
20
|
-
//
|
|
21
|
-
//
|
|
17
|
+
// the runner's provider (omni overwrites it on any ctx/args map entry).
|
|
18
|
+
// A five-hook provider object HIDES the live SDK from the generated
|
|
19
|
+
// utilities that reach through it — prepareHeaders via client.options(),
|
|
20
|
+
// fetcher via client._mode, the feature helpers via client._rootctx and
|
|
21
|
+
// even ASSIGNING client._features. So the provider here is built by
|
|
22
|
+
// PROTOTYPE DELEGATION over the live SDK instance: every SDK member
|
|
23
|
+
// resolves, while the omni hooks sit on top. (Upstream omni#56 tracks
|
|
24
|
+
// giving the stock provider the same shape.)
|
|
22
25
|
|
|
23
26
|
import { isAbsolute, join } from 'node:path'
|
|
24
27
|
|
|
@@ -26,27 +29,92 @@ import {
|
|
|
26
29
|
EXISTSMARK,
|
|
27
30
|
NULLMARK,
|
|
28
31
|
UNDEFMARK,
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
OmniError,
|
|
33
|
+
nullmodifier,
|
|
34
|
+
makeRunner as omnimakerunner,
|
|
35
|
+
} from './vendor/omni/index'
|
|
36
|
+
|
|
37
|
+
import type { Json, Provider, Subject } from './vendor/omni/index'
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
// The runner API the corpus tests consume — struct's runner shape, name
|
|
41
|
+
// for name, served over native omni.
|
|
42
|
+
export type StructSubject = (...args: any[]) => any
|
|
43
|
+
export type StructRunSet = (testspec: any, testsubject?: StructSubject) => Promise<void>
|
|
44
|
+
export type StructRunSetFlags = (
|
|
45
|
+
testspec: any,
|
|
46
|
+
flags: Record<string, any>,
|
|
47
|
+
testsubject?: StructSubject,
|
|
48
|
+
) => Promise<void>
|
|
49
|
+
|
|
50
|
+
export type StructRunPack = {
|
|
51
|
+
spec: any
|
|
52
|
+
runset: StructRunSet
|
|
53
|
+
runsetflags: StructRunSetFlags
|
|
54
|
+
subject?: StructSubject
|
|
55
|
+
client: StructProvider
|
|
56
|
+
}
|
|
34
57
|
|
|
35
|
-
|
|
58
|
+
export type StructRunner = (name: string, store?: any) => Promise<StructRunPack>
|
|
36
59
|
|
|
37
|
-
|
|
60
|
+
// An omni provider that is also the live SDK: test code reaches through the
|
|
61
|
+
// runpack's `client` as an SDK (`client.utility().struct`), so alongside the
|
|
62
|
+
// omni hooks every SDK member must resolve.
|
|
63
|
+
export type StructProvider = Provider & {
|
|
64
|
+
utility: () => any
|
|
65
|
+
tester: (options?: any) => any
|
|
66
|
+
sdk: any
|
|
67
|
+
}
|
|
38
68
|
|
|
39
69
|
|
|
40
|
-
//
|
|
41
|
-
// structprovider
|
|
42
|
-
function
|
|
43
|
-
|
|
44
|
-
|
|
70
|
+
// The omni hooks for an SDK subject — what the retired compat shim called
|
|
71
|
+
// `structprovider`, inlined here because this resolver is the one consumer.
|
|
72
|
+
function sdkhooks(sdk: any) {
|
|
73
|
+
return {
|
|
74
|
+
// A subject is resolved from the utility, or from utility.struct.
|
|
75
|
+
subject: (name: string): Subject | undefined => {
|
|
76
|
+
const utility = sdk.utility()
|
|
77
|
+
return utility[name] || (utility.struct && utility.struct[name])
|
|
78
|
+
},
|
|
79
|
+
|
|
80
|
+
// A DEF.client entry becomes another SDK instance — rewrapped with the
|
|
81
|
+
// same delegating shape, not a plain hook object.
|
|
82
|
+
client: async (options: Json) => sdkprovider(await sdk.tester(options)),
|
|
83
|
+
|
|
84
|
+
// The SDK supplies its own context wrapper.
|
|
85
|
+
contextify: (val: Json): Json => {
|
|
86
|
+
const utility = sdk.utility()
|
|
87
|
+
const hook =
|
|
88
|
+
'function' === typeof utility.contextify ? utility.contextify
|
|
89
|
+
: 'function' === typeof utility.makeContext ? utility.makeContext
|
|
90
|
+
: null
|
|
91
|
+
const ctx = null == hook ? val : hook.call(utility, val)
|
|
92
|
+
if (null != ctx && 'object' === typeof ctx) {
|
|
93
|
+
; (ctx as any).utility = utility
|
|
94
|
+
}
|
|
95
|
+
return ctx
|
|
96
|
+
},
|
|
97
|
+
|
|
98
|
+
// Client options may reference the runner store.
|
|
99
|
+
inject: (options: Json, store: Json): Json => {
|
|
100
|
+
const structutils = sdk.utility().struct
|
|
101
|
+
if (structutils && 'function' === typeof structutils.inject) {
|
|
102
|
+
return structutils.inject(options, store)
|
|
103
|
+
}
|
|
104
|
+
return options
|
|
105
|
+
},
|
|
106
|
+
|
|
107
|
+
utility: () => sdk.utility(),
|
|
108
|
+
tester: (options?: any) => sdk.tester(options),
|
|
109
|
+
sdk,
|
|
110
|
+
}
|
|
111
|
+
}
|
|
45
112
|
|
|
46
|
-
// DEF.client entries become SDK instances too - rewrap with the same
|
|
47
|
-
// delegating shape, not the stock one.
|
|
48
|
-
provider.client = async (options: Json) => sdkprovider(await sdk.tester(options))
|
|
49
113
|
|
|
114
|
+
// Wrap the SDK as an omni provider WITHOUT hiding it: hooks from sdkhooks,
|
|
115
|
+
// everything else through the prototype chain.
|
|
116
|
+
function sdkprovider(sdk: any): StructProvider {
|
|
117
|
+
const provider = Object.assign(Object.create(sdk), sdkhooks(sdk))
|
|
50
118
|
return provider
|
|
51
119
|
}
|
|
52
120
|
|
|
@@ -76,6 +144,10 @@ async function makeRunner(testfile: string | Json, client: any): Promise<StructR
|
|
|
76
144
|
}
|
|
77
145
|
|
|
78
146
|
|
|
147
|
+
// struct's flag-modifier name, served from native omni.
|
|
148
|
+
const nullModifier = nullmodifier
|
|
149
|
+
|
|
150
|
+
|
|
79
151
|
export {
|
|
80
152
|
EXISTSMARK,
|
|
81
153
|
NULLMARK,
|
|
@@ -315,6 +315,33 @@ describe('struct', async () => {
|
|
|
315
315
|
})
|
|
316
316
|
|
|
317
317
|
|
|
318
|
+
// The struct.nullsem section: does a PRESENT key holding a JSON null
|
|
319
|
+
// read as "no value"? Opt-in per target (create-sdkgen ships it; an
|
|
320
|
+
// older project corpus may predate it - the skip below says so OUT
|
|
321
|
+
// LOUD rather than passing vacuously). All lanes run {null: false}:
|
|
322
|
+
// without the flag the runner rewrites every null to '__NULL__' and
|
|
323
|
+
// the section asserts nothing about null at all.
|
|
324
|
+
test('nullsem', async (t) => {
|
|
325
|
+
const nullsem = spec.nullsem
|
|
326
|
+
if (null == nullsem) {
|
|
327
|
+
t.skip('corpus predates struct.nullsem - refresh .sdk/test/struct from create-sdkgen')
|
|
328
|
+
return
|
|
329
|
+
}
|
|
330
|
+
const { getprop, getelem, getpath, haskey, keysof } = struct
|
|
331
|
+
|
|
332
|
+
await runsetflags(nullsem.getprop, { null: false }, (vin: any) =>
|
|
333
|
+
undefined === vin.alt ? getprop(vin.val, vin.key) : getprop(vin.val, vin.key, vin.alt))
|
|
334
|
+
await runsetflags(nullsem.getelem, { null: false }, (vin: any) =>
|
|
335
|
+
undefined === vin.alt ? getelem(vin.val, vin.key) : getelem(vin.val, vin.key, vin.alt))
|
|
336
|
+
await runsetflags(nullsem.getpath, { null: false }, (vin: any) =>
|
|
337
|
+
undefined === vin.alt ? getpath(vin.store, vin.path) : getpath(vin.store, vin.path, vin.alt))
|
|
338
|
+
await runsetflags(nullsem.haskey, { null: false }, (vin: any) =>
|
|
339
|
+
haskey(vin.src, vin.key))
|
|
340
|
+
await runsetflags(nullsem.keysof, { null: false }, (vin: any) =>
|
|
341
|
+
keysof(vin))
|
|
342
|
+
})
|
|
343
|
+
|
|
344
|
+
|
|
318
345
|
test('minor-haskey', async () => {
|
|
319
346
|
await runsetflags(spec.minor.haskey, { null: false }, (vin: any) =>
|
|
320
347
|
struct.haskey(vin.src, vin.key))
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
// VENDORED: @voxgig/omni 0.1.
|
|
2
|
-
// Source: https://github.com/voxgig/omni @
|
|
1
|
+
// VENDORED: @voxgig/omni 0.1.4 (typescript/src/Runner.ts)
|
|
2
|
+
// Source: https://github.com/voxgig/omni @ 8c3e1b573a8d35796f7fc45e3226b977023cabf7 [tag: sdk-20260904-1610-0]
|
|
3
3
|
// License: MIT (c) voxgig - see repository LICENSE. Do not edit: resync from upstream.
|
|
4
4
|
// Omni: the shared multi-language test runner.
|
|
5
5
|
//
|
|
@@ -50,6 +50,8 @@ export type Provider = {
|
|
|
50
50
|
contextify?: (val: Json) => Json
|
|
51
51
|
// Resolve references in client options against the runner store.
|
|
52
52
|
inject?: (options: Json, store: Json) => Json
|
|
53
|
+
// Build the `match.err` base from the raised error. See `errify`.
|
|
54
|
+
errify?: (err: any) => Json
|
|
53
55
|
}
|
|
54
56
|
|
|
55
57
|
export type RunSet = (testspec: Json, testsubject?: Subject) => Promise<void>
|
|
@@ -359,6 +361,18 @@ function fixjsonval(val: Json, donull: boolean): Json {
|
|
|
359
361
|
// collapsing that to String(err) yields '[object Object]', which fails both
|
|
360
362
|
// the `err` check and every `match.err.*` leaf. The struct repository's
|
|
361
363
|
// original runner read `.message` regardless of the thrown value's class.
|
|
364
|
+
// THE SPREAD IS THE CONTRACT, not an accident of JavaScript. An error's
|
|
365
|
+
// OWN enumerable properties survive into the base, so a library whose
|
|
366
|
+
// errors carry a `code` (or a `status`, or a `path`) can assert on it
|
|
367
|
+
// with `match: {err: {code: 'x'}}` rather than pattern-matching prose.
|
|
368
|
+
//
|
|
369
|
+
// Only JavaScript gets that for free. A port whose subject reports
|
|
370
|
+
// failure as a message string - rust, cpp, zig, ocaml, haskell - has
|
|
371
|
+
// nothing to spread, and a port that builds `{name, message}` by hand
|
|
372
|
+
// drops the fields even when it has them. `Provider.errify` is how those
|
|
373
|
+
// ports reach the same place: it overrides this function entirely, so a
|
|
374
|
+
// library supplies its own structured base and omni needs to know
|
|
375
|
+
// nothing about the shape of it.
|
|
362
376
|
function errify(err: any): Json {
|
|
363
377
|
if (err instanceof Error) {
|
|
364
378
|
return { ...err, name: err.name, message: err.message }
|
|
@@ -371,6 +385,13 @@ function errify(err: any): Json {
|
|
|
371
385
|
return { name: 'Error', message: String(err) }
|
|
372
386
|
}
|
|
373
387
|
|
|
388
|
+
// The error base a `match.err` sees: the provider's own, when it has one.
|
|
389
|
+
function errbase(err: any, provider?: Provider): Json {
|
|
390
|
+
return null != provider && null != provider.errify
|
|
391
|
+
? provider.errify(err)
|
|
392
|
+
: errify(err)
|
|
393
|
+
}
|
|
394
|
+
|
|
374
395
|
function errmessage(err: any): string {
|
|
375
396
|
return err instanceof Error ? err.message
|
|
376
397
|
: null != err && 'string' === typeof err.message ? err.message
|
|
@@ -457,7 +478,13 @@ function checkresult(flags: Flags, index: number, entry: Json, args: Json[], res
|
|
|
457
478
|
}
|
|
458
479
|
}
|
|
459
480
|
|
|
460
|
-
function handleerror(
|
|
481
|
+
function handleerror(
|
|
482
|
+
flags: Flags,
|
|
483
|
+
index: number,
|
|
484
|
+
entry: Json,
|
|
485
|
+
err: any,
|
|
486
|
+
provider?: Provider,
|
|
487
|
+
) {
|
|
461
488
|
entry.thrown = err
|
|
462
489
|
|
|
463
490
|
const entryerr = entry.err
|
|
@@ -469,7 +496,7 @@ function handleerror(flags: Flags, index: number, entry: Json, err: any) {
|
|
|
469
496
|
in: entry.in,
|
|
470
497
|
out: entry.res,
|
|
471
498
|
ctx: entry.ctx,
|
|
472
|
-
err:
|
|
499
|
+
err: errbase(err, provider),
|
|
473
500
|
})
|
|
474
501
|
}
|
|
475
502
|
return
|
|
@@ -661,7 +688,7 @@ async function makeRunner(specref: string | Json, provider?: Provider): Promise<
|
|
|
661
688
|
if (err instanceof OmniError) {
|
|
662
689
|
throw err
|
|
663
690
|
}
|
|
664
|
-
handleerror(useflags, index, entry, err)
|
|
691
|
+
handleerror(useflags, index, entry, err, useprovider)
|
|
665
692
|
}
|
|
666
693
|
}
|
|
667
694
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
// VENDORED: @voxgig/omni 0.1.
|
|
2
|
-
// Source: https://github.com/voxgig/omni @
|
|
1
|
+
// VENDORED: @voxgig/omni 0.1.4 (typescript/src/Util.ts)
|
|
2
|
+
// Source: https://github.com/voxgig/omni @ 8c3e1b573a8d35796f7fc45e3226b977023cabf7 [tag: sdk-20260904-1610-0]
|
|
3
3
|
// License: MIT (c) voxgig - see repository LICENSE. Do not edit: resync from upstream.
|
|
4
4
|
// Omni internal JSON utilities.
|
|
5
5
|
//
|