@voxgig/sdkgen 4.8.2 → 4.8.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/voxgig-sdkgen +1 -1
- package/dist/action/doctor.d.ts +1 -0
- package/dist/action/doctor.js +50 -2
- package/dist/action/doctor.js.map +1 -1
- package/dist/helpers/naming.js +4 -2
- package/dist/helpers/naming.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/model/sdkgen.aon +21 -0
- package/package.json +1 -1
- package/project/.sdk/model/feature/secrets.aon +120 -18
- package/project/.sdk/model/target/c.aon +10 -0
- package/project/.sdk/model/target/clojure.aon +13 -0
- package/project/.sdk/model/target/cpp.aon +10 -0
- package/project/.sdk/model/target/csharp.aon +9 -0
- package/project/.sdk/model/target/dart.aon +10 -0
- package/project/.sdk/model/target/elixir.aon +9 -0
- package/project/.sdk/model/target/go.aon +13 -0
- package/project/.sdk/model/target/java.aon +9 -0
- package/project/.sdk/model/target/js.aon +7 -0
- package/project/.sdk/model/target/kotlin.aon +9 -0
- package/project/.sdk/model/target/lean.aon +17 -0
- package/project/.sdk/model/target/lua.aon +8 -0
- package/project/.sdk/model/target/ocaml.aon +9 -0
- package/project/.sdk/model/target/perl.aon +8 -0
- package/project/.sdk/model/target/php.aon +8 -0
- package/project/.sdk/model/target/py.aon +13 -0
- package/project/.sdk/model/target/rb.aon +8 -0
- package/project/.sdk/model/target/rust.aon +10 -0
- package/project/.sdk/model/target/scala.aon +21 -2
- package/project/.sdk/model/target/swift.aon +18 -0
- package/project/.sdk/model/target/ts.aon +13 -0
- package/project/.sdk/src/cmp/clojure/Package_clojure.ts +9 -2
- package/project/.sdk/src/cmp/cpp/Gitignore_cpp.ts +3 -0
- package/project/.sdk/src/cmp/dart/Test_dart.ts +2 -0
- package/project/.sdk/src/cmp/elixir/Package_elixir.ts +4 -1
- package/project/.sdk/src/cmp/go/Config_go.ts +59 -2
- package/project/.sdk/src/cmp/go/Main_go.ts +8 -2
- package/project/.sdk/src/cmp/java/Test_java.ts +6 -5
- package/project/.sdk/src/cmp/kotlin/Test_kotlin.ts +6 -5
- package/project/.sdk/src/cmp/lean/Package_lean.ts +23 -0
- package/project/.sdk/src/cmp/lean/ReadmeInstall_lean.ts +1 -0
- package/project/.sdk/src/cmp/lean/ReadmeTopTest_lean.ts +1 -0
- package/project/.sdk/src/cmp/ocaml/Gitignore_ocaml.ts +1 -0
- package/project/.sdk/src/cmp/ocaml/Main_ocaml.ts +7 -3
- package/project/.sdk/src/cmp/py/Config_py.ts +82 -1
- package/project/.sdk/src/cmp/py/Main_py.ts +44 -0
- package/project/.sdk/src/cmp/py/fragment/Main.fragment.py +2 -0
- package/project/.sdk/src/cmp/swift/Main_swift.ts +10 -0
- package/project/.sdk/src/cmp/swift/Package_swift.ts +13 -1
- package/project/.sdk/src/cmp/ts/Config_ts.ts +42 -17
- package/project/.sdk/src/cmp/ts/fragment/Config.data.fragment.ts +13 -1
- package/project/.sdk/src/cmp/ts/fragment/Config.fragment.ts +13 -1
- package/project/.sdk/tm/c/Makefile +38 -3
- package/project/.sdk/tm/c/tests/omni_resolver.h +361 -0
- package/project/.sdk/tm/c/tests/omni_smoke_test.c +237 -0
- package/project/.sdk/tm/c/tests/primary_corpus_test.c +205 -284
- package/project/.sdk/tm/c/tests/struct_corpus_test.c +292 -212
- package/project/.sdk/tm/c/tests/vendor/omni/json.c +811 -0
- package/project/.sdk/tm/c/tests/vendor/omni/omni.h +240 -0
- package/project/.sdk/tm/c/tests/vendor/omni/runner.c +940 -0
- package/project/.sdk/tm/c/tests/vendor/omni/util.c +351 -0
- package/project/.sdk/tm/c/utility/struct/utility.c +7 -2
- package/project/.sdk/tm/clojure/test/sdk/test/omni.clj +401 -0
- package/project/.sdk/tm/clojure/test/sdk/test/omni_smoke.clj +81 -0
- package/project/.sdk/tm/clojure/test/sdk/test/primary.clj +92 -58
- package/project/.sdk/tm/clojure/test/sdk/test/struct_corpus.clj +122 -149
- package/project/.sdk/tm/clojure/test/sdk/test_runner.clj +8 -3
- package/project/.sdk/tm/clojure/test/vendor/omni/voxgig/omni/json.clj +145 -0
- package/project/.sdk/tm/clojure/test/vendor/omni/voxgig/omni/runner.clj +445 -0
- package/project/.sdk/tm/clojure/test/vendor/omni/voxgig/omni/util.clj +145 -0
- package/project/.sdk/tm/cpp/Makefile +5 -1
- package/project/.sdk/tm/cpp/test/omni_resolver.hpp +473 -0
- package/project/.sdk/tm/cpp/test/omni_smoke_test.cpp +209 -0
- package/project/.sdk/tm/cpp/test/primary_utility_test.cpp +243 -184
- package/project/.sdk/tm/cpp/test/runner_support.hpp +68 -181
- package/project/.sdk/tm/cpp/test/struct_corpus_test.cpp +183 -56
- package/project/.sdk/tm/cpp/test/vendor/omni/json.hpp +406 -0
- package/project/.sdk/tm/cpp/test/vendor/omni/omni.hpp +751 -0
- package/project/.sdk/tm/cpp/test/vendor/omni/util.hpp +256 -0
- package/project/.sdk/tm/cpp/utility/pipeline.hpp +7 -1
- package/project/.sdk/tm/csharp/test/OmniResolver.cs +491 -0
- package/project/.sdk/tm/csharp/test/OmniSmokeTest.cs +106 -0
- package/project/.sdk/tm/csharp/test/PrimaryUtilityTest.cs +299 -316
- package/project/.sdk/tm/csharp/test/Runner.cs +104 -269
- package/project/.sdk/tm/csharp/test/StructUtilityTest.cs +535 -724
- package/project/.sdk/tm/csharp/test/vendor/omni/Runner.cs +864 -0
- package/project/.sdk/tm/csharp/test/vendor/omni/Util.cs +347 -0
- package/project/.sdk/tm/csharp/utility/MakeSpec.cs +3 -1
- package/project/.sdk/tm/csharp/utility/PrepareMethod.cs +6 -1
- package/project/.sdk/tm/csharp/utility/struct/Struct.cs +21 -5
- package/project/.sdk/tm/dart/test/omni.dart +520 -0
- package/project/.sdk/tm/dart/test/omni_smoke_test.dart +143 -0
- package/project/.sdk/tm/dart/test/primary_test.dart +86 -28
- package/project/.sdk/tm/dart/test/struct_test.dart +438 -11
- package/project/.sdk/tm/dart/test/vendor/omni/omni.dart +7 -0
- package/project/.sdk/tm/dart/test/vendor/omni/runner.dart +653 -0
- package/project/.sdk/tm/dart/test/vendor/omni/util.dart +232 -0
- package/project/.sdk/tm/elixir/Makefile +11 -3
- package/project/.sdk/tm/elixir/test/omni_smoke_test.exs +117 -0
- package/project/.sdk/tm/elixir/test/primary_utility_test.exs +341 -16
- package/project/.sdk/tm/elixir/test/struct_corpus_test.exs +554 -9
- package/project/.sdk/tm/elixir/test/support/omni.ex +377 -0
- package/project/.sdk/tm/elixir/test/vendor/omni/json.ex +122 -0
- package/project/.sdk/tm/elixir/test/vendor/omni/runner.ex +623 -0
- package/project/.sdk/tm/elixir/test/vendor/omni/util.ex +187 -0
- package/project/.sdk/tm/go/core/context.go +32 -16
- package/project/.sdk/tm/go/feature/secrets/plugin/capability.go +261 -0
- package/project/.sdk/tm/go/feature/secrets/plugin/catalog.go +78 -0
- package/project/.sdk/tm/go/feature/secrets/plugin/config.go +652 -0
- package/project/.sdk/tm/go/feature/secrets/plugin/depend.go +250 -0
- package/project/.sdk/tm/go/feature/secrets/plugin/env.go +194 -0
- package/project/.sdk/tm/go/feature/secrets/plugin/export.go +80 -0
- package/project/.sdk/tm/go/feature/secrets/plugin/graph.go +238 -0
- package/project/.sdk/tm/go/feature/secrets/plugin/host.go +1575 -0
- package/project/.sdk/tm/go/feature/secrets/plugin/order.go +248 -0
- package/project/.sdk/tm/go/feature/secrets/plugin/point.go +184 -0
- package/project/.sdk/tm/go/feature/secrets/plugin/ref.go +123 -0
- package/project/.sdk/tm/go/feature/secrets/plugin/resolve.go +79 -0
- package/project/.sdk/tm/go/feature/secrets/plugin/types.go +296 -0
- package/project/.sdk/tm/go/feature/secrets/plugin/util.go +87 -0
- package/project/.sdk/tm/go/feature/secrets/plugin/version.go +161 -0
- package/project/.sdk/tm/go/feature/secrets/plugins/aws/aws.go +292 -0
- package/project/.sdk/tm/go/feature/secrets/plugins/aws/sigv4.go +201 -0
- package/project/.sdk/tm/go/feature/secrets/plugins/azuresecrets/azuresecrets.go +187 -0
- package/project/.sdk/tm/go/feature/secrets/plugins/boru/boru.go +184 -0
- package/project/.sdk/tm/go/feature/secrets/plugins/doppler/doppler.go +114 -0
- package/project/.sdk/tm/go/feature/secrets/plugins/gcpsecrets/gcpsecrets.go +156 -0
- package/project/.sdk/tm/go/feature/secrets/plugins/hashicorp/hashicorp.go +209 -0
- package/project/.sdk/tm/go/feature/secrets/plugins/httpjson/httpjson.go +241 -0
- package/project/.sdk/tm/go/feature/secrets/plugins/infisical/infisical.go +151 -0
- package/project/.sdk/tm/go/feature/secrets/plugins/onepassword/onepassword.go +152 -0
- package/project/.sdk/tm/go/feature/secrets/plugins/secretspec/secretspec.go +143 -0
- package/project/.sdk/tm/go/feature/secrets/sekreto/addr.go +120 -0
- package/project/.sdk/tm/go/feature/secrets/sekreto/providers.go +439 -0
- package/project/.sdk/tm/go/feature/secrets/sekreto/sekreto.go +685 -0
- package/project/.sdk/tm/go/feature/secrets_feature.go +675 -0
- package/project/.sdk/tm/go/src/feature/secrets/.gitkeep +0 -0
- package/project/.sdk/tm/go/test/feature/secrets/secrets_feature_test.go +799 -0
- package/project/.sdk/tm/go/test/omni/omni.go +897 -0
- package/project/.sdk/tm/go/test/omni/util.go +360 -0
- package/project/.sdk/tm/go/test/omniresolver_test.go +748 -0
- package/project/.sdk/tm/go/test/omnismoke_test.go +112 -0
- package/project/.sdk/tm/go/test/primary_utility_test.go +123 -191
- package/project/.sdk/tm/go/test/struct_utility_test.go +323 -16
- package/project/.sdk/tm/go/test/testsupport_test.go +294 -0
- package/project/.sdk/tm/go/utility/make_options.go +8 -1
- package/project/.sdk/tm/go/utility/prepare_method.go +5 -1
- package/project/.sdk/tm/go/utility/struct/voxgigstruct.go +2 -2
- package/project/.sdk/tm/java/test/OmniResolver.java +355 -0
- package/project/.sdk/tm/java/test/OmniSmokeTest.java +99 -0
- package/project/.sdk/tm/java/test/PrimaryUtilityTest.java +254 -280
- package/project/.sdk/tm/java/test/RunnerSupport.java +9 -194
- package/project/.sdk/tm/java/test/StructCorpusTest.java +119 -42
- package/project/.sdk/tm/java/test/vendor/omni/Json.java +287 -0
- package/project/.sdk/tm/java/test/vendor/omni/Runner.java +851 -0
- package/project/.sdk/tm/java/test/vendor/omni/Util.java +322 -0
- package/project/.sdk/tm/java/utility/MakeSpec.java +3 -1
- package/project/.sdk/tm/java/utility/PrepareMethod.java +5 -5
- package/project/.sdk/tm/java/utility/struct/Struct.java +17 -4
- package/project/.sdk/tm/js/src/utility/StructUtility.js +3 -3
- package/project/.sdk/tm/js/test/omni.js +251 -0
- package/project/.sdk/tm/js/test/omni.test.js +105 -0
- package/project/.sdk/tm/js/test/utility/PrimaryUtility.test.js +6 -2
- package/project/.sdk/tm/js/test/utility/StructUtility.test.js +27 -2
- package/project/.sdk/tm/js/test/vendor/omni/index.js +77 -0
- package/project/.sdk/tm/js/test/vendor/omni/runner.js +613 -0
- package/project/.sdk/tm/js/test/vendor/omni/util.js +212 -0
- package/project/.sdk/tm/kotlin/core/Utility.kt +1 -1
- package/project/.sdk/tm/kotlin/test/OmniResolver.kt +343 -0
- package/project/.sdk/tm/kotlin/test/OmniSmokeTest.kt +100 -0
- package/project/.sdk/tm/kotlin/test/PrimaryUtilityTest.kt +244 -262
- package/project/.sdk/tm/kotlin/test/RunnerSupport.kt +9 -178
- package/project/.sdk/tm/kotlin/test/StructCorpusTest.kt +121 -32
- package/project/.sdk/tm/kotlin/test/vendor/omni/Json.kt +264 -0
- package/project/.sdk/tm/kotlin/test/vendor/omni/Runner.kt +615 -0
- package/project/.sdk/tm/kotlin/test/vendor/omni/Util.kt +139 -0
- package/project/.sdk/tm/kotlin/utility/MakeSpecUrl.kt +6 -3
- package/project/.sdk/tm/kotlin/utility/Prepare.kt +6 -6
- package/project/.sdk/tm/kotlin/utility/struct/Struct.kt +18 -2
- package/project/.sdk/tm/lean/Makefile +12 -5
- package/project/.sdk/tm/lean/src/SdkUtility.lean +14 -1
- package/project/.sdk/tm/lean/test/OmniResolver.lean +358 -0
- package/project/.sdk/tm/lean/test/OmniSmoke.lean +174 -0
- package/project/.sdk/tm/lean/test/StructCorpus.lean +245 -574
- package/project/.sdk/tm/lean/test/TPrimaryUtility.lean +155 -291
- package/project/.sdk/tm/lean/test/vendor/omni/Omni.lean +997 -0
- package/project/.sdk/tm/lua/test/omni.lua +456 -0
- package/project/.sdk/tm/lua/test/omni_smoke_test.lua +103 -0
- package/project/.sdk/tm/lua/test/primary_utility_test.lua +250 -509
- package/project/.sdk/tm/lua/test/struct_utility_test.lua +161 -70
- package/project/.sdk/tm/lua/test/vendor/omni/json.lua +268 -0
- package/project/.sdk/tm/lua/test/vendor/omni/regex.lua +385 -0
- package/project/.sdk/tm/lua/test/vendor/omni/runner.lua +641 -0
- package/project/.sdk/tm/lua/test/vendor/omni/util.lua +282 -0
- package/project/.sdk/tm/lua/utility/prepare_method.lua +5 -1
- package/project/.sdk/tm/lua/utility/struct/regex.lua +663 -0
- package/project/.sdk/tm/lua/utility/struct/struct.lua +660 -420
- package/project/.sdk/tm/ocaml/Makefile +37 -12
- package/project/.sdk/tm/ocaml/test/omni_resolver.ml +284 -0
- package/project/.sdk/tm/ocaml/test/omni_smoke_test.ml +169 -0
- package/project/.sdk/tm/ocaml/test/primary_utility_test.ml +84 -100
- package/project/.sdk/tm/ocaml/test/struct_corpus.ml +225 -201
- package/project/.sdk/tm/ocaml/test/vendor/omni/omni.ml +1157 -0
- package/project/.sdk/tm/perl/lib/Voxgig/Struct.pm +88 -12
- package/project/.sdk/tm/perl/t/omni.pm +647 -0
- package/project/.sdk/tm/perl/t/omni_smoke.t +87 -0
- package/project/.sdk/tm/perl/t/primary_utility.t +189 -487
- package/project/.sdk/tm/perl/t/struct_utility.t +455 -389
- package/project/.sdk/tm/perl/t/vendor/omni/Voxgig/Omni/Runner.pm +649 -0
- package/project/.sdk/tm/perl/t/vendor/omni/Voxgig/Omni/Util.pm +253 -0
- package/project/.sdk/tm/perl/t/vendor/omni/Voxgig/Omni.pm +24 -0
- package/project/.sdk/tm/perl/utility/prepare_method.pm +7 -2
- package/project/.sdk/tm/php/test/Omni.php +691 -0
- package/project/.sdk/tm/php/test/OmniSmokeTest.php +93 -0
- package/project/.sdk/tm/php/test/PrimaryUtilityTest.php +210 -571
- package/project/.sdk/tm/php/test/StructUtilityTest.php +320 -342
- package/project/.sdk/tm/php/test/vendor/omni/Runner.php +644 -0
- package/project/.sdk/tm/php/test/vendor/omni/Util.php +283 -0
- package/project/.sdk/tm/php/utility/MakeSpec.php +10 -3
- package/project/.sdk/tm/php/utility/PrepareBody.php +7 -1
- package/project/.sdk/tm/php/utility/PrepareMethod.php +6 -2
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/__init__.py +36 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/capability.py +141 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/catalog.py +50 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/config.py +333 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/depend.py +198 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/env.py +147 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/export.py +52 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/graph.py +139 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/host.py +1053 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/order.py +171 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/point.py +95 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/ref.py +116 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/resolve.py +59 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/types.py +87 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/version.py +112 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/__init__.py +74 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/addr.py +116 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/aws.py +192 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/azuresecrets.py +120 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/boru.py +140 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/doppler.py +62 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/gcpsecrets.py +101 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/hashicorp.py +152 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/httpjson.py +115 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/infisical.py +92 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/onepassword.py +101 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/secretspec.py +119 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/sigv4.py +125 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/providers.py +211 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/sekreto.py +455 -0
- package/project/.sdk/tm/py/pkg/feature/secrets_feature.py +467 -0
- package/project/.sdk/tm/py/pkg/utility/prepare_method.py +5 -1
- package/project/.sdk/tm/py/pkg/utility/voxgig_struct/__init__.py +0 -2
- package/project/.sdk/tm/py/pkg/utility/voxgig_struct/voxgig_struct.py +780 -529
- package/project/.sdk/tm/py/src/feature/secrets/.gitkeep +0 -0
- package/project/.sdk/tm/py/test/feature/__init__.py +0 -0
- package/project/.sdk/tm/py/test/feature/secrets/__init__.py +0 -0
- package/project/.sdk/tm/py/test/feature/secrets/test_secrets.py +337 -0
- package/project/.sdk/tm/py/test/omni.py +415 -0
- package/project/.sdk/tm/py/test/test_omni_smoke.py +74 -0
- package/project/.sdk/tm/py/test/test_primary_utility.py +144 -668
- package/project/.sdk/tm/py/test/test_struct_utility.py +74 -27
- package/project/.sdk/tm/py/test/voxgig_omni/__init__.py +62 -0
- package/project/.sdk/tm/py/test/voxgig_omni/runner.py +566 -0
- package/project/.sdk/tm/py/test/voxgig_omni/util.py +237 -0
- package/project/.sdk/tm/rb/test/omni.rb +505 -0
- package/project/.sdk/tm/rb/test/omni_smoke_test.rb +72 -0
- package/project/.sdk/tm/rb/test/primary_utility_test.rb +174 -560
- package/project/.sdk/tm/rb/test/struct_utility_test.rb +13 -7
- package/project/.sdk/tm/rb/test/vendor/omni/runner.rb +493 -0
- package/project/.sdk/tm/rb/test/vendor/omni/util.rb +199 -0
- package/project/.sdk/tm/rb/test/vendor/omni/voxgig_omni.rb +15 -0
- package/project/.sdk/tm/rb/utility/prepare_method.rb +5 -1
- package/project/.sdk/tm/rust/tests/common/mod.rs +19 -242
- package/project/.sdk/tm/rust/tests/omni_resolver/mod.rs +888 -0
- package/project/.sdk/tm/rust/tests/omni_smoke_test.rs +286 -0
- package/project/.sdk/tm/rust/tests/primary_utility_test.rs +318 -312
- package/project/.sdk/tm/rust/tests/struct_utility_test.rs +66 -28
- package/project/.sdk/tm/rust/tests/vendor/omni/json.rs +412 -0
- package/project/.sdk/tm/rust/tests/vendor/omni/mod.rs +38 -0
- package/project/.sdk/tm/rust/tests/vendor/omni/regex.rs +392 -0
- package/project/.sdk/tm/rust/tests/vendor/omni/runner.rs +1001 -0
- package/project/.sdk/tm/rust/tests/vendor/omni/util.rs +161 -0
- package/project/.sdk/tm/rust/utility/prepare_method.rs +5 -1
- package/project/.sdk/tm/scala/Makefile +16 -6
- package/project/.sdk/tm/scala/sdktest/OmniResolver.scala +497 -0
- package/project/.sdk/tm/scala/sdktest/OmniSmoke.scala +192 -0
- package/project/.sdk/tm/scala/sdktest/PrimaryCorpus.scala +47 -19
- package/project/.sdk/tm/scala/sdktest/StructCorpus.scala +0 -0
- package/project/.sdk/tm/scala/sdktest/vendor/omni/Json.scala +229 -0
- package/project/.sdk/tm/scala/sdktest/vendor/omni/Runner.scala +552 -0
- package/project/.sdk/tm/scala/sdktest/vendor/omni/Util.scala +104 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/Constants.swift +10 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/Inject.swift +28 -5
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/Injection.swift +5 -1
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/Minor.swift +4 -1
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/Validate.swift +15 -5
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/utility/Prepare.swift +6 -1
- package/project/.sdk/tm/swift/Tests/ProjectNameSDKTests/OmniResolver.swift +474 -0
- package/project/.sdk/tm/swift/Tests/ProjectNameSDKTests/OmniSmokeTest.swift +107 -0
- package/project/.sdk/tm/swift/Tests/ProjectNameSDKTests/PrimaryUtilityTest.swift +141 -178
- package/project/.sdk/tm/swift/Tests/ProjectNameSDKTests/Runner.swift +17 -113
- package/project/.sdk/tm/swift/Tests/ProjectNameSDKTests/StructUtilityTest.swift +295 -446
- package/project/.sdk/tm/swift/Tests/vendor/omni/Json.swift +364 -0
- package/project/.sdk/tm/swift/Tests/vendor/omni/Runner.swift +730 -0
- package/project/.sdk/tm/swift/Tests/vendor/omni/Util.swift +162 -0
- package/project/.sdk/tm/ts/src/feature/secrets/SecretsFeature.ts +7 -0
- package/project/.sdk/tm/ts/src/feature/secrets/plugin/Capability.ts +148 -0
- package/project/.sdk/tm/ts/src/feature/secrets/plugin/Catalog.ts +55 -0
- package/project/.sdk/tm/ts/src/feature/secrets/plugin/Config.ts +344 -0
- package/project/.sdk/tm/ts/src/feature/secrets/plugin/Depend.ts +205 -0
- package/project/.sdk/tm/ts/src/feature/secrets/plugin/Env.ts +138 -0
- package/project/.sdk/tm/ts/src/feature/secrets/plugin/Export.ts +46 -0
- package/project/.sdk/tm/ts/src/feature/secrets/plugin/FeatureHost.ts +349 -0
- package/project/.sdk/tm/ts/src/feature/secrets/plugin/Graph.ts +181 -0
- package/project/.sdk/tm/ts/src/feature/secrets/plugin/Host.ts +1132 -0
- package/project/.sdk/tm/ts/src/feature/secrets/plugin/Order.ts +177 -0
- package/project/.sdk/tm/ts/src/feature/secrets/plugin/Point.ts +119 -0
- package/project/.sdk/tm/ts/src/feature/secrets/plugin/Ref.ts +102 -0
- package/project/.sdk/tm/ts/src/feature/secrets/plugin/Resolve.ts +61 -0
- package/project/.sdk/tm/ts/src/feature/secrets/plugin/Types.ts +112 -0
- package/project/.sdk/tm/ts/src/feature/secrets/plugin/Version.ts +100 -0
- package/project/.sdk/tm/ts/src/feature/secrets/plugin/index.ts +37 -0
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/Sekreto.ts +163 -30
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/index.ts +27 -22
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/{provider → plugins}/aws.ts +26 -36
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/{provider → plugins}/azuresecrets.ts +19 -21
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/{provider → plugins}/boru.ts +36 -17
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/{provider → plugins}/doppler.ts +14 -21
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/{provider → plugins}/gcpsecrets.ts +27 -27
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/{provider → plugins}/hashicorp.ts +25 -39
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/plugins/httpjson.ts +99 -0
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/{provider → plugins}/infisical.ts +14 -16
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/{provider → plugins}/onepassword.ts +15 -22
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/plugins/secretspec.ts +98 -0
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/{Sigv4.ts → plugins/sigv4.ts} +7 -6
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/addr.ts +97 -23
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/builtin.ts +37 -0
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/dotenv.ts +4 -17
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/env.ts +4 -16
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/file.ts +11 -25
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/memory.ts +6 -23
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/support.ts +106 -39
- package/project/.sdk/tm/ts/src/utility/StructUtility.ts +3 -3
- package/project/.sdk/tm/ts/test/omni.ts +104 -32
- package/project/.sdk/tm/ts/test/utility/StructUtility.test.ts +27 -0
- package/project/.sdk/tm/ts/test/vendor/omni/Runner.ts +32 -5
- package/project/.sdk/tm/ts/test/vendor/omni/Util.ts +2 -2
- package/project/.sdk/tm/ts/test/vendor/omni/index.ts +2 -2
- package/project/.sdk/tm/zig/test/primary_utility_test.zig +1 -1
- package/project/.sdk/tm/zig/test/struct_runner.zig +5 -4
- package/project/sdkgen-package.json +1 -1
- package/src/action/doctor.ts +66 -2
- package/src/helpers/naming.ts +4 -2
- package/project/.sdk/tm/c/tests/runner.h +0 -274
- package/project/.sdk/tm/cpp/test/struct_runner.hpp +0 -314
- package/project/.sdk/tm/csharp/test/StructRunner.cs +0 -276
- package/project/.sdk/tm/dart/test/runner.dart +0 -406
- package/project/.sdk/tm/dart/test/struct_corpus.dart +0 -531
- package/project/.sdk/tm/elixir/test/support/struct_corpus.ex +0 -1088
- package/project/.sdk/tm/go/test/runner_test.go +0 -629
- package/project/.sdk/tm/go/test/struct_runner_test.go +0 -1094
- package/project/.sdk/tm/java/test/StructRunner.java +0 -281
- package/project/.sdk/tm/js/test/runner.js +0 -387
- package/project/.sdk/tm/kotlin/test/StructRunner.kt +0 -177
- package/project/.sdk/tm/lua/test/struct_runner.lua +0 -602
- package/project/.sdk/tm/ocaml/test/corpus_runner.ml +0 -185
- package/project/.sdk/tm/perl/t/struct_runner.pm +0 -275
- package/project/.sdk/tm/php/test/StructRunner.php +0 -275
- package/project/.sdk/tm/py/test/struct_runner.py +0 -411
- package/project/.sdk/tm/rb/test/struct_runner.rb +0 -309
- package/project/.sdk/tm/rust/tests/struct_runner/mod.rs +0 -424
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/Registry.ts +0 -90
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/http.ts +0 -66
- package/project/.sdk/tm/ts/test/vendor/omni/compat.ts +0 -188
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
// VENDORED: @voxgig/plugin 0.1.6 (typescript/src/index.ts)
|
|
2
|
+
// Source: https://github.com/voxgig/plugin @ 8d8968afc0a2008fbd795b41ab166307d989f02a [tag: sdk-20260904-1610-0]
|
|
3
|
+
// License: MIT (c) voxgig - see repository LICENSE. Do not edit: resync from upstream.
|
|
4
|
+
/* The canonical surface `make parity` checks (AGENTS.md §4). Small on
|
|
5
|
+
* purpose (§19): everything else is methods on the host and instance
|
|
6
|
+
* types, because a library that grows a second public entry point per
|
|
7
|
+
* feature is a library twenty ports pay for twice. */
|
|
8
|
+
|
|
9
|
+
export { makehost } from './Host'
|
|
10
|
+
export { makecatalog } from './Catalog'
|
|
11
|
+
export { parseref, formatref, checkname, checktag, canonref, tryref } from './Ref'
|
|
12
|
+
export { normalizeconfig, resolveoptions, checkshape } from './Config'
|
|
13
|
+
export { resolveorder } from './Order'
|
|
14
|
+
export { resolvecandidates, resolvefrom } from './Resolve'
|
|
15
|
+
export { applyenv, encoderef } from './Env'
|
|
16
|
+
export { parserange, parseversion, satisfies } from './Version'
|
|
17
|
+
export { resolvecapability, matches } from './Capability'
|
|
18
|
+
export { resolvegraph } from './Graph'
|
|
19
|
+
export { emit, compose, provider } from './Point'
|
|
20
|
+
export { resolveexport } from './Export'
|
|
21
|
+
export {
|
|
22
|
+
REQUEST_POINT, SDK_HOOKS, STATION_HOOKS, featuredefinition, featurepoints,
|
|
23
|
+
} from './FeatureHost'
|
|
24
|
+
export type { FeatureClass } from './FeatureHost'
|
|
25
|
+
|
|
26
|
+
export { PluginError } from './Types'
|
|
27
|
+
export type { Ref, Status, Instance, OrderRef, OrderSpec, OrderBlock, Normalized } from './Types'
|
|
28
|
+
export type { Definition, Catalog } from './Catalog'
|
|
29
|
+
export type { Binding, Pin } from './Order'
|
|
30
|
+
export type { Host, HostOptions, PointSpec } from './Host'
|
|
31
|
+
export type { Source } from './Resolve'
|
|
32
|
+
export type { EnvInput, EnvResult } from './Env'
|
|
33
|
+
export type { Range } from './Version'
|
|
34
|
+
export type { Provided, Required, Candidate } from './Capability'
|
|
35
|
+
export type { Node, Blocked, Why, Resolution } from './Graph'
|
|
36
|
+
export type { Kind, Mode, Spec, Bound } from './Point'
|
|
37
|
+
export type { Exported } from './Export'
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
// VENDORED: @voxgig/sekreto 0.
|
|
2
|
-
// Source: https://github.com/voxgig/sekreto @
|
|
1
|
+
// VENDORED: @voxgig/sekreto 0.2.0 (typescript/src/Sekreto.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
|
// sekreto: one interface for secrets, wherever they live.
|
|
5
5
|
//
|
|
@@ -11,20 +11,31 @@
|
|
|
11
11
|
// This file is CANONICAL. Every other port is a translation of it, and
|
|
12
12
|
// spec/sekreto.json is the behavioural contract they all run.
|
|
13
13
|
|
|
14
|
-
//
|
|
15
|
-
//
|
|
16
|
-
//
|
|
17
|
-
//
|
|
18
|
-
//
|
|
19
|
-
|
|
20
|
-
|
|
14
|
+
// THE CORE IMPORTS NO PROVIDER THAT OPENS A SOCKET, SPAWNS A PROCESS OR
|
|
15
|
+
// SIGNS A REQUEST. The four built-in kinds - env, memory, dotenv, file -
|
|
16
|
+
// read at most a local file; every other kind is a voxgig/plugin
|
|
17
|
+
// definition under plugins/, and a chain may name one only if the
|
|
18
|
+
// calling project handed it in through `plugins`. That is what keeps an
|
|
19
|
+
// SDK whose chain is `[dotenv, env]` from carrying AWS request signing
|
|
20
|
+
// and seven HTTP vault clients. See docs/design/plugin-providers.md.
|
|
21
|
+
import { checktag, formatref, makecatalog, makehost } from '../plugin'
|
|
22
|
+
import type { Catalog, Definition, Host } from '../plugin'
|
|
23
|
+
|
|
24
|
+
import { ERROR_CODE, PROVIDER_EXPORT, Provider, ProviderSpec } from './provider/support'
|
|
25
|
+
import { BUILTINS, KINDS } from './provider/builtin'
|
|
21
26
|
|
|
22
27
|
/** A secret name: dot-separated lowercase segments, e.g. `api.token`. */
|
|
23
28
|
export type Name = string
|
|
24
29
|
|
|
25
30
|
export type SekretoOptions = {
|
|
26
|
-
/** The provider chain, in resolution order.
|
|
31
|
+
/** The provider chain, in resolution order. An entry is a live
|
|
32
|
+
* provider, or the declarative spec of one - `{ kind, ...config }`. */
|
|
27
33
|
providers?: (Provider | ProviderSpec)[]
|
|
34
|
+
/** The provider kinds beyond the built-ins that `providers` may name,
|
|
35
|
+
* as voxgig/plugin definitions. Static and explicit: the calling
|
|
36
|
+
* project imports the plugins it needs and passes them here, and a
|
|
37
|
+
* kind it did not pass is unknown to this Sekreto. */
|
|
38
|
+
plugins?: Definition[]
|
|
28
39
|
/** Cache resolved values (default: true). */
|
|
29
40
|
cache?: boolean
|
|
30
41
|
}
|
|
@@ -190,39 +201,76 @@ function unescape(text: string): string {
|
|
|
190
201
|
*
|
|
191
202
|
* Only values of four characters or more are replaced: shorter ones are
|
|
192
203
|
* too likely to appear in ordinary text, and redacting them would make
|
|
193
|
-
* logs unreadable without making them safer.
|
|
204
|
+
* logs unreadable without making them safer.
|
|
205
|
+
*
|
|
206
|
+
* Longest first, which is not a detail. Replacing in the order the
|
|
207
|
+
* values arrived meant a shorter secret that prefixes a longer one ate
|
|
208
|
+
* the prefix and left the rest in the log: with `db.pass` = `abcd` from
|
|
209
|
+
* the environment and `api.token` = `abcd1234` from the vault, and the
|
|
210
|
+
* environment resolved first, `token=abcd1234` came out as
|
|
211
|
+
* `token=[redacted]1234` — four characters of the vault token still
|
|
212
|
+
* there. Longest first makes the longer secret match before anything can
|
|
213
|
+
* eat its head. */
|
|
194
214
|
export function redact(text: string, values: string[]): string {
|
|
195
215
|
let out = 'string' === typeof text ? text : ''
|
|
196
216
|
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
217
|
+
const usable = (values || []).filter(
|
|
218
|
+
(value) => 'string' === typeof value && 4 <= value.length,
|
|
219
|
+
)
|
|
220
|
+
|
|
221
|
+
// A copy: `values` belongs to the caller (it is `seen` when called
|
|
222
|
+
// through Sekreto.redact), and sorting in place would reorder it.
|
|
223
|
+
for (const value of [...usable].sort((left, right) => right.length - left.length)) {
|
|
201
224
|
out = out.split(value).join('[redacted]')
|
|
202
225
|
}
|
|
203
226
|
|
|
204
227
|
return out
|
|
205
228
|
}
|
|
206
229
|
|
|
207
|
-
/** One provider in the chain, under the store name it answers to
|
|
208
|
-
|
|
230
|
+
/** One provider in the chain, under the store name it answers to, and
|
|
231
|
+
* the ref of the plugin instance that built it - '' for a live provider
|
|
232
|
+
* handed in directly, which no instance backs. */
|
|
233
|
+
type Entry = { store: string; ref: string; provider: Provider }
|
|
209
234
|
|
|
210
235
|
/** One resolved value. Kept as a list rather than a map so that the store
|
|
211
236
|
* a value came from stays attached, and so redaction order is stable. */
|
|
212
237
|
type Cached = { store: string; name: Name; value: string }
|
|
213
238
|
|
|
214
|
-
/** The store name a provider answers to
|
|
239
|
+
/** The store name a live provider answers to.
|
|
215
240
|
*
|
|
216
|
-
* `describe()` opens with the provider's kind - `
|
|
217
|
-
* plain `env` - so the kind is the natural default, and a
|
|
218
|
-
* gets a sensible name without having to implement
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
}
|
|
241
|
+
* `describe()` opens with the provider's kind - `hashicorp:...`,
|
|
242
|
+
* `dotenv:...`, plain `env` - so the kind is the natural default, and a
|
|
243
|
+
* custom provider gets a sensible name without having to implement
|
|
244
|
+
* anything extra. A spec'd provider's store is its `name` or its `kind`,
|
|
245
|
+
* decided before the provider exists. */
|
|
246
|
+
function storename(provider: Provider): string {
|
|
223
247
|
return provider.describe().split(':')[0]
|
|
224
248
|
}
|
|
225
249
|
|
|
250
|
+
/** The message for a kind the catalog does not hold.
|
|
251
|
+
*
|
|
252
|
+
* A kind sekreto has never heard of is a typo; a kind that exists as a
|
|
253
|
+
* plugin but was not passed in is the split working as designed and
|
|
254
|
+
* telling you what to pass. Collapsing the two was the first thing that
|
|
255
|
+
* made the split confusing to use. */
|
|
256
|
+
function unknownkind(kind: any, catalog: Catalog): string {
|
|
257
|
+
const known = -1 !== KINDS.plugin.indexOf(String(kind))
|
|
258
|
+
return (
|
|
259
|
+
'sekreto: unknown provider kind: ' + String(kind) +
|
|
260
|
+
' (available: ' + catalog.names().join(', ') + ')' +
|
|
261
|
+
(known ? ' - ' + String(kind) + ' is a sekreto plugin, not built in: pass it in the plugins option' : '')
|
|
262
|
+
)
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
/** A SekretoError that crossed the plugin boundary comes back out as
|
|
266
|
+
* itself, byte for byte. Anything else is not sekreto's to rewrite. */
|
|
267
|
+
function unwrap(err: any): any {
|
|
268
|
+
if (err && ERROR_CODE === err.code && err.details && 'string' === typeof err.details.cause) {
|
|
269
|
+
return new SekretoError(err.details.cause)
|
|
270
|
+
}
|
|
271
|
+
return err
|
|
272
|
+
}
|
|
273
|
+
|
|
226
274
|
/** The secrets facade: a chain of providers plus a cache.
|
|
227
275
|
*
|
|
228
276
|
* Two ways to read. `get` is transparent - it walks the chain and takes
|
|
@@ -231,6 +279,14 @@ function storename(provider: Provider, spec?: ProviderSpec): string {
|
|
|
231
279
|
* first for ordinary configuration, the second when *which* store holds a
|
|
232
280
|
* secret is part of what you mean. */
|
|
233
281
|
export class Sekreto {
|
|
282
|
+
/** The voxgig/plugin host every spec'd provider is an instance of.
|
|
283
|
+
* Read it for introspection - `host.list()` names each store's ref and
|
|
284
|
+
* status - and nothing on it advances the chain. */
|
|
285
|
+
readonly host: Host
|
|
286
|
+
/** The definitions this Sekreto can build: the built-ins plus what
|
|
287
|
+
* `plugins` handed in. */
|
|
288
|
+
readonly catalog: Catalog
|
|
289
|
+
|
|
234
290
|
private entries: Entry[]
|
|
235
291
|
private docache: boolean
|
|
236
292
|
private cache: Cached[]
|
|
@@ -242,15 +298,19 @@ export class Sekreto {
|
|
|
242
298
|
constructor(options?: SekretoOptions) {
|
|
243
299
|
const opts = options || {}
|
|
244
300
|
|
|
301
|
+
// Built-ins first, then the plugins, into one catalog: a plugin that
|
|
302
|
+
// names a built-in kind replaces it, which is how a host substitutes
|
|
303
|
+
// an implementation and never an accident, because the four names
|
|
304
|
+
// are documented.
|
|
305
|
+
this.catalog = makecatalog(BUILTINS.concat(opts.plugins || []))
|
|
306
|
+
this.host = makehost({ catalog: this.catalog })
|
|
307
|
+
|
|
245
308
|
this.entries = (opts.providers || []).map((entry) => {
|
|
246
309
|
if ('function' === typeof (entry as Provider).lookup) {
|
|
247
310
|
const provider = entry as Provider
|
|
248
|
-
return { store: storename(provider), provider }
|
|
311
|
+
return { store: storename(provider), ref: '', provider }
|
|
249
312
|
}
|
|
250
|
-
|
|
251
|
-
const spec = entry as ProviderSpec
|
|
252
|
-
const provider = makeprovider(spec)
|
|
253
|
-
return { store: storename(provider, spec), provider }
|
|
313
|
+
return this.declare(entry as ProviderSpec)
|
|
254
314
|
})
|
|
255
315
|
|
|
256
316
|
this.docache = false === opts.cache ? false : true
|
|
@@ -258,6 +318,45 @@ export class Sekreto {
|
|
|
258
318
|
this.seen = []
|
|
259
319
|
}
|
|
260
320
|
|
|
321
|
+
/** One chain entry, as a plugin instance.
|
|
322
|
+
*
|
|
323
|
+
* The instance is `kind` for a store named after its kind and
|
|
324
|
+
* `kind$store` otherwise - `hashicorp$prod` - so `host.list()` reads
|
|
325
|
+
* like the chain. A store name that is already taken gets a numbered
|
|
326
|
+
* tag from the host instead, because two providers MAY share a store
|
|
327
|
+
* name (a directed read walks both) and an instance ref may not. */
|
|
328
|
+
private declare(spec: ProviderSpec): Entry {
|
|
329
|
+
const kind = null == spec ? undefined : spec.kind
|
|
330
|
+
|
|
331
|
+
if (undefined === kind || !this.catalog.has(kind)) {
|
|
332
|
+
throw new SekretoError(unknownkind(kind, this.catalog))
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
const store = spec.name || kind
|
|
336
|
+
|
|
337
|
+
if (!checktag(store)) {
|
|
338
|
+
throw new SekretoError('sekreto: invalid store name: ' + store)
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
let ref = store === kind ? kind : formatref(kind, store)
|
|
342
|
+
if (undefined !== this.host.instance(ref)) {
|
|
343
|
+
ref = this.host.autotag(kind)
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
try {
|
|
347
|
+
// `load` runs the definition's `define`, which builds the provider
|
|
348
|
+
// from the spec; `activate` takes the instance live. Nothing is
|
|
349
|
+
// contacted by either: a provider opens nothing until its first
|
|
350
|
+
// lookup.
|
|
351
|
+
this.host.load(ref, { options: spec })
|
|
352
|
+
this.host.activate(ref)
|
|
353
|
+
} catch (err: any) {
|
|
354
|
+
throw unwrap(err)
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
return { store, ref, provider: this.host.exports(ref + '/' + PROVIDER_EXPORT) as Provider }
|
|
358
|
+
}
|
|
359
|
+
|
|
261
360
|
/** The secret, or a SekretoError if no provider has it. */
|
|
262
361
|
async get(name: Name): Promise<string> {
|
|
263
362
|
const found = await this.try(name)
|
|
@@ -348,6 +447,29 @@ export class Sekreto {
|
|
|
348
447
|
return out
|
|
349
448
|
}
|
|
350
449
|
|
|
450
|
+
/** What a Sekreto shows of itself when something prints it.
|
|
451
|
+
*
|
|
452
|
+
* `console.log(sekreto)` and `JSON.stringify(sekreto)` both reach
|
|
453
|
+
* `cache` and `seen`, which between them hold every value this chain
|
|
454
|
+
* has ever resolved — so one ordinary logging call writes every secret
|
|
455
|
+
* to the log. `private` is a compile-time fiction: at run time the
|
|
456
|
+
* fields are ordinary and enumerable.
|
|
457
|
+
*
|
|
458
|
+
* `JSON.stringify` is the one that bites hardest, because a structured
|
|
459
|
+
* logger serialises its whole context object without anyone writing a
|
|
460
|
+
* line about secrets: `logger.info({ secrets: sekreto }, 'ready')`.
|
|
461
|
+
*
|
|
462
|
+
* Both hooks are needed. `toJSON` covers `JSON.stringify` and
|
|
463
|
+
* everything built on it; the inspect symbol covers `console.log`,
|
|
464
|
+
* `util.inspect` and the REPL. Neither reaches a value. */
|
|
465
|
+
toJSON(): object {
|
|
466
|
+
return { stores: this.stores() }
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
[Symbol.for('nodejs.util.inspect.custom')](): string {
|
|
470
|
+
return 'Sekreto { stores: [ ' + this.stores().join(', ') + ' ] }'
|
|
471
|
+
}
|
|
472
|
+
|
|
351
473
|
/** A description of each provider, in resolution order. */
|
|
352
474
|
sources(): string[] {
|
|
353
475
|
return this.entries.map((entry) => entry.provider.describe())
|
|
@@ -379,6 +501,17 @@ export class Sekreto {
|
|
|
379
501
|
refresh(): void {
|
|
380
502
|
this.cache = []
|
|
381
503
|
}
|
|
504
|
+
|
|
505
|
+
/** Tear the chain down: every plugin instance is deactivated and
|
|
506
|
+
* unloaded, in reverse, releasing whatever a provider acquired at
|
|
507
|
+
* activation. Afterwards there is nothing to read from - `get` reports
|
|
508
|
+
* every secret unknown - and the cache is dropped, though `redact`
|
|
509
|
+
* still knows every value that was ever resolved. */
|
|
510
|
+
close(): void {
|
|
511
|
+
this.host.close()
|
|
512
|
+
this.entries = []
|
|
513
|
+
this.cache = []
|
|
514
|
+
}
|
|
382
515
|
}
|
|
383
516
|
|
|
384
517
|
/** Make a Sekreto from options. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
// VENDORED: @voxgig/sekreto 0.
|
|
2
|
-
// Source: https://github.com/voxgig/sekreto @
|
|
1
|
+
// VENDORED: @voxgig/sekreto 0.2.0 (typescript/src/index.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
|
// @voxgig/sekreto - one interface for secrets, wherever they live.
|
|
5
5
|
|
|
@@ -18,34 +18,39 @@ export {
|
|
|
18
18
|
|
|
19
19
|
export type { Name, SekretoOptions } from './Sekreto'
|
|
20
20
|
|
|
21
|
-
// THE CORE SURFACE
|
|
22
|
-
//
|
|
23
|
-
// file would make all of them reachable and put AWS request signing in
|
|
24
|
-
// every build, which is the thing the split removes.
|
|
21
|
+
// THE CORE SURFACE: the chain, the four built-in provider kinds, and the
|
|
22
|
+
// means of adding a fifth.
|
|
25
23
|
//
|
|
26
|
-
//
|
|
27
|
-
//
|
|
24
|
+
// The built-ins are the kinds that read at most a local file - env,
|
|
25
|
+
// memory, dotenv, file. Everything that opens a socket, spawns a process
|
|
26
|
+
// or signs a request is a PLUGIN, is not reachable from this file, and
|
|
27
|
+
// is handed to `Sekreto` by the calling project:
|
|
28
28
|
//
|
|
29
|
-
//
|
|
29
|
+
// import { Sekreto } from '@voxgig/sekreto'
|
|
30
|
+
// import { hashicorp } from '@voxgig/sekreto/plugins/hashicorp'
|
|
30
31
|
//
|
|
31
|
-
//
|
|
32
|
+
// const secrets = new Sekreto({
|
|
33
|
+
// plugins: [hashicorp],
|
|
34
|
+
// providers: [{ kind: 'env' }, { kind: 'hashicorp', addr, token }],
|
|
35
|
+
// })
|
|
32
36
|
//
|
|
33
|
-
// or, for
|
|
34
|
-
//
|
|
37
|
+
// or, for every kind at once, `allplugins` from '@voxgig/sekreto/plugins'.
|
|
38
|
+
// Re-exporting a plugin here would put AWS request signing in every
|
|
39
|
+
// build again, which is the thing the split removes. See
|
|
40
|
+
// docs/design/plugin-providers.md.
|
|
35
41
|
export { envprovider } from './provider/env'
|
|
36
42
|
export { memoryprovider } from './provider/memory'
|
|
43
|
+
export { dotenvprovider } from './provider/dotenv'
|
|
44
|
+
export { fileprovider } from './provider/file'
|
|
45
|
+
export { BUILTINS, KINDS } from './provider/builtin'
|
|
46
|
+
|
|
47
|
+
// How a provider kind becomes a plugin definition - the one call a
|
|
48
|
+
// custom kind needs.
|
|
49
|
+
export { providerplugin, PROVIDER_EXPORT, ERROR_CODE } from './provider/support'
|
|
37
50
|
|
|
38
51
|
// A pure validator, no platform dependency - kept on the core surface
|
|
39
52
|
// because callers validate an address before configuring a provider.
|
|
40
|
-
export { checkaddr } from './provider/addr'
|
|
41
|
-
|
|
42
|
-
export { makeprovider, register, registered, kinds } from './provider/Registry'
|
|
43
|
-
export type { ProviderDefinition } from './provider/Registry'
|
|
53
|
+
export { checkaddr, safeaddr } from './provider/addr'
|
|
44
54
|
|
|
45
55
|
export type { Provider, ProviderSpec } from './provider/support'
|
|
46
|
-
|
|
47
|
-
// `sigv4` is NOT on the core surface: it is the node:crypto edge, and
|
|
48
|
-
// only the two aws providers use it. Import it from the module that
|
|
49
|
-
// needs it - `@voxgig/sekreto/provider/aws` - or from the full-set
|
|
50
|
-
// barrel. Re-exporting it here would put request signing in every
|
|
51
|
-
// build again, which is the thing the split removes.
|
|
56
|
+
export type { Definition } from '../plugin'
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
// VENDORED: @voxgig/sekreto 0.
|
|
2
|
-
// Source: https://github.com/voxgig/sekreto @
|
|
1
|
+
// VENDORED: @voxgig/sekreto 0.2.0 (typescript/plugins/aws.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
6
|
import {
|
|
7
|
-
ProviderSpec, Provider, SekretoError, awsparam,
|
|
8
|
-
} from '
|
|
9
|
-
import { checkaddr } from '
|
|
10
|
-
import { sigv4 } from '
|
|
11
|
-
import { fetchjson } from './
|
|
7
|
+
ProviderSpec, Provider, SekretoError, awsparam, providerplugin, vaultref, unbase64,
|
|
8
|
+
} from '../provider/support'
|
|
9
|
+
import { checkaddr } from '../provider/addr'
|
|
10
|
+
import { sigv4 } from './sigv4'
|
|
11
|
+
import { fetchjson } from './httpjson'
|
|
12
12
|
|
|
13
|
+
/** The `YYYYMMDDTHHMMSSZ` timestamp SigV4 wants, for now. */
|
|
13
14
|
function awsnow(): string {
|
|
14
15
|
return new Date()
|
|
15
16
|
.toISOString()
|
|
@@ -133,7 +134,11 @@ export function awssecretsprovider(options?: Awsopts): Provider {
|
|
|
133
134
|
// `value` field can mean "the bytes themselves".
|
|
134
135
|
const bin = res.body && res.body.SecretBinary
|
|
135
136
|
if ('string' === typeof bin && 'value' === ref.field) {
|
|
136
|
-
|
|
137
|
+
const decoded = unbase64(bin)
|
|
138
|
+
if (undefined === decoded) {
|
|
139
|
+
throw new SekretoError('sekreto: aws secretsmanager: undecodable secret')
|
|
140
|
+
}
|
|
141
|
+
return decoded
|
|
137
142
|
}
|
|
138
143
|
return undefined
|
|
139
144
|
}
|
|
@@ -189,31 +194,16 @@ export function awsparamsprovider(options?: Awsopts): Provider {
|
|
|
189
194
|
}
|
|
190
195
|
}
|
|
191
196
|
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
*
|
|
195
|
-
*
|
|
196
|
-
*
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
// Registering at import is what makes this module's presence the only
|
|
206
|
-
// thing that decides whether the kind exists in a build.
|
|
207
|
-
import { register } from './Registry'
|
|
208
|
-
|
|
209
|
-
register({
|
|
210
|
-
name: 'awssecrets',
|
|
211
|
-
needs: ['fetch', 'crypto'],
|
|
212
|
-
define: (spec: ProviderSpec) => awssecretsprovider(spec),
|
|
213
|
-
})
|
|
214
|
-
|
|
215
|
-
register({
|
|
216
|
-
name: 'awsparams',
|
|
217
|
-
needs: ['fetch', 'crypto'],
|
|
218
|
-
define: (spec: ProviderSpec) => awsparamsprovider(spec),
|
|
219
|
-
})
|
|
197
|
+
|
|
198
|
+
/** The two plugins. Both need HTTPS and HMAC-SHA256 - the one crypto
|
|
199
|
+
* dependency in the library, which is why this is a plugin rather than
|
|
200
|
+
* a built-in: `sigv4` is exported from here and from nowhere in the
|
|
201
|
+
* core. */
|
|
202
|
+
export const awssecrets = providerplugin('awssecrets', (spec: ProviderSpec) =>
|
|
203
|
+
awssecretsprovider(spec))
|
|
204
|
+
|
|
205
|
+
export const awsparams = providerplugin('awsparams', (spec: ProviderSpec) =>
|
|
206
|
+
awsparamsprovider(spec))
|
|
207
|
+
|
|
208
|
+
export { sigv4 }
|
|
209
|
+
export type { Sigv4Input, Sigv4Output } from './sigv4'
|
|
@@ -1,12 +1,23 @@
|
|
|
1
|
-
// VENDORED: @voxgig/sekreto 0.
|
|
2
|
-
// Source: https://github.com/voxgig/sekreto @
|
|
1
|
+
// VENDORED: @voxgig/sekreto 0.2.0 (typescript/plugins/azuresecrets.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 { ProviderSpec, Provider, SekretoError, flatname } from '
|
|
7
|
-
import { checkaddr } from '
|
|
8
|
-
import { fetchjson } from './
|
|
6
|
+
import { ProviderSpec, Provider, SekretoError, flatname, providerplugin } from '../provider/support'
|
|
7
|
+
import { checkaddr } from '../provider/addr'
|
|
8
|
+
import { fetchjson } from './httpjson'
|
|
9
9
|
|
|
10
|
+
/** Azure Key Vault.
|
|
11
|
+
*
|
|
12
|
+
* `api.token` reads secret `api-token` (dots flattened to `-`; Key
|
|
13
|
+
* Vault names allow nothing else), current version. The token comes
|
|
14
|
+
* from config, then a client-credentials login when tenant/clientid/
|
|
15
|
+
* clientsecret are given, then the IMDS managed-identity endpoint - so
|
|
16
|
+
* on Azure's own platform no credential configuration is needed.
|
|
17
|
+
*
|
|
18
|
+
* As with GCP, the IMDS call is plain http to a link-local host by
|
|
19
|
+
* platform design and carries no credential; the login and vault
|
|
20
|
+
* addresses are `checkaddr`-guarded. */
|
|
10
21
|
export function azuresecretsprovider(options?: {
|
|
11
22
|
vault?: string
|
|
12
23
|
token?: string
|
|
@@ -125,20 +136,7 @@ export function azuresecretsprovider(options?: {
|
|
|
125
136
|
}
|
|
126
137
|
}
|
|
127
138
|
|
|
128
|
-
/** 1Password, through a Connect server.
|
|
129
|
-
*
|
|
130
|
-
* The item titled `api.token` (titles keep their dots), in the named
|
|
131
|
-
* vault. The value is the field with purpose PASSWORD, or the field
|
|
132
|
-
* labelled `value`. A vault that cannot be found is an error - config
|
|
133
|
-
* names it, so its absence is a broken store, not a missing secret. */
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
// Registering at import is what makes this module's presence the only
|
|
137
|
-
// thing that decides whether the kind exists in a build.
|
|
138
|
-
import { register } from './Registry'
|
|
139
139
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
define: (spec: ProviderSpec) => azuresecretsprovider(spec),
|
|
144
|
-
})
|
|
140
|
+
/** The plugin. Needs HTTPS. */
|
|
141
|
+
export const azuresecrets = providerplugin('azuresecrets', (spec: ProviderSpec) =>
|
|
142
|
+
azuresecretsprovider(spec))
|
|
@@ -1,12 +1,38 @@
|
|
|
1
|
-
// VENDORED: @voxgig/sekreto 0.
|
|
2
|
-
// Source: https://github.com/voxgig/sekreto @
|
|
1
|
+
// VENDORED: @voxgig/sekreto 0.2.0 (typescript/plugins/boru.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
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
import {
|
|
7
|
+
ProviderSpec, Provider, SekretoError, checkname, nodemod, providerplugin,
|
|
8
|
+
} from '../provider/support'
|
|
9
|
+
import { checkaddr } from '../provider/addr'
|
|
10
|
+
import { fetchjson } from './httpjson'
|
|
11
|
+
|
|
12
|
+
/** A boru vault (https://github.com/boru-lang/boru).
|
|
13
|
+
*
|
|
14
|
+
* Two ways in, both boru's own.
|
|
15
|
+
*
|
|
16
|
+
* With no `addr`, the CLI: `boru vault get --reveal <alias>` prints the
|
|
17
|
+
* secret on stdout and nothing else. The passphrase is read by boru
|
|
18
|
+
* itself from `BORU_VAULT_PASSPHRASE`; sekreto never accepts it as
|
|
19
|
+
* config and never puts it on a command line, where it would show up in
|
|
20
|
+
* the process table.
|
|
21
|
+
*
|
|
22
|
+
* With an `addr`, boru's wire protocol: `boru vault serve` publishes a
|
|
23
|
+
* read-only, HashiCorp-shaped provision API (boru's
|
|
24
|
+
* design/VAULT-WIRE-PROTOCOL.0.md), authenticated by a capability token
|
|
25
|
+
* from `boru vault grant`. A sekreto name is already a valid boru
|
|
26
|
+
* alias, and boru aliases keep their dots, so `api.token` is the single
|
|
27
|
+
* path segment `api.token` - not the `api`/`token` split a HashiCorp KV
|
|
28
|
+
* gets. The value is the `value` field. A 404 is a miss; anything else
|
|
29
|
+
* the server refuses (a revoked capability, a sealed vault) is an
|
|
30
|
+
* error.
|
|
31
|
+
*
|
|
32
|
+
* boru's `vault proxy` and `vault mcp` remain out of bounds: they are a
|
|
33
|
+
* credential *broker*, built precisely so the caller never receives the
|
|
34
|
+
* credential. `vault serve` is the provision endpoint, built to hand
|
|
35
|
+
* the value back - that is the one sekreto uses. */
|
|
10
36
|
export function boruprovider(options?: {
|
|
11
37
|
command?: string
|
|
12
38
|
namespace?: string
|
|
@@ -92,17 +118,10 @@ function borumiss(why: string): boolean {
|
|
|
92
118
|
return /no alias named/.test(why)
|
|
93
119
|
}
|
|
94
120
|
|
|
95
|
-
/** The `YYYYMMDDTHHMMSSZ` timestamp SigV4 wants, for now. */
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
// Registering at import is what makes this module's presence the only
|
|
99
|
-
// thing that decides whether the kind exists in a build.
|
|
100
|
-
import { register } from './Registry'
|
|
101
121
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
define: (spec: ProviderSpec) => boruprovider({
|
|
122
|
+
/** The plugin. Needs a child process (CLI mode) or HTTPS (wire mode). */
|
|
123
|
+
export const boru = providerplugin('boru', (spec: ProviderSpec) =>
|
|
124
|
+
boruprovider({
|
|
106
125
|
command: spec.command,
|
|
107
126
|
namespace: spec.namespace,
|
|
108
127
|
home: spec.home,
|
|
@@ -110,4 +129,4 @@ register({
|
|
|
110
129
|
token: spec.token,
|
|
111
130
|
mount: spec.mount,
|
|
112
131
|
}),
|
|
113
|
-
|
|
132
|
+
)
|
|
@@ -1,12 +1,18 @@
|
|
|
1
|
-
// VENDORED: @voxgig/sekreto 0.
|
|
2
|
-
// Source: https://github.com/voxgig/sekreto @
|
|
1
|
+
// VENDORED: @voxgig/sekreto 0.2.0 (typescript/plugins/doppler.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 { ProviderSpec, Provider, SekretoError, envkey } from '
|
|
7
|
-
import { checkaddr } from '
|
|
8
|
-
import { fetchjson } from './
|
|
6
|
+
import { ProviderSpec, Provider, SekretoError, envkey, providerplugin } from '../provider/support'
|
|
7
|
+
import { checkaddr } from '../provider/addr'
|
|
8
|
+
import { fetchjson } from './httpjson'
|
|
9
9
|
|
|
10
|
+
/** Doppler.
|
|
11
|
+
*
|
|
12
|
+
* The whole config is downloaded once - Doppler's own bulk endpoint -
|
|
13
|
+
* and answered from memory, like a remote .env: `api.token` is the
|
|
14
|
+
* `API_TOKEN` entry. A service token is config-scoped, so project and
|
|
15
|
+
* config are only needed with broader tokens. */
|
|
10
16
|
export function dopplerprovider(options?: {
|
|
11
17
|
token?: string
|
|
12
18
|
project?: string
|
|
@@ -58,20 +64,7 @@ export function dopplerprovider(options?: {
|
|
|
58
64
|
}
|
|
59
65
|
}
|
|
60
66
|
|
|
61
|
-
/** Infisical.
|
|
62
|
-
*
|
|
63
|
-
* `api.token` reads the secret keyed `API_TOKEN` (Infisical's own
|
|
64
|
-
* convention is environment-style keys) at a secret path in one
|
|
65
|
-
* environment of a project. Auth is a token, or a universal-auth
|
|
66
|
-
* (machine identity) login with clientid/clientsecret. */
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
// Registering at import is what makes this module's presence the only
|
|
70
|
-
// thing that decides whether the kind exists in a build.
|
|
71
|
-
import { register } from './Registry'
|
|
72
67
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
define: (spec: ProviderSpec) => dopplerprovider(spec),
|
|
77
|
-
})
|
|
68
|
+
/** The plugin. Needs HTTPS. */
|
|
69
|
+
export const doppler = providerplugin('doppler', (spec: ProviderSpec) =>
|
|
70
|
+
dopplerprovider(spec))
|