@voxgig/sdkgen 4.10.0 → 4.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/voxgig-sdkgen +1 -1
- package/package.json +1 -1
- package/project/.sdk/model/feature/secrets.aon +330 -0
- package/project/.sdk/model/target/c.aon +15 -2
- package/project/.sdk/model/target/cpp.aon +18 -0
- package/project/.sdk/model/target/lua.aon +17 -0
- package/project/.sdk/model/target/ocaml.aon +48 -5
- package/project/.sdk/model/target/zig.aon +30 -4
- package/project/.sdk/src/cmp/c/Config_c.ts +338 -1
- package/project/.sdk/src/cmp/c/Main_c.ts +57 -2
- package/project/.sdk/src/cmp/c/Package_c.ts +12 -2
- package/project/.sdk/src/cmp/cpp/Config_cpp.ts +324 -2
- package/project/.sdk/src/cmp/cpp/Gitignore_cpp.ts +2 -0
- package/project/.sdk/src/cmp/cpp/Main_cpp.ts +62 -4
- package/project/.sdk/src/cmp/cpp/Package_cpp.ts +10 -0
- package/project/.sdk/src/cmp/lua/Config_lua.ts +88 -0
- package/project/.sdk/src/cmp/lua/Gitignore_lua.ts +4 -0
- package/project/.sdk/src/cmp/lua/Main_lua.ts +93 -3
- package/project/.sdk/src/cmp/lua/Package_lua.ts +60 -0
- package/project/.sdk/src/cmp/lua/fragment/Main.fragment.lua +10 -0
- package/project/.sdk/src/cmp/ocaml/Config_ocaml.ts +183 -5
- package/project/.sdk/src/cmp/ocaml/Main_ocaml.ts +160 -3
- package/project/.sdk/src/cmp/ocaml/Package_ocaml.ts +25 -1
- package/project/.sdk/src/cmp/zig/Config_zig.ts +130 -9
- package/project/.sdk/src/cmp/zig/Main_zig.ts +208 -4
- package/project/.sdk/{tm/zig/build.zig → src/cmp/zig/fragment/Build.fragment.zig} +7 -0
- package/project/.sdk/src/cmp/zig/fragment/Main.fragment.zig +25 -0
- package/project/.sdk/{tm/zig/root.zig → src/cmp/zig/fragment/Root.fragment.zig} +9 -0
- package/project/.sdk/tm/c/Makefile +58 -9
- package/project/.sdk/tm/c/core/sdk.h +10 -0
- package/project/.sdk/tm/c/feature/secrets/plugin/capability.c +133 -0
- package/project/.sdk/tm/c/feature/secrets/plugin/capability.h +39 -0
- package/project/.sdk/tm/c/feature/secrets/plugin/catalog.c +83 -0
- package/project/.sdk/tm/c/feature/secrets/plugin/catalog.h +48 -0
- package/project/.sdk/tm/c/feature/secrets/plugin/config.c +413 -0
- package/project/.sdk/tm/c/feature/secrets/plugin/config.h +24 -0
- package/project/.sdk/tm/c/feature/secrets/plugin/depend.c +264 -0
- package/project/.sdk/tm/c/feature/secrets/plugin/depend.h +29 -0
- package/project/.sdk/tm/c/feature/secrets/plugin/env.c +220 -0
- package/project/.sdk/tm/c/feature/secrets/plugin/env.h +19 -0
- package/project/.sdk/tm/c/feature/secrets/plugin/export.c +97 -0
- package/project/.sdk/tm/c/feature/secrets/plugin/export.h +19 -0
- package/project/.sdk/tm/c/feature/secrets/plugin/graph.c +237 -0
- package/project/.sdk/tm/c/feature/secrets/plugin/graph.h +17 -0
- package/project/.sdk/tm/c/feature/secrets/plugin/host.c +1494 -0
- package/project/.sdk/tm/c/feature/secrets/plugin/host.h +135 -0
- package/project/.sdk/tm/c/feature/secrets/plugin/order.c +288 -0
- package/project/.sdk/tm/c/feature/secrets/plugin/order.h +18 -0
- package/project/.sdk/tm/c/feature/secrets/plugin/point.c +141 -0
- package/project/.sdk/tm/c/feature/secrets/plugin/point.h +80 -0
- package/project/.sdk/tm/c/feature/secrets/plugin/ref.c +170 -0
- package/project/.sdk/tm/c/feature/secrets/plugin/ref.h +52 -0
- package/project/.sdk/tm/c/feature/secrets/plugin/resolve.c +98 -0
- package/project/.sdk/tm/c/feature/secrets/plugin/resolve.h +18 -0
- package/project/.sdk/tm/c/feature/secrets/plugin/types.c +150 -0
- package/project/.sdk/tm/c/feature/secrets/plugin/types.h +104 -0
- package/project/.sdk/tm/c/feature/secrets/plugin/value.c +649 -0
- package/project/.sdk/tm/c/feature/secrets/plugin/value.h +135 -0
- package/project/.sdk/tm/c/feature/secrets/plugin/version.c +151 -0
- package/project/.sdk/tm/c/feature/secrets/plugin/version.h +34 -0
- package/project/.sdk/tm/c/feature/secrets/plugins/aws.c +281 -0
- package/project/.sdk/tm/c/feature/secrets/plugins/azuresecrets.c +207 -0
- package/project/.sdk/tm/c/feature/secrets/plugins/boru.c +164 -0
- package/project/.sdk/tm/c/feature/secrets/plugins/clock.c +75 -0
- package/project/.sdk/tm/c/feature/secrets/plugins/doppler.c +141 -0
- package/project/.sdk/tm/c/feature/secrets/plugins/encode.c +144 -0
- package/project/.sdk/tm/c/feature/secrets/plugins/gcpsecrets.c +177 -0
- package/project/.sdk/tm/c/feature/secrets/plugins/hashicorp.c +239 -0
- package/project/.sdk/tm/c/feature/secrets/plugins/httpjson.c +599 -0
- package/project/.sdk/tm/c/feature/secrets/plugins/infisical.c +165 -0
- package/project/.sdk/tm/c/feature/secrets/plugins/onepassword.c +194 -0
- package/project/.sdk/tm/c/feature/secrets/plugins/proc.c +233 -0
- package/project/.sdk/tm/c/feature/secrets/plugins/secretspec.c +125 -0
- package/project/.sdk/tm/c/feature/secrets/plugins/sekretoplugins.h +125 -0
- package/project/.sdk/tm/c/feature/secrets/plugins/sha256.c +270 -0
- package/project/.sdk/tm/c/feature/secrets/plugins/sigv4.c +382 -0
- package/project/.sdk/tm/c/feature/secrets/plugins/support.h +153 -0
- package/project/.sdk/tm/c/feature/secrets/plugins/tls.c +420 -0
- package/project/.sdk/tm/c/feature/secrets/sekreto/internal.h +86 -0
- package/project/.sdk/tm/c/feature/secrets/sekreto/json.c +721 -0
- package/project/.sdk/tm/c/feature/secrets/sekreto/providers.c +813 -0
- package/project/.sdk/tm/c/feature/secrets/sekreto/sekreto.c +944 -0
- package/project/.sdk/tm/c/feature/secrets/sekreto/sekreto.h +490 -0
- package/project/.sdk/tm/c/feature/secrets/sekreto/util.c +442 -0
- package/project/.sdk/tm/c/feature/secrets.c +797 -0
- package/project/.sdk/tm/c/feature/secrets.h +46 -0
- package/project/.sdk/tm/c/src/feature/secrets/.gitkeep +0 -0
- package/project/.sdk/tm/c/tests/feature/secrets/secrets_test.c +802 -0
- package/project/.sdk/tm/clojure/feature/secrets/sdk/feature/secrets.clj +38 -11
- package/project/.sdk/tm/clojure/test/sdk/test/feature/secrets.clj +40 -6
- package/project/.sdk/tm/cpp/Makefile +48 -4
- package/project/.sdk/tm/cpp/feature/secrets/plugin/capability.cpp +121 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugin/capability.hpp +41 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugin/catalog.cpp +60 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugin/catalog.hpp +66 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugin/config.cpp +376 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugin/config.hpp +29 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugin/depend.cpp +230 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugin/depend.hpp +31 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugin/env.cpp +205 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugin/env.hpp +25 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugin/export.cpp +84 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugin/export.hpp +24 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugin/graph.cpp +222 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugin/graph.hpp +21 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugin/host.cpp +1200 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugin/host.hpp +250 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugin/order.cpp +250 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugin/order.hpp +22 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugin/point.cpp +110 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugin/point.hpp +79 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugin/ref.cpp +136 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugin/ref.hpp +60 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugin/resolve.cpp +82 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugin/resolve.hpp +25 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugin/types.cpp +90 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugin/types.hpp +65 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugin/value.cpp +491 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugin/value.hpp +120 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugin/version.cpp +143 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugin/version.hpp +36 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Aws.cpp +248 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Aws.hpp +30 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Azuresecrets.cpp +149 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Azuresecrets.hpp +23 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Boru.cpp +117 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Boru.hpp +27 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Crypto.cpp +180 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Crypto.hpp +52 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Doppler.cpp +87 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Doppler.hpp +23 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Gcpsecrets.cpp +121 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Gcpsecrets.hpp +23 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Hashicorp.cpp +153 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Hashicorp.hpp +23 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Httpjson.cpp +666 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Httpjson.hpp +160 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Infisical.cpp +123 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Infisical.hpp +23 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Onepassword.cpp +125 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Onepassword.hpp +23 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Proc.cpp +223 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Proc.hpp +47 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Secretspec.cpp +104 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Secretspec.hpp +27 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Sigv4.cpp +242 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Sigv4.hpp +58 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Tls.cpp +260 -0
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Tls.hpp +47 -0
- package/project/.sdk/tm/cpp/feature/secrets/sekreto/Json.cpp +476 -0
- package/project/.sdk/tm/cpp/feature/secrets/sekreto/Json.hpp +89 -0
- package/project/.sdk/tm/cpp/feature/secrets/sekreto/Provider.cpp +312 -0
- package/project/.sdk/tm/cpp/feature/secrets/sekreto/Provider.hpp +263 -0
- package/project/.sdk/tm/cpp/feature/secrets/sekreto/Providers.cpp +354 -0
- package/project/.sdk/tm/cpp/feature/secrets/sekreto/Providers.hpp +111 -0
- package/project/.sdk/tm/cpp/feature/secrets/sekreto/Sekreto.cpp +613 -0
- package/project/.sdk/tm/cpp/feature/secrets/sekreto/Sekreto.hpp +227 -0
- package/project/.sdk/tm/cpp/feature/secrets.hpp +745 -0
- package/project/.sdk/tm/cpp/src/feature/secrets/.gitkeep +0 -0
- package/project/.sdk/tm/cpp/test/feature/secrets/secrets_test.cpp +808 -0
- package/project/.sdk/tm/csharp/feature/SecretsFeature.cs +34 -8
- package/project/.sdk/tm/csharp/test/feature/secrets/SecretsFeatureTest.cs +85 -0
- package/project/.sdk/tm/elixir/lib/projectname/feature/secrets.ex +17 -2
- package/project/.sdk/tm/elixir/test/feature/secrets/secrets_test.exs +41 -0
- package/project/.sdk/tm/go/feature/secrets_feature.go +32 -10
- package/project/.sdk/tm/go/test/feature/secrets/secrets_feature_test.go +116 -0
- package/project/.sdk/tm/java/feature/SecretsFeature.java +33 -8
- package/project/.sdk/tm/java/test/feature/secrets/SecretsFeatureTest.java +64 -0
- package/project/.sdk/tm/js/src/feature/secrets/SecretsFeature.js +34 -11
- package/project/.sdk/tm/js/test/feature/secrets/Secrets.test.js +73 -0
- package/project/.sdk/tm/kotlin/feature/SecretsFeature.kt +32 -7
- package/project/.sdk/tm/kotlin/test/feature/secrets/SecretsTest.kt +69 -0
- package/project/.sdk/tm/lua/Makefile +15 -4
- package/project/.sdk/tm/lua/feature/secrets/native/sekretonet.c +806 -0
- package/project/.sdk/tm/lua/feature/secrets/plugin/capability.lua +135 -0
- package/project/.sdk/tm/lua/feature/secrets/plugin/catalog.lua +63 -0
- package/project/.sdk/tm/lua/feature/secrets/plugin/config.lua +361 -0
- package/project/.sdk/tm/lua/feature/secrets/plugin/depend.lua +232 -0
- package/project/.sdk/tm/lua/feature/secrets/plugin/env.lua +168 -0
- package/project/.sdk/tm/lua/feature/secrets/plugin/export.lua +66 -0
- package/project/.sdk/tm/lua/feature/secrets/plugin/graph.lua +194 -0
- package/project/.sdk/tm/lua/feature/secrets/plugin/host.lua +1190 -0
- package/project/.sdk/tm/lua/feature/secrets/plugin/json.lua +169 -0
- package/project/.sdk/tm/lua/feature/secrets/plugin/order.lua +207 -0
- package/project/.sdk/tm/lua/feature/secrets/plugin/point.lua +106 -0
- package/project/.sdk/tm/lua/feature/secrets/plugin/ref.lua +115 -0
- package/project/.sdk/tm/lua/feature/secrets/plugin/resolve.lua +78 -0
- package/project/.sdk/tm/lua/feature/secrets/plugin/types.lua +275 -0
- package/project/.sdk/tm/lua/feature/secrets/plugin/version.lua +131 -0
- package/project/.sdk/tm/lua/feature/secrets/plugin.lua +76 -0
- package/project/.sdk/tm/lua/feature/secrets/sekreto/addr.lua +124 -0
- package/project/.sdk/tm/lua/feature/secrets/sekreto/err.lua +47 -0
- package/project/.sdk/tm/lua/feature/secrets/sekreto/name.lua +315 -0
- package/project/.sdk/tm/lua/feature/secrets/sekreto/plugins/aws.lua +228 -0
- package/project/.sdk/tm/lua/feature/secrets/sekreto/plugins/azuresecrets.lua +137 -0
- package/project/.sdk/tm/lua/feature/secrets/sekreto/plugins/boru.lua +124 -0
- package/project/.sdk/tm/lua/feature/secrets/sekreto/plugins/crypto.lua +212 -0
- package/project/.sdk/tm/lua/feature/secrets/sekreto/plugins/doppler.lua +89 -0
- package/project/.sdk/tm/lua/feature/secrets/sekreto/plugins/gcpsecrets.lua +129 -0
- package/project/.sdk/tm/lua/feature/secrets/sekreto/plugins/hashicorp.lua +154 -0
- package/project/.sdk/tm/lua/feature/secrets/sekreto/plugins/httpjson.lua +248 -0
- package/project/.sdk/tm/lua/feature/secrets/sekreto/plugins/infisical.lua +113 -0
- package/project/.sdk/tm/lua/feature/secrets/sekreto/plugins/json.lua +449 -0
- package/project/.sdk/tm/lua/feature/secrets/sekreto/plugins/net.lua +198 -0
- package/project/.sdk/tm/lua/feature/secrets/sekreto/plugins/onepassword.lua +126 -0
- package/project/.sdk/tm/lua/feature/secrets/sekreto/plugins/secretspec.lua +93 -0
- package/project/.sdk/tm/lua/feature/secrets/sekreto/plugins/sigv4.lua +269 -0
- package/project/.sdk/tm/lua/feature/secrets/sekreto/plugins/support.lua +146 -0
- package/project/.sdk/tm/lua/feature/secrets/sekreto/providers.lua +346 -0
- package/project/.sdk/tm/lua/feature/secrets/sekreto.lua +479 -0
- package/project/.sdk/tm/lua/feature/secrets_feature.lua +690 -0
- package/project/.sdk/tm/lua/src/feature/secrets/.gitkeep +0 -0
- package/project/.sdk/tm/lua/test/extend_test.lua +105 -0
- package/project/.sdk/tm/lua/test/feature/secrets/secrets_feature_test.lua +862 -0
- package/project/.sdk/tm/ocaml/Makefile +52 -8
- package/project/.sdk/tm/ocaml/feature/secrets/plugin/capability.ml +106 -0
- package/project/.sdk/tm/ocaml/feature/secrets/plugin/catalog.ml +43 -0
- package/project/.sdk/tm/ocaml/feature/secrets/plugin/config.ml +349 -0
- package/project/.sdk/tm/ocaml/feature/secrets/plugin/defs.ml +143 -0
- package/project/.sdk/tm/ocaml/feature/secrets/plugin/depend.ml +217 -0
- package/project/.sdk/tm/ocaml/feature/secrets/plugin/env.ml +197 -0
- package/project/.sdk/tm/ocaml/feature/secrets/plugin/export.ml +89 -0
- package/project/.sdk/tm/ocaml/feature/secrets/plugin/graph.ml +227 -0
- package/project/.sdk/tm/ocaml/feature/secrets/plugin/host.ml +1112 -0
- package/project/.sdk/tm/ocaml/feature/secrets/plugin/order.ml +202 -0
- package/project/.sdk/tm/ocaml/feature/secrets/plugin/point.ml +138 -0
- package/project/.sdk/tm/ocaml/feature/secrets/plugin/ref.ml +126 -0
- package/project/.sdk/tm/ocaml/feature/secrets/plugin/resolve.ml +62 -0
- package/project/.sdk/tm/ocaml/feature/secrets/plugin/types.ml +97 -0
- package/project/.sdk/tm/ocaml/feature/secrets/plugin/value.ml +387 -0
- package/project/.sdk/tm/ocaml/feature/secrets/plugin/version.ml +139 -0
- package/project/.sdk/tm/ocaml/feature/secrets/plugins/aws.ml +171 -0
- package/project/.sdk/tm/ocaml/feature/secrets/plugins/azuresecrets.ml +116 -0
- package/project/.sdk/tm/ocaml/feature/secrets/plugins/boru.ml +95 -0
- package/project/.sdk/tm/ocaml/feature/secrets/plugins/crypto.ml +149 -0
- package/project/.sdk/tm/ocaml/feature/secrets/plugins/doppler.ml +61 -0
- package/project/.sdk/tm/ocaml/feature/secrets/plugins/gcpsecrets.ml +93 -0
- package/project/.sdk/tm/ocaml/feature/secrets/plugins/hashicorp.ml +120 -0
- package/project/.sdk/tm/ocaml/feature/secrets/plugins/http.ml +421 -0
- package/project/.sdk/tm/ocaml/feature/secrets/plugins/httpjson.ml +66 -0
- package/project/.sdk/tm/ocaml/feature/secrets/plugins/infisical.ml +85 -0
- package/project/.sdk/tm/ocaml/feature/secrets/plugins/onepassword.ml +112 -0
- package/project/.sdk/tm/ocaml/feature/secrets/plugins/runcmd.ml +97 -0
- package/project/.sdk/tm/ocaml/feature/secrets/plugins/secretspec.ml +68 -0
- package/project/.sdk/tm/ocaml/feature/secrets/plugins/sigv4.ml +259 -0
- package/project/.sdk/tm/ocaml/feature/secrets/plugins/tls.ml +44 -0
- package/project/.sdk/tm/ocaml/feature/secrets/plugins/tls_stubs.c +358 -0
- package/project/.sdk/tm/ocaml/feature/secrets/sekreto/json.ml +376 -0
- package/project/.sdk/tm/ocaml/feature/secrets/sekreto/provider.ml +647 -0
- package/project/.sdk/tm/ocaml/feature/secrets/sekreto/secret.ml +299 -0
- package/project/.sdk/tm/ocaml/feature/secrets/sekreto/sekreto.ml +347 -0
- package/project/.sdk/tm/ocaml/feature/secrets_feature.ml +453 -0
- package/project/.sdk/tm/ocaml/src/feature/secrets/.gitkeep +0 -0
- package/project/.sdk/tm/ocaml/test/feature/secrets/t_secrets.ml +670 -0
- package/project/.sdk/tm/perl/feature/secrets_feature.pm +33 -12
- package/project/.sdk/tm/perl/t/feature/secrets/secrets.t +47 -0
- package/project/.sdk/tm/php/feature/SecretsFeature.php +30 -6
- package/project/.sdk/tm/php/test/feature/secrets/SecretsTest.php +98 -0
- package/project/.sdk/tm/py/pkg/feature/secrets_feature.py +28 -6
- package/project/.sdk/tm/py/test/feature/secrets/test_secrets.py +114 -0
- package/project/.sdk/tm/rb/feature/secrets_feature.rb +28 -6
- package/project/.sdk/tm/rb/test/feature/secrets/secrets_feature_test.rb +93 -0
- package/project/.sdk/tm/rust/feature/secrets.rs +33 -10
- package/project/.sdk/tm/rust/tests/feature/secrets/main.rs +96 -0
- package/project/.sdk/tm/scala/feature/SecretsFeature.scala +29 -7
- package/project/.sdk/tm/scala/sdktest/feature/secrets/SecretsTestMain.scala +71 -0
- package/project/.sdk/tm/ts/src/feature/secrets/SecretsFeature.ts +35 -12
- package/project/.sdk/tm/ts/test/feature/secrets/Secrets.test.ts +73 -0
- package/project/.sdk/tm/zig/feature/secrets/plugin/capability.zig +137 -0
- package/project/.sdk/tm/zig/feature/secrets/plugin/catalog.zig +90 -0
- package/project/.sdk/tm/zig/feature/secrets/plugin/config.zig +346 -0
- package/project/.sdk/tm/zig/feature/secrets/plugin/depend.zig +244 -0
- package/project/.sdk/tm/zig/feature/secrets/plugin/env.zig +201 -0
- package/project/.sdk/tm/zig/feature/secrets/plugin/export.zig +83 -0
- package/project/.sdk/tm/zig/feature/secrets/plugin/graph.zig +212 -0
- package/project/.sdk/tm/zig/feature/secrets/plugin/host.zig +1224 -0
- package/project/.sdk/tm/zig/feature/secrets/plugin/inst.zig +126 -0
- package/project/.sdk/tm/zig/feature/secrets/plugin/order.zig +228 -0
- package/project/.sdk/tm/zig/feature/secrets/plugin/plugin.zig +34 -0
- package/project/.sdk/tm/zig/feature/secrets/plugin/point.zig +166 -0
- package/project/.sdk/tm/zig/feature/secrets/plugin/ref.zig +147 -0
- package/project/.sdk/tm/zig/feature/secrets/plugin/resolve.zig +74 -0
- package/project/.sdk/tm/zig/feature/secrets/plugin/types.zig +140 -0
- package/project/.sdk/tm/zig/feature/secrets/plugin/value.zig +662 -0
- package/project/.sdk/tm/zig/feature/secrets/plugin/version.zig +139 -0
- package/project/.sdk/tm/zig/feature/secrets/plugins/aws.zig +294 -0
- package/project/.sdk/tm/zig/feature/secrets/plugins/azuresecrets.zig +222 -0
- package/project/.sdk/tm/zig/feature/secrets/plugins/boru.zig +188 -0
- package/project/.sdk/tm/zig/feature/secrets/plugins/doppler.zig +135 -0
- package/project/.sdk/tm/zig/feature/secrets/plugins/gcpsecrets.zig +170 -0
- package/project/.sdk/tm/zig/feature/secrets/plugins/hashicorp.zig +242 -0
- package/project/.sdk/tm/zig/feature/secrets/plugins/httpjson.zig +535 -0
- package/project/.sdk/tm/zig/feature/secrets/plugins/infisical.zig +167 -0
- package/project/.sdk/tm/zig/feature/secrets/plugins/onepassword.zig +202 -0
- package/project/.sdk/tm/zig/feature/secrets/plugins/secretspec.zig +160 -0
- package/project/.sdk/tm/zig/feature/secrets/plugins/sigv4.zig +336 -0
- package/project/.sdk/tm/zig/feature/secrets/sekreto/addr.zig +148 -0
- package/project/.sdk/tm/zig/feature/secrets/sekreto/builtins.zig +259 -0
- package/project/.sdk/tm/zig/feature/secrets/sekreto/provider.zig +440 -0
- package/project/.sdk/tm/zig/feature/secrets/sekreto/sekreto.zig +944 -0
- package/project/.sdk/tm/zig/feature/secrets.zig +854 -0
- package/project/.sdk/tm/zig/src/feature/secrets/.gitkeep +0 -0
- package/project/.sdk/tm/zig/test/feature/secrets/secrets_test.zig +891 -0
- package/project/sdkgen-package.json +1 -1
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
-- VENDORED: @voxgig/plugin sdk-20260908-1556-0 (lua/src/plugin/types.lua)
|
|
2
|
+
-- Source: https://github.com/voxgig/plugin @ 48392f5e2b6d1434ee9b1a4a9a11f4480aaeb46a [tag: sdk-20260908-1556-0]
|
|
3
|
+
-- License: MIT (c) voxgig - see repository LICENSE. Do not edit: resync from upstream.
|
|
4
|
+
-- Shared types and the value helpers every module reads data through.
|
|
5
|
+
--
|
|
6
|
+
-- Deliberately small: the design's section 19 budget says the library owns
|
|
7
|
+
-- naming, configuration, lifecycle, ordering, binding and teardown, and
|
|
8
|
+
-- nothing else.
|
|
9
|
+
--
|
|
10
|
+
-- LUA HAS ONE COMPOSITE TYPE AND NO NULL, and both are corpus-visible:
|
|
11
|
+
--
|
|
12
|
+
-- * A TABLE IS BOTH A MAP AND A LIST. `{}` is neither and both, so the
|
|
13
|
+
-- parser TAGS every table it builds with a metatable and this file
|
|
14
|
+
-- builds every table through `map()` or `list()`. An untagged table
|
|
15
|
+
-- would read as whichever the first test happened to ask about.
|
|
16
|
+
--
|
|
17
|
+
-- * `t[k] = nil` DELETES the key, so a JSON `null` cannot be stored as
|
|
18
|
+
-- one. `NULL` is a unique sentinel: `t[k] == nil` is ABSENT and
|
|
19
|
+
-- `t[k] == NULL` is a present null, which is exactly the distinction
|
|
20
|
+
-- `__UNDEF__` and `__NULL__` assert.
|
|
21
|
+
|
|
22
|
+
local M = {}
|
|
23
|
+
|
|
24
|
+
-- Section 5.1's seven statuses, and no more. A port that adds an eighth is
|
|
25
|
+
-- diverging. `loading` and `closing` are observable only from inside a
|
|
26
|
+
-- callback or from another thread.
|
|
27
|
+
M.STATUSES = { 'declared', 'loaded', 'pending', 'live', 'failed',
|
|
28
|
+
'loading', 'closing' }
|
|
29
|
+
|
|
30
|
+
-- Section 12's detail fields, IN THIS FIXED ORDER.
|
|
31
|
+
--
|
|
32
|
+
-- The order is part of the contract, not a formatting preference. An
|
|
33
|
+
-- earlier draft named six fields while other sections promised diagnostics
|
|
34
|
+
-- that had nowhere to go, which would have left each port inventing its
|
|
35
|
+
-- own order and breaking message parity.
|
|
36
|
+
M.DETAIL_ORDER = {
|
|
37
|
+
'host', 'ref', 'name', 'tag', 'point', 'key', 'capability',
|
|
38
|
+
'range', 'version', 'match', 'candidates', 'cycle', 'holders',
|
|
39
|
+
'refs', 'path', 'cause',
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
-- The present-null sentinel. A table rather than a string, so nothing a
|
|
43
|
+
-- document could contain can be mistaken for it.
|
|
44
|
+
M.NULL = setmetatable({}, { __tostring = function() return 'null' end })
|
|
45
|
+
|
|
46
|
+
M.MAP_MT = { __jsontype = 'map' }
|
|
47
|
+
M.LIST_MT = { __jsontype = 'list' }
|
|
48
|
+
|
|
49
|
+
function M.map(t)
|
|
50
|
+
return setmetatable(t or {}, M.MAP_MT)
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
function M.list(t)
|
|
54
|
+
return setmetatable(t or {}, M.LIST_MT)
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
function M.ismap(v)
|
|
58
|
+
return 'table' == type(v) and getmetatable(v) == M.MAP_MT
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
function M.islist(v)
|
|
62
|
+
return 'table' == type(v) and getmetatable(v) == M.LIST_MT
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
function M.isnull(v)
|
|
66
|
+
return v == M.NULL
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
-- Ruby's truthiness, which is not lua's: `nil` and `false` are false here
|
|
70
|
+
-- too, but a PRESENT NULL must also be false, and `0` and `''` must be
|
|
71
|
+
-- true (lua already agrees about those two).
|
|
72
|
+
function M.truthy(v)
|
|
73
|
+
return nil ~= v and false ~= v and M.NULL ~= v
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
-- The value at a key: nil when absent, NULL when present-and-null.
|
|
77
|
+
function M.get(t, k)
|
|
78
|
+
if not M.ismap(t) then return nil end
|
|
79
|
+
return t[k]
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
-- PRESENCE, which is what distinguishes an authored null from absence.
|
|
83
|
+
function M.has(t, k)
|
|
84
|
+
if not M.ismap(t) then return false end
|
|
85
|
+
return nil ~= t[k]
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
-- The value at a key with NULL flattened to nil, for the callers that
|
|
89
|
+
-- genuinely do not care which they got.
|
|
90
|
+
function M.getv(t, k)
|
|
91
|
+
local v = M.get(t, k)
|
|
92
|
+
if M.NULL == v then return nil end
|
|
93
|
+
return v
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
function M.at(l, i)
|
|
97
|
+
if not M.islist(l) then return nil end
|
|
98
|
+
return l[i]
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
function M.len(l)
|
|
102
|
+
if not M.islist(l) then return 0 end
|
|
103
|
+
return #l
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
-- The keys of a map, SORTED. `pairs` has no defined order in lua, so every
|
|
107
|
+
-- walk of a map in this port goes through here.
|
|
108
|
+
function M.keys(t)
|
|
109
|
+
local out = {}
|
|
110
|
+
if not M.ismap(t) then return out end
|
|
111
|
+
for k in pairs(t) do out[#out + 1] = k end
|
|
112
|
+
table.sort(out)
|
|
113
|
+
return out
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
function M.sortstrings(l)
|
|
117
|
+
local out = {}
|
|
118
|
+
for i = 1, #l do out[i] = l[i] end
|
|
119
|
+
table.sort(out)
|
|
120
|
+
return out
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
-- STABLE sort by a comparator. `table.sort` is NOT stable and the
|
|
124
|
+
-- canonical's comparators fall through to a `pos` or ref tie-break, so
|
|
125
|
+
-- every sort in this port decorates with the original index and uses it as
|
|
126
|
+
-- the last tier.
|
|
127
|
+
function M.stable_sort(l, less)
|
|
128
|
+
local decorated = {}
|
|
129
|
+
for i = 1, #l do decorated[i] = { item = l[i], at = i } end
|
|
130
|
+
table.sort(decorated, function(a, b)
|
|
131
|
+
if less(a.item, b.item) then return true end
|
|
132
|
+
if less(b.item, a.item) then return false end
|
|
133
|
+
return a.at < b.at
|
|
134
|
+
end)
|
|
135
|
+
local out = {}
|
|
136
|
+
for i = 1, #decorated do out[i] = decorated[i].item end
|
|
137
|
+
return out
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
function M.copy(v)
|
|
141
|
+
if M.islist(v) then
|
|
142
|
+
local out = {}
|
|
143
|
+
for i = 1, #v do out[i] = M.copy(v[i]) end
|
|
144
|
+
return M.list(out)
|
|
145
|
+
end
|
|
146
|
+
if M.ismap(v) then
|
|
147
|
+
local out = {}
|
|
148
|
+
for k, x in pairs(v) do out[k] = M.copy(x) end
|
|
149
|
+
return M.map(out)
|
|
150
|
+
end
|
|
151
|
+
return v
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
-- JSON equality: same type, then same value.
|
|
155
|
+
--
|
|
156
|
+
-- `true == 1` and `1 == '1'` are BOTH FALSE in lua, which is what
|
|
157
|
+
-- `capability/match` needs and what php, perl and lua were each expected
|
|
158
|
+
-- to get wrong. Lua gets it right for the same reason ruby does: no
|
|
159
|
+
-- coercion across types in `==`.
|
|
160
|
+
function M.same(a, b)
|
|
161
|
+
if M.ismap(a) or M.ismap(b) then
|
|
162
|
+
if not (M.ismap(a) and M.ismap(b)) then return false end
|
|
163
|
+
local ka, kb = M.keys(a), M.keys(b)
|
|
164
|
+
if #ka ~= #kb then return false end
|
|
165
|
+
for i = 1, #ka do
|
|
166
|
+
if ka[i] ~= kb[i] then return false end
|
|
167
|
+
if not M.same(a[ka[i]], b[ka[i]]) then return false end
|
|
168
|
+
end
|
|
169
|
+
return true
|
|
170
|
+
end
|
|
171
|
+
if M.islist(a) or M.islist(b) then
|
|
172
|
+
if not (M.islist(a) and M.islist(b)) then return false end
|
|
173
|
+
if #a ~= #b then return false end
|
|
174
|
+
for i = 1, #a do
|
|
175
|
+
if not M.same(a[i], b[i]) then return false end
|
|
176
|
+
end
|
|
177
|
+
return true
|
|
178
|
+
end
|
|
179
|
+
return a == b
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
-- The error type. Every error carries a section 12 code; ports compare by
|
|
183
|
+
-- CODE and never by message, because wording is a port's own business and
|
|
184
|
+
-- pinning the words would make every translation a corpus change.
|
|
185
|
+
local Error = {}
|
|
186
|
+
Error.__index = Error
|
|
187
|
+
Error.__tostring = function(e) return e.message end
|
|
188
|
+
M.Error = Error
|
|
189
|
+
|
|
190
|
+
-- `plugin/<code>: <text> [<key>=<value> ...]`
|
|
191
|
+
--
|
|
192
|
+
-- Values render as COMPACT JSON, so a value containing a space or a
|
|
193
|
+
-- bracket cannot break the parse, and a list renders as a JSON array. The
|
|
194
|
+
-- bracket is absent entirely when no field applies.
|
|
195
|
+
function M.formaterror(code, text, details)
|
|
196
|
+
local parts = {}
|
|
197
|
+
for _, k in ipairs(M.DETAIL_ORDER) do
|
|
198
|
+
if M.has(details, k) then
|
|
199
|
+
parts[#parts + 1] = k .. '=' .. M.encode(details[k])
|
|
200
|
+
end
|
|
201
|
+
end
|
|
202
|
+
local tail = 0 == #parts and '' or (' [' .. table.concat(parts, ' ') .. ']')
|
|
203
|
+
return 'plugin/' .. code .. ': ' .. text .. tail
|
|
204
|
+
end
|
|
205
|
+
|
|
206
|
+
function M.fail(code, text, details)
|
|
207
|
+
error(setmetatable({
|
|
208
|
+
code = code,
|
|
209
|
+
text = text,
|
|
210
|
+
details = details,
|
|
211
|
+
message = M.formaterror(code, text, details),
|
|
212
|
+
}, Error), 0)
|
|
213
|
+
end
|
|
214
|
+
|
|
215
|
+
-- The section 12 code of an error, or '' for one this library did not
|
|
216
|
+
-- raise. The corpus compares by code, so the driver needs one place that
|
|
217
|
+
-- knows how to read it.
|
|
218
|
+
function M.codeof(err)
|
|
219
|
+
if 'table' == type(err) and getmetatable(err) == Error then
|
|
220
|
+
return err.code
|
|
221
|
+
end
|
|
222
|
+
return ''
|
|
223
|
+
end
|
|
224
|
+
|
|
225
|
+
function M.message(err)
|
|
226
|
+
if 'table' == type(err) and getmetatable(err) == Error then
|
|
227
|
+
return err.message
|
|
228
|
+
end
|
|
229
|
+
return tostring(err)
|
|
230
|
+
end
|
|
231
|
+
|
|
232
|
+
-- A detail map, spelled once rather than at forty call sites.
|
|
233
|
+
function M.details(pairs_)
|
|
234
|
+
return M.map(pairs_)
|
|
235
|
+
end
|
|
236
|
+
|
|
237
|
+
-- Compact JSON. Set here rather than in json.lua so that `formaterror` -
|
|
238
|
+
-- which every module reaches - does not pull the parser in behind it.
|
|
239
|
+
function M.encode(v)
|
|
240
|
+
if nil == v or M.NULL == v then return 'null' end
|
|
241
|
+
local t = type(v)
|
|
242
|
+
if 'boolean' == t then return v and 'true' or 'false' end
|
|
243
|
+
if 'number' == t then
|
|
244
|
+
if math.type(v) == 'integer' then return tostring(v) end
|
|
245
|
+
-- An integral float prints without a fractional part, so a `pos` of 3
|
|
246
|
+
-- renders as `3` and not `3.0` - JSON has one number type and the
|
|
247
|
+
-- corpus writes them as it means them.
|
|
248
|
+
if v == math.floor(v) and math.abs(v) < 1e15 then
|
|
249
|
+
return string.format('%d', v)
|
|
250
|
+
end
|
|
251
|
+
return tostring(v)
|
|
252
|
+
end
|
|
253
|
+
if 'string' == t then
|
|
254
|
+
local out = v:gsub('[\\"]', '\\%0'):gsub('\n', '\\n'):gsub('\r', '\\r')
|
|
255
|
+
:gsub('\t', '\\t')
|
|
256
|
+
return '"' .. out .. '"'
|
|
257
|
+
end
|
|
258
|
+
if M.islist(v) then
|
|
259
|
+
local parts = {}
|
|
260
|
+
for i = 1, #v do parts[i] = M.encode(v[i]) end
|
|
261
|
+
return '[' .. table.concat(parts, ',') .. ']'
|
|
262
|
+
end
|
|
263
|
+
if M.ismap(v) then
|
|
264
|
+
local parts = {}
|
|
265
|
+
for _, k in ipairs(M.keys(v)) do
|
|
266
|
+
parts[#parts + 1] = M.encode(k) .. ':' .. M.encode(v[k])
|
|
267
|
+
end
|
|
268
|
+
return '{' .. table.concat(parts, ',') .. '}'
|
|
269
|
+
end
|
|
270
|
+
-- A host object published through `exports` (section 11) - the library
|
|
271
|
+
-- never inspects one and nothing in the corpus compares one.
|
|
272
|
+
return '"(opaque)"'
|
|
273
|
+
end
|
|
274
|
+
|
|
275
|
+
return M
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
-- VENDORED: @voxgig/plugin sdk-20260908-1556-0 (lua/src/plugin/version.lua)
|
|
2
|
+
-- Source: https://github.com/voxgig/plugin @ 48392f5e2b6d1434ee9b1a4a9a11f4480aaeb46a [tag: sdk-20260908-1556-0]
|
|
3
|
+
-- License: MIT (c) voxgig - see repository LICENSE. Do not edit: resync from upstream.
|
|
4
|
+
-- Versions and ranges (section 11.2).
|
|
5
|
+
--
|
|
6
|
+
-- TWO FIELDS AND ONE PREDICATE. A capability declares `version`, a
|
|
7
|
+
-- concrete version. A requirement declares `range`. A requirement is
|
|
8
|
+
-- satisfied when the names match, the `match` passes, and the provider's
|
|
9
|
+
-- `version` falls inside the requirement's `range`.
|
|
10
|
+
--
|
|
11
|
+
-- That is the whole rule. There is no third field and no second comparison
|
|
12
|
+
-- - an earlier draft added a provider-side `compat` range, which left
|
|
13
|
+
-- three values and no statement of how they combine, and three defensible
|
|
14
|
+
-- readings of one declaration is worse than the ambiguity it was
|
|
15
|
+
-- introduced to fix.
|
|
16
|
+
|
|
17
|
+
local T = require 'feature.secrets.plugin.types'
|
|
18
|
+
|
|
19
|
+
local M = {}
|
|
20
|
+
|
|
21
|
+
-- A COMPONENT IS BOUNDED, and the bound is the model's, not the host
|
|
22
|
+
-- language's. Lua 5.4 integers are 64-bit and JavaScript's numbers stop
|
|
23
|
+
-- being exact past 2**53, so a twenty-digit component parsed to one value
|
|
24
|
+
-- here and a rounded one there. 2**31-1 is the smallest bound every target
|
|
25
|
+
-- language holds exactly, which makes it the model's.
|
|
26
|
+
M.COMPONENT_MAX = 2147483647
|
|
27
|
+
|
|
28
|
+
local function component(digits, whole, field)
|
|
29
|
+
-- `tonumber` on twenty digits gives a FLOAT, not an error, and a float
|
|
30
|
+
-- above the bound still compares above it - so the check fires on the
|
|
31
|
+
-- imprecise value exactly as it does on an exact one.
|
|
32
|
+
local value = tonumber(digits)
|
|
33
|
+
if nil == value or M.COMPONENT_MAX < value then
|
|
34
|
+
T.fail('plugin_bad_range',
|
|
35
|
+
'version component out of range in ' .. whole .. ': ' .. digits,
|
|
36
|
+
T.map { [field] = whole })
|
|
37
|
+
end
|
|
38
|
+
return math.tointeger(value) or value
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
-- `1`, `1.2` or `1.2.3`, fully anchored.
|
|
42
|
+
local function parts(text, whole, field)
|
|
43
|
+
local pieces = {}
|
|
44
|
+
for piece in (text .. '.'):gmatch('([^.]*)%.') do
|
|
45
|
+
pieces[#pieces + 1] = piece
|
|
46
|
+
end
|
|
47
|
+
if 0 == #pieces or 3 < #pieces then return nil end
|
|
48
|
+
local out = { 0, 0, 0 }
|
|
49
|
+
for i, piece in ipairs(pieces) do
|
|
50
|
+
if '' == piece or nil ~= piece:find('[^0-9]') then return nil end
|
|
51
|
+
out[i] = component(piece, whole, field)
|
|
52
|
+
end
|
|
53
|
+
return out
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
-- Two forms and no more (section 11.2):
|
|
57
|
+
--
|
|
58
|
+
-- '2.1' >= 2.1.0 and < 3.0.0
|
|
59
|
+
-- '~2.1' >= 2.1.0 and < 2.2.0
|
|
60
|
+
function M.parse_range(range)
|
|
61
|
+
if 'string' ~= type(range) or '' == range then
|
|
62
|
+
T.fail('plugin_bad_range', 'invalid range: ' .. T.encode(range),
|
|
63
|
+
T.map { range = range })
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
local tilde = '~' == range:sub(1, 1)
|
|
67
|
+
local body = tilde and range:sub(2) or range
|
|
68
|
+
local got = parts(body, range, 'range')
|
|
69
|
+
if nil == got then
|
|
70
|
+
T.fail('plugin_bad_range', 'invalid range: ' .. range,
|
|
71
|
+
T.map { range = range })
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
local hi
|
|
75
|
+
if tilde then
|
|
76
|
+
hi = T.list { got[1], got[2] + 1, 0 }
|
|
77
|
+
else
|
|
78
|
+
hi = T.list { got[1] + 1, 0, 0 }
|
|
79
|
+
end
|
|
80
|
+
return T.map { lo = T.list { got[1], got[2], got[3] }, hi = hi }
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
function M.parse_version(version)
|
|
84
|
+
if 'string' ~= type(version) then
|
|
85
|
+
T.fail('plugin_bad_range', 'invalid version: ' .. T.encode(version),
|
|
86
|
+
T.map { version = version })
|
|
87
|
+
end
|
|
88
|
+
local got = parts(version, version, 'version')
|
|
89
|
+
if nil == got then
|
|
90
|
+
T.fail('plugin_bad_range', 'invalid version: ' .. version,
|
|
91
|
+
T.map { version = version })
|
|
92
|
+
end
|
|
93
|
+
return got
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
local function cmp(a, b)
|
|
97
|
+
for i = 1, 3 do
|
|
98
|
+
local x = a[i] or 0
|
|
99
|
+
local y = b[i] or 0
|
|
100
|
+
if x ~= y then return x < y and -1 or 1 end
|
|
101
|
+
end
|
|
102
|
+
return 0
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
-- The one satisfaction predicate: lo <= version < hi.
|
|
106
|
+
function M.satisfies(version, range)
|
|
107
|
+
local v = M.parse_version(version)
|
|
108
|
+
local r = M.parse_range(range)
|
|
109
|
+
return 0 <= cmp(v, r.lo) and 0 > cmp(v, r.hi)
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
-- satisfies for the internal callers that treat an unparseable version or
|
|
113
|
+
-- range as "does not satisfy" - Capability and Graph, both of which run
|
|
114
|
+
-- over data the corpus has already admitted.
|
|
115
|
+
function M.satisfiesq(version, range)
|
|
116
|
+
local ok, out = pcall(M.satisfies, version, range)
|
|
117
|
+
return ok and out or false
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
-- The version triple as a comparable key, for the capability rank.
|
|
121
|
+
function M.version_parts(text)
|
|
122
|
+
local out = {}
|
|
123
|
+
for piece in (tostring(text) .. '.'):gmatch('([^.]*)%.') do
|
|
124
|
+
out[#out + 1] = tonumber(piece) or 0
|
|
125
|
+
end
|
|
126
|
+
return out
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
M.version_cmp = cmp
|
|
130
|
+
|
|
131
|
+
return M
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
-- VENDORED: @voxgig/plugin sdk-20260908-1556-0 (lua/src/plugin.lua)
|
|
2
|
+
-- Source: https://github.com/voxgig/plugin @ 48392f5e2b6d1434ee9b1a4a9a11f4480aaeb46a [tag: sdk-20260908-1556-0]
|
|
3
|
+
-- License: MIT (c) voxgig - see repository LICENSE. Do not edit: resync from upstream.
|
|
4
|
+
-- The canonical surface `make parity` checks (AGENTS.md section 4). Small
|
|
5
|
+
-- on purpose (section 19): everything else is methods on the host and
|
|
6
|
+
-- instance types, because a library that grows a second public entry point
|
|
7
|
+
-- per feature is a library twenty ports pay for twice.
|
|
8
|
+
--
|
|
9
|
+
-- make_host make_catalog
|
|
10
|
+
-- parse_ref format_ref check_name check_tag
|
|
11
|
+
-- normalize_config resolve_options resolve_order resolve_candidates
|
|
12
|
+
-- apply_env
|
|
13
|
+
--
|
|
14
|
+
-- This module FORWARDS rather than implements: the surface is visible in
|
|
15
|
+
-- one place, and a name that stops existing stops existing here loudly.
|
|
16
|
+
|
|
17
|
+
local types = require 'feature.secrets.plugin.types'
|
|
18
|
+
local json = require 'feature.secrets.plugin.json'
|
|
19
|
+
local ref = require 'feature.secrets.plugin.ref'
|
|
20
|
+
local version = require 'feature.secrets.plugin.version'
|
|
21
|
+
local capability = require 'feature.secrets.plugin.capability'
|
|
22
|
+
local resolve = require 'feature.secrets.plugin.resolve'
|
|
23
|
+
local graph = require 'feature.secrets.plugin.graph'
|
|
24
|
+
local order = require 'feature.secrets.plugin.order'
|
|
25
|
+
local config = require 'feature.secrets.plugin.config'
|
|
26
|
+
local env = require 'feature.secrets.plugin.env'
|
|
27
|
+
local export = require 'feature.secrets.plugin.export'
|
|
28
|
+
local point = require 'feature.secrets.plugin.point'
|
|
29
|
+
local catalog = require 'feature.secrets.plugin.catalog'
|
|
30
|
+
local depend = require 'feature.secrets.plugin.depend'
|
|
31
|
+
local host = require 'feature.secrets.plugin.host'
|
|
32
|
+
|
|
33
|
+
local M = {
|
|
34
|
+
types = types,
|
|
35
|
+
json = json,
|
|
36
|
+
|
|
37
|
+
make_host = host.make_host,
|
|
38
|
+
make_catalog = catalog.make_catalog,
|
|
39
|
+
|
|
40
|
+
parse_ref = ref.parse_ref,
|
|
41
|
+
format_ref = ref.format_ref,
|
|
42
|
+
check_name = ref.check_name,
|
|
43
|
+
check_tag = ref.check_tag,
|
|
44
|
+
canon_ref = ref.canon_ref,
|
|
45
|
+
|
|
46
|
+
normalize_config = config.normalize_config,
|
|
47
|
+
resolve_options = config.resolve_options,
|
|
48
|
+
resolve_order = order.resolve_order,
|
|
49
|
+
resolve_candidates = resolve.resolve_candidates,
|
|
50
|
+
resolve_from = resolve.resolve_from,
|
|
51
|
+
resolve_capability = capability.resolve_capability,
|
|
52
|
+
resolve_graph = graph.resolve_graph,
|
|
53
|
+
apply_env = env.apply_env,
|
|
54
|
+
parse_range = version.parse_range,
|
|
55
|
+
satisfies = version.satisfies,
|
|
56
|
+
|
|
57
|
+
codeof = types.codeof,
|
|
58
|
+
NULL = types.NULL,
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
-- The modules themselves, for the driver and for a host that needs one.
|
|
62
|
+
M.ref = ref
|
|
63
|
+
M.version = version
|
|
64
|
+
M.capability = capability
|
|
65
|
+
M.resolve = resolve
|
|
66
|
+
M.graph = graph
|
|
67
|
+
M.order = order
|
|
68
|
+
M.config = config
|
|
69
|
+
M.env = env
|
|
70
|
+
M.export = export
|
|
71
|
+
M.point = point
|
|
72
|
+
M.catalog = catalog
|
|
73
|
+
M.depend = depend
|
|
74
|
+
M.host = host
|
|
75
|
+
|
|
76
|
+
return M
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
-- VENDORED: @voxgig/sekreto sdk-20260908-1556-0 (lua/src/sekreto/addr.lua)
|
|
2
|
+
-- Source: https://github.com/voxgig/sekreto @ 1267ee2e5f49566bc92695bc9eb3a60ef4924998 [tag: sdk-20260908-1556-0]
|
|
3
|
+
-- License: MIT (c) voxgig - see repository LICENSE. Do not edit: resync from upstream.
|
|
4
|
+
-- Address checking: core, never a plugin.
|
|
5
|
+
--
|
|
6
|
+
-- Every network provider routes its configured address through
|
|
7
|
+
-- `checkaddr` before a socket is opened, and every refusal names the
|
|
8
|
+
-- address through `safeaddr`.
|
|
9
|
+
--
|
|
10
|
+
-- The address is read by hand, in the same handful of steps in every
|
|
11
|
+
-- port, rather than by each platform's URL parser. That is deliberate.
|
|
12
|
+
-- Twelve parsers disagree about malformed input - where userinfo ends,
|
|
13
|
+
-- whether `0177.0.0.1` is loopback, what an unclosed bracket means - and
|
|
14
|
+
-- a check that answers differently in different ports is not a check.
|
|
15
|
+
--
|
|
16
|
+
-- The rule this parse obeys, and the reason it can be trusted: it is
|
|
17
|
+
-- never more permissive than the transport that will dial the address.
|
|
18
|
+
-- It ends the authority at `/`, `?` or `#` only, so a client that also
|
|
19
|
+
-- breaks on `\` can only ever see a SHORTER host than this does. It
|
|
20
|
+
-- refuses userinfo outright rather than locating its end. It compares the
|
|
21
|
+
-- host literally, so a numeric form no parser here agrees on is refused
|
|
22
|
+
-- rather than guessed at.
|
|
23
|
+
|
|
24
|
+
local err = require('feature.secrets.sekreto.err')
|
|
25
|
+
|
|
26
|
+
local M = {}
|
|
27
|
+
|
|
28
|
+
local function lowerascii(text)
|
|
29
|
+
return (text:gsub('[A-Z]', function(ch) return string.char(ch:byte() + 32) end))
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
--- An address with any userinfo replaced by `[redacted]`, for messages.
|
|
33
|
+
---
|
|
34
|
+
--- Every refusal below names the address it refused, and one of them
|
|
35
|
+
--- fires precisely because the address carries a credential - so printing
|
|
36
|
+
--- it verbatim would write the password to stderr and into the logs. It
|
|
37
|
+
--- cannot be cleaned up afterwards either: that password was never
|
|
38
|
+
--- resolved as a secret, so `redact()` has never seen it and never will.
|
|
39
|
+
function M.safeaddr(addr)
|
|
40
|
+
local mark = addr:find('://', 1, true)
|
|
41
|
+
if not mark then
|
|
42
|
+
return addr
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
local rest = addr:sub(mark + 3)
|
|
46
|
+
local stop = rest:find('[/?#]')
|
|
47
|
+
local authority = stop and rest:sub(1, stop - 1) or rest
|
|
48
|
+
|
|
49
|
+
local at = authority:find('@[^@]*$')
|
|
50
|
+
if not at then
|
|
51
|
+
return addr
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
return addr:sub(1, mark + 2) .. '[redacted]' .. addr:sub(mark + 3 + at - 1)
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
--- Refuse to send a secret-bearing credential in the clear.
|
|
58
|
+
---
|
|
59
|
+
--- A vault API is HTTPS in any real deployment; plaintext is a dev-mode
|
|
60
|
+
--- convenience. Loopback stays allowed: that is `vault server -dev`,
|
|
61
|
+
--- `boru vault serve`, and this repository's own test harness.
|
|
62
|
+
function M.checkaddr(addr)
|
|
63
|
+
local scheme
|
|
64
|
+
|
|
65
|
+
if 'https://' == addr:sub(1, 8) then
|
|
66
|
+
scheme = 'https://'
|
|
67
|
+
elseif 'http://' == addr:sub(1, 7) then
|
|
68
|
+
scheme = 'http://'
|
|
69
|
+
else
|
|
70
|
+
err.fail('sekreto: not an http(s) address: ' .. M.safeaddr(addr))
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
local rest = addr:sub(#scheme + 1)
|
|
74
|
+
local stop = rest:find('[/?#]')
|
|
75
|
+
local authority = stop and rest:sub(1, stop - 1) or rest
|
|
76
|
+
|
|
77
|
+
-- Userinfo is refused outright rather than parsed around, and on https
|
|
78
|
+
-- as well as http. No store this library speaks authenticates by
|
|
79
|
+
-- userinfo - they take a token or a signature - so an address carrying
|
|
80
|
+
-- one is a mistake at best. At worst it is the attack this whole
|
|
81
|
+
-- function exists to stop: `http://localhost:8200@evil.example.com/` is
|
|
82
|
+
-- a request to evil.example.com that reads, to anything that splits the
|
|
83
|
+
-- authority on ':', as loopback.
|
|
84
|
+
if nil ~= authority:find('@', 1, true) then
|
|
85
|
+
err.fail('sekreto: refusing an address with embedded credentials: ' .. M.safeaddr(addr))
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
-- An opening bracket with no closing one is not an address at all.
|
|
89
|
+
if '[' == authority:sub(1, 1) and nil == authority:find(']', 1, true) then
|
|
90
|
+
err.fail('sekreto: not a valid http(s) address: ' .. M.safeaddr(addr))
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
if 'https://' == scheme then
|
|
94
|
+
return
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
-- A bracketed IPv6 literal keeps its brackets: splitting the authority
|
|
98
|
+
-- on the first colon would yield '[', which could never match.
|
|
99
|
+
local host
|
|
100
|
+
if '[' == authority:sub(1, 1) then
|
|
101
|
+
host = authority:sub(1, authority:find(']', 1, true))
|
|
102
|
+
else
|
|
103
|
+
local colon = authority:find(':', 1, true)
|
|
104
|
+
host = colon and authority:sub(1, colon - 1) or authority
|
|
105
|
+
end
|
|
106
|
+
host = lowerascii(host)
|
|
107
|
+
|
|
108
|
+
-- Four literals, and nothing is normalised: `0177.0.0.1`, `2130706433`,
|
|
109
|
+
-- `127.0.0.2` and `[::ffff:127.0.0.1]` are all refused.
|
|
110
|
+
if 'localhost' == host or '127.0.0.1' == host or '::1' == host or '[::1]' == host then
|
|
111
|
+
return
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
err.fail('sekreto: refusing to send a token in plaintext to ' ..
|
|
115
|
+
M.safeaddr(addr) .. ' (use https)')
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
--- A URL without its query string, for a message that must not leak one.
|
|
119
|
+
function M.bare(url)
|
|
120
|
+
local mark = url:find('?', 1, true)
|
|
121
|
+
return mark and url:sub(1, mark - 1) or url
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
return M
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
-- VENDORED: @voxgig/sekreto sdk-20260908-1556-0 (lua/src/sekreto/err.lua)
|
|
2
|
+
-- Source: https://github.com/voxgig/sekreto @ 1267ee2e5f49566bc92695bc9eb3a60ef4924998 [tag: sdk-20260908-1556-0]
|
|
3
|
+
-- License: MIT (c) voxgig - see repository LICENSE. Do not edit: resync from upstream.
|
|
4
|
+
-- Anything sekreto refuses to do: a bad name, a missing secret, a
|
|
5
|
+
-- provider that could not be reached.
|
|
6
|
+
--
|
|
7
|
+
-- Lua has no exception type, so an error is a table carrying a message
|
|
8
|
+
-- and nothing else - no code, no fields, no cause. The message IS the
|
|
9
|
+
-- contract: spec/sekreto.json pins every one of them byte for byte.
|
|
10
|
+
--
|
|
11
|
+
-- Raised with `error(value, 0)` so that Lua does not prepend a source
|
|
12
|
+
-- position: `sekreto: invalid name: a b` must arrive exactly as written.
|
|
13
|
+
|
|
14
|
+
local M = {}
|
|
15
|
+
|
|
16
|
+
local ERRMT = {
|
|
17
|
+
__tostring = function(err) return err.message end,
|
|
18
|
+
__name = 'SekretoError',
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
--- A SekretoError value.
|
|
22
|
+
function M.SekretoError(message)
|
|
23
|
+
return setmetatable(
|
|
24
|
+
{ sekreto = true, name = 'SekretoError', message = message },
|
|
25
|
+
ERRMT
|
|
26
|
+
)
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
--- Is this a SekretoError?
|
|
30
|
+
function M.issekretoerror(err)
|
|
31
|
+
return 'table' == type(err) and true == err.sekreto
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
--- Raise a SekretoError.
|
|
35
|
+
function M.fail(message)
|
|
36
|
+
error(M.SekretoError(message), 0)
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
--- The message of anything raised, SekretoError or not.
|
|
40
|
+
function M.message(err)
|
|
41
|
+
if 'table' == type(err) and nil ~= err.message then
|
|
42
|
+
return tostring(err.message)
|
|
43
|
+
end
|
|
44
|
+
return tostring(err)
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
return M
|