@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.
Files changed (304) hide show
  1. package/bin/voxgig-sdkgen +1 -1
  2. package/package.json +1 -1
  3. package/project/.sdk/model/feature/secrets.aon +330 -0
  4. package/project/.sdk/model/target/c.aon +15 -2
  5. package/project/.sdk/model/target/cpp.aon +18 -0
  6. package/project/.sdk/model/target/lua.aon +17 -0
  7. package/project/.sdk/model/target/ocaml.aon +48 -5
  8. package/project/.sdk/model/target/zig.aon +30 -4
  9. package/project/.sdk/src/cmp/c/Config_c.ts +338 -1
  10. package/project/.sdk/src/cmp/c/Main_c.ts +57 -2
  11. package/project/.sdk/src/cmp/c/Package_c.ts +12 -2
  12. package/project/.sdk/src/cmp/cpp/Config_cpp.ts +324 -2
  13. package/project/.sdk/src/cmp/cpp/Gitignore_cpp.ts +2 -0
  14. package/project/.sdk/src/cmp/cpp/Main_cpp.ts +62 -4
  15. package/project/.sdk/src/cmp/cpp/Package_cpp.ts +10 -0
  16. package/project/.sdk/src/cmp/lua/Config_lua.ts +88 -0
  17. package/project/.sdk/src/cmp/lua/Gitignore_lua.ts +4 -0
  18. package/project/.sdk/src/cmp/lua/Main_lua.ts +93 -3
  19. package/project/.sdk/src/cmp/lua/Package_lua.ts +60 -0
  20. package/project/.sdk/src/cmp/lua/fragment/Main.fragment.lua +10 -0
  21. package/project/.sdk/src/cmp/ocaml/Config_ocaml.ts +183 -5
  22. package/project/.sdk/src/cmp/ocaml/Main_ocaml.ts +160 -3
  23. package/project/.sdk/src/cmp/ocaml/Package_ocaml.ts +25 -1
  24. package/project/.sdk/src/cmp/zig/Config_zig.ts +130 -9
  25. package/project/.sdk/src/cmp/zig/Main_zig.ts +208 -4
  26. package/project/.sdk/{tm/zig/build.zig → src/cmp/zig/fragment/Build.fragment.zig} +7 -0
  27. package/project/.sdk/src/cmp/zig/fragment/Main.fragment.zig +25 -0
  28. package/project/.sdk/{tm/zig/root.zig → src/cmp/zig/fragment/Root.fragment.zig} +9 -0
  29. package/project/.sdk/tm/c/Makefile +58 -9
  30. package/project/.sdk/tm/c/core/sdk.h +10 -0
  31. package/project/.sdk/tm/c/feature/secrets/plugin/capability.c +133 -0
  32. package/project/.sdk/tm/c/feature/secrets/plugin/capability.h +39 -0
  33. package/project/.sdk/tm/c/feature/secrets/plugin/catalog.c +83 -0
  34. package/project/.sdk/tm/c/feature/secrets/plugin/catalog.h +48 -0
  35. package/project/.sdk/tm/c/feature/secrets/plugin/config.c +413 -0
  36. package/project/.sdk/tm/c/feature/secrets/plugin/config.h +24 -0
  37. package/project/.sdk/tm/c/feature/secrets/plugin/depend.c +264 -0
  38. package/project/.sdk/tm/c/feature/secrets/plugin/depend.h +29 -0
  39. package/project/.sdk/tm/c/feature/secrets/plugin/env.c +220 -0
  40. package/project/.sdk/tm/c/feature/secrets/plugin/env.h +19 -0
  41. package/project/.sdk/tm/c/feature/secrets/plugin/export.c +97 -0
  42. package/project/.sdk/tm/c/feature/secrets/plugin/export.h +19 -0
  43. package/project/.sdk/tm/c/feature/secrets/plugin/graph.c +237 -0
  44. package/project/.sdk/tm/c/feature/secrets/plugin/graph.h +17 -0
  45. package/project/.sdk/tm/c/feature/secrets/plugin/host.c +1494 -0
  46. package/project/.sdk/tm/c/feature/secrets/plugin/host.h +135 -0
  47. package/project/.sdk/tm/c/feature/secrets/plugin/order.c +288 -0
  48. package/project/.sdk/tm/c/feature/secrets/plugin/order.h +18 -0
  49. package/project/.sdk/tm/c/feature/secrets/plugin/point.c +141 -0
  50. package/project/.sdk/tm/c/feature/secrets/plugin/point.h +80 -0
  51. package/project/.sdk/tm/c/feature/secrets/plugin/ref.c +170 -0
  52. package/project/.sdk/tm/c/feature/secrets/plugin/ref.h +52 -0
  53. package/project/.sdk/tm/c/feature/secrets/plugin/resolve.c +98 -0
  54. package/project/.sdk/tm/c/feature/secrets/plugin/resolve.h +18 -0
  55. package/project/.sdk/tm/c/feature/secrets/plugin/types.c +150 -0
  56. package/project/.sdk/tm/c/feature/secrets/plugin/types.h +104 -0
  57. package/project/.sdk/tm/c/feature/secrets/plugin/value.c +649 -0
  58. package/project/.sdk/tm/c/feature/secrets/plugin/value.h +135 -0
  59. package/project/.sdk/tm/c/feature/secrets/plugin/version.c +151 -0
  60. package/project/.sdk/tm/c/feature/secrets/plugin/version.h +34 -0
  61. package/project/.sdk/tm/c/feature/secrets/plugins/aws.c +281 -0
  62. package/project/.sdk/tm/c/feature/secrets/plugins/azuresecrets.c +207 -0
  63. package/project/.sdk/tm/c/feature/secrets/plugins/boru.c +164 -0
  64. package/project/.sdk/tm/c/feature/secrets/plugins/clock.c +75 -0
  65. package/project/.sdk/tm/c/feature/secrets/plugins/doppler.c +141 -0
  66. package/project/.sdk/tm/c/feature/secrets/plugins/encode.c +144 -0
  67. package/project/.sdk/tm/c/feature/secrets/plugins/gcpsecrets.c +177 -0
  68. package/project/.sdk/tm/c/feature/secrets/plugins/hashicorp.c +239 -0
  69. package/project/.sdk/tm/c/feature/secrets/plugins/httpjson.c +599 -0
  70. package/project/.sdk/tm/c/feature/secrets/plugins/infisical.c +165 -0
  71. package/project/.sdk/tm/c/feature/secrets/plugins/onepassword.c +194 -0
  72. package/project/.sdk/tm/c/feature/secrets/plugins/proc.c +233 -0
  73. package/project/.sdk/tm/c/feature/secrets/plugins/secretspec.c +125 -0
  74. package/project/.sdk/tm/c/feature/secrets/plugins/sekretoplugins.h +125 -0
  75. package/project/.sdk/tm/c/feature/secrets/plugins/sha256.c +270 -0
  76. package/project/.sdk/tm/c/feature/secrets/plugins/sigv4.c +382 -0
  77. package/project/.sdk/tm/c/feature/secrets/plugins/support.h +153 -0
  78. package/project/.sdk/tm/c/feature/secrets/plugins/tls.c +420 -0
  79. package/project/.sdk/tm/c/feature/secrets/sekreto/internal.h +86 -0
  80. package/project/.sdk/tm/c/feature/secrets/sekreto/json.c +721 -0
  81. package/project/.sdk/tm/c/feature/secrets/sekreto/providers.c +813 -0
  82. package/project/.sdk/tm/c/feature/secrets/sekreto/sekreto.c +944 -0
  83. package/project/.sdk/tm/c/feature/secrets/sekreto/sekreto.h +490 -0
  84. package/project/.sdk/tm/c/feature/secrets/sekreto/util.c +442 -0
  85. package/project/.sdk/tm/c/feature/secrets.c +797 -0
  86. package/project/.sdk/tm/c/feature/secrets.h +46 -0
  87. package/project/.sdk/tm/c/src/feature/secrets/.gitkeep +0 -0
  88. package/project/.sdk/tm/c/tests/feature/secrets/secrets_test.c +802 -0
  89. package/project/.sdk/tm/clojure/feature/secrets/sdk/feature/secrets.clj +38 -11
  90. package/project/.sdk/tm/clojure/test/sdk/test/feature/secrets.clj +40 -6
  91. package/project/.sdk/tm/cpp/Makefile +48 -4
  92. package/project/.sdk/tm/cpp/feature/secrets/plugin/capability.cpp +121 -0
  93. package/project/.sdk/tm/cpp/feature/secrets/plugin/capability.hpp +41 -0
  94. package/project/.sdk/tm/cpp/feature/secrets/plugin/catalog.cpp +60 -0
  95. package/project/.sdk/tm/cpp/feature/secrets/plugin/catalog.hpp +66 -0
  96. package/project/.sdk/tm/cpp/feature/secrets/plugin/config.cpp +376 -0
  97. package/project/.sdk/tm/cpp/feature/secrets/plugin/config.hpp +29 -0
  98. package/project/.sdk/tm/cpp/feature/secrets/plugin/depend.cpp +230 -0
  99. package/project/.sdk/tm/cpp/feature/secrets/plugin/depend.hpp +31 -0
  100. package/project/.sdk/tm/cpp/feature/secrets/plugin/env.cpp +205 -0
  101. package/project/.sdk/tm/cpp/feature/secrets/plugin/env.hpp +25 -0
  102. package/project/.sdk/tm/cpp/feature/secrets/plugin/export.cpp +84 -0
  103. package/project/.sdk/tm/cpp/feature/secrets/plugin/export.hpp +24 -0
  104. package/project/.sdk/tm/cpp/feature/secrets/plugin/graph.cpp +222 -0
  105. package/project/.sdk/tm/cpp/feature/secrets/plugin/graph.hpp +21 -0
  106. package/project/.sdk/tm/cpp/feature/secrets/plugin/host.cpp +1200 -0
  107. package/project/.sdk/tm/cpp/feature/secrets/plugin/host.hpp +250 -0
  108. package/project/.sdk/tm/cpp/feature/secrets/plugin/order.cpp +250 -0
  109. package/project/.sdk/tm/cpp/feature/secrets/plugin/order.hpp +22 -0
  110. package/project/.sdk/tm/cpp/feature/secrets/plugin/point.cpp +110 -0
  111. package/project/.sdk/tm/cpp/feature/secrets/plugin/point.hpp +79 -0
  112. package/project/.sdk/tm/cpp/feature/secrets/plugin/ref.cpp +136 -0
  113. package/project/.sdk/tm/cpp/feature/secrets/plugin/ref.hpp +60 -0
  114. package/project/.sdk/tm/cpp/feature/secrets/plugin/resolve.cpp +82 -0
  115. package/project/.sdk/tm/cpp/feature/secrets/plugin/resolve.hpp +25 -0
  116. package/project/.sdk/tm/cpp/feature/secrets/plugin/types.cpp +90 -0
  117. package/project/.sdk/tm/cpp/feature/secrets/plugin/types.hpp +65 -0
  118. package/project/.sdk/tm/cpp/feature/secrets/plugin/value.cpp +491 -0
  119. package/project/.sdk/tm/cpp/feature/secrets/plugin/value.hpp +120 -0
  120. package/project/.sdk/tm/cpp/feature/secrets/plugin/version.cpp +143 -0
  121. package/project/.sdk/tm/cpp/feature/secrets/plugin/version.hpp +36 -0
  122. package/project/.sdk/tm/cpp/feature/secrets/plugins/Aws.cpp +248 -0
  123. package/project/.sdk/tm/cpp/feature/secrets/plugins/Aws.hpp +30 -0
  124. package/project/.sdk/tm/cpp/feature/secrets/plugins/Azuresecrets.cpp +149 -0
  125. package/project/.sdk/tm/cpp/feature/secrets/plugins/Azuresecrets.hpp +23 -0
  126. package/project/.sdk/tm/cpp/feature/secrets/plugins/Boru.cpp +117 -0
  127. package/project/.sdk/tm/cpp/feature/secrets/plugins/Boru.hpp +27 -0
  128. package/project/.sdk/tm/cpp/feature/secrets/plugins/Crypto.cpp +180 -0
  129. package/project/.sdk/tm/cpp/feature/secrets/plugins/Crypto.hpp +52 -0
  130. package/project/.sdk/tm/cpp/feature/secrets/plugins/Doppler.cpp +87 -0
  131. package/project/.sdk/tm/cpp/feature/secrets/plugins/Doppler.hpp +23 -0
  132. package/project/.sdk/tm/cpp/feature/secrets/plugins/Gcpsecrets.cpp +121 -0
  133. package/project/.sdk/tm/cpp/feature/secrets/plugins/Gcpsecrets.hpp +23 -0
  134. package/project/.sdk/tm/cpp/feature/secrets/plugins/Hashicorp.cpp +153 -0
  135. package/project/.sdk/tm/cpp/feature/secrets/plugins/Hashicorp.hpp +23 -0
  136. package/project/.sdk/tm/cpp/feature/secrets/plugins/Httpjson.cpp +666 -0
  137. package/project/.sdk/tm/cpp/feature/secrets/plugins/Httpjson.hpp +160 -0
  138. package/project/.sdk/tm/cpp/feature/secrets/plugins/Infisical.cpp +123 -0
  139. package/project/.sdk/tm/cpp/feature/secrets/plugins/Infisical.hpp +23 -0
  140. package/project/.sdk/tm/cpp/feature/secrets/plugins/Onepassword.cpp +125 -0
  141. package/project/.sdk/tm/cpp/feature/secrets/plugins/Onepassword.hpp +23 -0
  142. package/project/.sdk/tm/cpp/feature/secrets/plugins/Proc.cpp +223 -0
  143. package/project/.sdk/tm/cpp/feature/secrets/plugins/Proc.hpp +47 -0
  144. package/project/.sdk/tm/cpp/feature/secrets/plugins/Secretspec.cpp +104 -0
  145. package/project/.sdk/tm/cpp/feature/secrets/plugins/Secretspec.hpp +27 -0
  146. package/project/.sdk/tm/cpp/feature/secrets/plugins/Sigv4.cpp +242 -0
  147. package/project/.sdk/tm/cpp/feature/secrets/plugins/Sigv4.hpp +58 -0
  148. package/project/.sdk/tm/cpp/feature/secrets/plugins/Tls.cpp +260 -0
  149. package/project/.sdk/tm/cpp/feature/secrets/plugins/Tls.hpp +47 -0
  150. package/project/.sdk/tm/cpp/feature/secrets/sekreto/Json.cpp +476 -0
  151. package/project/.sdk/tm/cpp/feature/secrets/sekreto/Json.hpp +89 -0
  152. package/project/.sdk/tm/cpp/feature/secrets/sekreto/Provider.cpp +312 -0
  153. package/project/.sdk/tm/cpp/feature/secrets/sekreto/Provider.hpp +263 -0
  154. package/project/.sdk/tm/cpp/feature/secrets/sekreto/Providers.cpp +354 -0
  155. package/project/.sdk/tm/cpp/feature/secrets/sekreto/Providers.hpp +111 -0
  156. package/project/.sdk/tm/cpp/feature/secrets/sekreto/Sekreto.cpp +613 -0
  157. package/project/.sdk/tm/cpp/feature/secrets/sekreto/Sekreto.hpp +227 -0
  158. package/project/.sdk/tm/cpp/feature/secrets.hpp +745 -0
  159. package/project/.sdk/tm/cpp/src/feature/secrets/.gitkeep +0 -0
  160. package/project/.sdk/tm/cpp/test/feature/secrets/secrets_test.cpp +808 -0
  161. package/project/.sdk/tm/csharp/feature/SecretsFeature.cs +34 -8
  162. package/project/.sdk/tm/csharp/test/feature/secrets/SecretsFeatureTest.cs +85 -0
  163. package/project/.sdk/tm/elixir/lib/projectname/feature/secrets.ex +17 -2
  164. package/project/.sdk/tm/elixir/test/feature/secrets/secrets_test.exs +41 -0
  165. package/project/.sdk/tm/go/feature/secrets_feature.go +32 -10
  166. package/project/.sdk/tm/go/test/feature/secrets/secrets_feature_test.go +116 -0
  167. package/project/.sdk/tm/java/feature/SecretsFeature.java +33 -8
  168. package/project/.sdk/tm/java/test/feature/secrets/SecretsFeatureTest.java +64 -0
  169. package/project/.sdk/tm/js/src/feature/secrets/SecretsFeature.js +34 -11
  170. package/project/.sdk/tm/js/test/feature/secrets/Secrets.test.js +73 -0
  171. package/project/.sdk/tm/kotlin/feature/SecretsFeature.kt +32 -7
  172. package/project/.sdk/tm/kotlin/test/feature/secrets/SecretsTest.kt +69 -0
  173. package/project/.sdk/tm/lua/Makefile +15 -4
  174. package/project/.sdk/tm/lua/feature/secrets/native/sekretonet.c +806 -0
  175. package/project/.sdk/tm/lua/feature/secrets/plugin/capability.lua +135 -0
  176. package/project/.sdk/tm/lua/feature/secrets/plugin/catalog.lua +63 -0
  177. package/project/.sdk/tm/lua/feature/secrets/plugin/config.lua +361 -0
  178. package/project/.sdk/tm/lua/feature/secrets/plugin/depend.lua +232 -0
  179. package/project/.sdk/tm/lua/feature/secrets/plugin/env.lua +168 -0
  180. package/project/.sdk/tm/lua/feature/secrets/plugin/export.lua +66 -0
  181. package/project/.sdk/tm/lua/feature/secrets/plugin/graph.lua +194 -0
  182. package/project/.sdk/tm/lua/feature/secrets/plugin/host.lua +1190 -0
  183. package/project/.sdk/tm/lua/feature/secrets/plugin/json.lua +169 -0
  184. package/project/.sdk/tm/lua/feature/secrets/plugin/order.lua +207 -0
  185. package/project/.sdk/tm/lua/feature/secrets/plugin/point.lua +106 -0
  186. package/project/.sdk/tm/lua/feature/secrets/plugin/ref.lua +115 -0
  187. package/project/.sdk/tm/lua/feature/secrets/plugin/resolve.lua +78 -0
  188. package/project/.sdk/tm/lua/feature/secrets/plugin/types.lua +275 -0
  189. package/project/.sdk/tm/lua/feature/secrets/plugin/version.lua +131 -0
  190. package/project/.sdk/tm/lua/feature/secrets/plugin.lua +76 -0
  191. package/project/.sdk/tm/lua/feature/secrets/sekreto/addr.lua +124 -0
  192. package/project/.sdk/tm/lua/feature/secrets/sekreto/err.lua +47 -0
  193. package/project/.sdk/tm/lua/feature/secrets/sekreto/name.lua +315 -0
  194. package/project/.sdk/tm/lua/feature/secrets/sekreto/plugins/aws.lua +228 -0
  195. package/project/.sdk/tm/lua/feature/secrets/sekreto/plugins/azuresecrets.lua +137 -0
  196. package/project/.sdk/tm/lua/feature/secrets/sekreto/plugins/boru.lua +124 -0
  197. package/project/.sdk/tm/lua/feature/secrets/sekreto/plugins/crypto.lua +212 -0
  198. package/project/.sdk/tm/lua/feature/secrets/sekreto/plugins/doppler.lua +89 -0
  199. package/project/.sdk/tm/lua/feature/secrets/sekreto/plugins/gcpsecrets.lua +129 -0
  200. package/project/.sdk/tm/lua/feature/secrets/sekreto/plugins/hashicorp.lua +154 -0
  201. package/project/.sdk/tm/lua/feature/secrets/sekreto/plugins/httpjson.lua +248 -0
  202. package/project/.sdk/tm/lua/feature/secrets/sekreto/plugins/infisical.lua +113 -0
  203. package/project/.sdk/tm/lua/feature/secrets/sekreto/plugins/json.lua +449 -0
  204. package/project/.sdk/tm/lua/feature/secrets/sekreto/plugins/net.lua +198 -0
  205. package/project/.sdk/tm/lua/feature/secrets/sekreto/plugins/onepassword.lua +126 -0
  206. package/project/.sdk/tm/lua/feature/secrets/sekreto/plugins/secretspec.lua +93 -0
  207. package/project/.sdk/tm/lua/feature/secrets/sekreto/plugins/sigv4.lua +269 -0
  208. package/project/.sdk/tm/lua/feature/secrets/sekreto/plugins/support.lua +146 -0
  209. package/project/.sdk/tm/lua/feature/secrets/sekreto/providers.lua +346 -0
  210. package/project/.sdk/tm/lua/feature/secrets/sekreto.lua +479 -0
  211. package/project/.sdk/tm/lua/feature/secrets_feature.lua +690 -0
  212. package/project/.sdk/tm/lua/src/feature/secrets/.gitkeep +0 -0
  213. package/project/.sdk/tm/lua/test/extend_test.lua +105 -0
  214. package/project/.sdk/tm/lua/test/feature/secrets/secrets_feature_test.lua +862 -0
  215. package/project/.sdk/tm/ocaml/Makefile +52 -8
  216. package/project/.sdk/tm/ocaml/feature/secrets/plugin/capability.ml +106 -0
  217. package/project/.sdk/tm/ocaml/feature/secrets/plugin/catalog.ml +43 -0
  218. package/project/.sdk/tm/ocaml/feature/secrets/plugin/config.ml +349 -0
  219. package/project/.sdk/tm/ocaml/feature/secrets/plugin/defs.ml +143 -0
  220. package/project/.sdk/tm/ocaml/feature/secrets/plugin/depend.ml +217 -0
  221. package/project/.sdk/tm/ocaml/feature/secrets/plugin/env.ml +197 -0
  222. package/project/.sdk/tm/ocaml/feature/secrets/plugin/export.ml +89 -0
  223. package/project/.sdk/tm/ocaml/feature/secrets/plugin/graph.ml +227 -0
  224. package/project/.sdk/tm/ocaml/feature/secrets/plugin/host.ml +1112 -0
  225. package/project/.sdk/tm/ocaml/feature/secrets/plugin/order.ml +202 -0
  226. package/project/.sdk/tm/ocaml/feature/secrets/plugin/point.ml +138 -0
  227. package/project/.sdk/tm/ocaml/feature/secrets/plugin/ref.ml +126 -0
  228. package/project/.sdk/tm/ocaml/feature/secrets/plugin/resolve.ml +62 -0
  229. package/project/.sdk/tm/ocaml/feature/secrets/plugin/types.ml +97 -0
  230. package/project/.sdk/tm/ocaml/feature/secrets/plugin/value.ml +387 -0
  231. package/project/.sdk/tm/ocaml/feature/secrets/plugin/version.ml +139 -0
  232. package/project/.sdk/tm/ocaml/feature/secrets/plugins/aws.ml +171 -0
  233. package/project/.sdk/tm/ocaml/feature/secrets/plugins/azuresecrets.ml +116 -0
  234. package/project/.sdk/tm/ocaml/feature/secrets/plugins/boru.ml +95 -0
  235. package/project/.sdk/tm/ocaml/feature/secrets/plugins/crypto.ml +149 -0
  236. package/project/.sdk/tm/ocaml/feature/secrets/plugins/doppler.ml +61 -0
  237. package/project/.sdk/tm/ocaml/feature/secrets/plugins/gcpsecrets.ml +93 -0
  238. package/project/.sdk/tm/ocaml/feature/secrets/plugins/hashicorp.ml +120 -0
  239. package/project/.sdk/tm/ocaml/feature/secrets/plugins/http.ml +421 -0
  240. package/project/.sdk/tm/ocaml/feature/secrets/plugins/httpjson.ml +66 -0
  241. package/project/.sdk/tm/ocaml/feature/secrets/plugins/infisical.ml +85 -0
  242. package/project/.sdk/tm/ocaml/feature/secrets/plugins/onepassword.ml +112 -0
  243. package/project/.sdk/tm/ocaml/feature/secrets/plugins/runcmd.ml +97 -0
  244. package/project/.sdk/tm/ocaml/feature/secrets/plugins/secretspec.ml +68 -0
  245. package/project/.sdk/tm/ocaml/feature/secrets/plugins/sigv4.ml +259 -0
  246. package/project/.sdk/tm/ocaml/feature/secrets/plugins/tls.ml +44 -0
  247. package/project/.sdk/tm/ocaml/feature/secrets/plugins/tls_stubs.c +358 -0
  248. package/project/.sdk/tm/ocaml/feature/secrets/sekreto/json.ml +376 -0
  249. package/project/.sdk/tm/ocaml/feature/secrets/sekreto/provider.ml +647 -0
  250. package/project/.sdk/tm/ocaml/feature/secrets/sekreto/secret.ml +299 -0
  251. package/project/.sdk/tm/ocaml/feature/secrets/sekreto/sekreto.ml +347 -0
  252. package/project/.sdk/tm/ocaml/feature/secrets_feature.ml +453 -0
  253. package/project/.sdk/tm/ocaml/src/feature/secrets/.gitkeep +0 -0
  254. package/project/.sdk/tm/ocaml/test/feature/secrets/t_secrets.ml +670 -0
  255. package/project/.sdk/tm/perl/feature/secrets_feature.pm +33 -12
  256. package/project/.sdk/tm/perl/t/feature/secrets/secrets.t +47 -0
  257. package/project/.sdk/tm/php/feature/SecretsFeature.php +30 -6
  258. package/project/.sdk/tm/php/test/feature/secrets/SecretsTest.php +98 -0
  259. package/project/.sdk/tm/py/pkg/feature/secrets_feature.py +28 -6
  260. package/project/.sdk/tm/py/test/feature/secrets/test_secrets.py +114 -0
  261. package/project/.sdk/tm/rb/feature/secrets_feature.rb +28 -6
  262. package/project/.sdk/tm/rb/test/feature/secrets/secrets_feature_test.rb +93 -0
  263. package/project/.sdk/tm/rust/feature/secrets.rs +33 -10
  264. package/project/.sdk/tm/rust/tests/feature/secrets/main.rs +96 -0
  265. package/project/.sdk/tm/scala/feature/SecretsFeature.scala +29 -7
  266. package/project/.sdk/tm/scala/sdktest/feature/secrets/SecretsTestMain.scala +71 -0
  267. package/project/.sdk/tm/ts/src/feature/secrets/SecretsFeature.ts +35 -12
  268. package/project/.sdk/tm/ts/test/feature/secrets/Secrets.test.ts +73 -0
  269. package/project/.sdk/tm/zig/feature/secrets/plugin/capability.zig +137 -0
  270. package/project/.sdk/tm/zig/feature/secrets/plugin/catalog.zig +90 -0
  271. package/project/.sdk/tm/zig/feature/secrets/plugin/config.zig +346 -0
  272. package/project/.sdk/tm/zig/feature/secrets/plugin/depend.zig +244 -0
  273. package/project/.sdk/tm/zig/feature/secrets/plugin/env.zig +201 -0
  274. package/project/.sdk/tm/zig/feature/secrets/plugin/export.zig +83 -0
  275. package/project/.sdk/tm/zig/feature/secrets/plugin/graph.zig +212 -0
  276. package/project/.sdk/tm/zig/feature/secrets/plugin/host.zig +1224 -0
  277. package/project/.sdk/tm/zig/feature/secrets/plugin/inst.zig +126 -0
  278. package/project/.sdk/tm/zig/feature/secrets/plugin/order.zig +228 -0
  279. package/project/.sdk/tm/zig/feature/secrets/plugin/plugin.zig +34 -0
  280. package/project/.sdk/tm/zig/feature/secrets/plugin/point.zig +166 -0
  281. package/project/.sdk/tm/zig/feature/secrets/plugin/ref.zig +147 -0
  282. package/project/.sdk/tm/zig/feature/secrets/plugin/resolve.zig +74 -0
  283. package/project/.sdk/tm/zig/feature/secrets/plugin/types.zig +140 -0
  284. package/project/.sdk/tm/zig/feature/secrets/plugin/value.zig +662 -0
  285. package/project/.sdk/tm/zig/feature/secrets/plugin/version.zig +139 -0
  286. package/project/.sdk/tm/zig/feature/secrets/plugins/aws.zig +294 -0
  287. package/project/.sdk/tm/zig/feature/secrets/plugins/azuresecrets.zig +222 -0
  288. package/project/.sdk/tm/zig/feature/secrets/plugins/boru.zig +188 -0
  289. package/project/.sdk/tm/zig/feature/secrets/plugins/doppler.zig +135 -0
  290. package/project/.sdk/tm/zig/feature/secrets/plugins/gcpsecrets.zig +170 -0
  291. package/project/.sdk/tm/zig/feature/secrets/plugins/hashicorp.zig +242 -0
  292. package/project/.sdk/tm/zig/feature/secrets/plugins/httpjson.zig +535 -0
  293. package/project/.sdk/tm/zig/feature/secrets/plugins/infisical.zig +167 -0
  294. package/project/.sdk/tm/zig/feature/secrets/plugins/onepassword.zig +202 -0
  295. package/project/.sdk/tm/zig/feature/secrets/plugins/secretspec.zig +160 -0
  296. package/project/.sdk/tm/zig/feature/secrets/plugins/sigv4.zig +336 -0
  297. package/project/.sdk/tm/zig/feature/secrets/sekreto/addr.zig +148 -0
  298. package/project/.sdk/tm/zig/feature/secrets/sekreto/builtins.zig +259 -0
  299. package/project/.sdk/tm/zig/feature/secrets/sekreto/provider.zig +440 -0
  300. package/project/.sdk/tm/zig/feature/secrets/sekreto/sekreto.zig +944 -0
  301. package/project/.sdk/tm/zig/feature/secrets.zig +854 -0
  302. package/project/.sdk/tm/zig/src/feature/secrets/.gitkeep +0 -0
  303. package/project/.sdk/tm/zig/test/feature/secrets/secrets_test.zig +891 -0
  304. package/project/sdkgen-package.json +1 -1
@@ -174,18 +174,25 @@ class SecretsFeature extends BaseFeature {
174
174
  // the op — sekreto's miss-vs-error rule: never fall through to an
175
175
  // unauthenticated request because a store was broken.
176
176
  //
177
- // The promise is cleared on REJECTION, and after success when caching is
178
- // off. Holding a settled promise forever would mean a transient vault
179
- // outage poisoned the client permanently every later operation failing
180
- // with the original error long after the vault recovered — and it would
181
- // make the documented `cache: false` a lie, since the chain would never
182
- // be asked a second time.
177
+ // The promise is cleared on REJECTION, after success when caching is off,
178
+ // and after a MISS however caching is set. Holding a settled promise
179
+ // forever would mean a transient vault outage poisoned the client
180
+ // permanently every later operation failing with the original error long
181
+ // after the vault recovered and it would make the documented
182
+ // `cache: false` a lie, since the chain would never be asked a second time.
183
+ //
184
+ // The MISS rule is sekreto's, not this feature's: `A miss is never cached:
185
+ // the next read asks again`, in sekreto's own source. Retaining a settled
186
+ // miss here would override that from the layer above, and a secret
187
+ // provisioned after startup — a mounted file, a policy granted a minute
188
+ // late — would never be picked up for the life of the client. `cache` is
189
+ // about caching a HIT; it was never a promise to keep saying no.
183
190
  resolve() {
184
191
  if (null == this._resolving) {
185
192
  const inflight = this._resolveonce()
186
193
  .then(
187
- () => {
188
- if (!this._cache) {
194
+ (hit) => {
195
+ if (!this._cache || !hit) {
189
196
  this._resolving = undefined
190
197
  }
191
198
  },
@@ -201,9 +208,12 @@ class SecretsFeature extends BaseFeature {
201
208
  }
202
209
 
203
210
 
211
+ // Resolve once, reporting whether a credential came out of it. That
212
+ // boolean is the whole of what resolve() needs to tell a cacheable HIT
213
+ // from a miss it must not retain.
204
214
  async _resolveonce() {
205
215
  if (null == this._sekreto) {
206
- return
216
+ return false
207
217
  }
208
218
 
209
219
  const found = await this._sekreto.try(this._secretname)
@@ -215,7 +225,7 @@ class SecretsFeature extends BaseFeature {
215
225
  // resolved value lands where the sync auth path already looks.
216
226
  this._client._options.apikey = found
217
227
  }
218
- return
228
+ return undefined !== found
219
229
  }
220
230
 
221
231
  // Exchanging: what the chain resolved is the REFRESH token, kept for
@@ -229,10 +239,23 @@ class SecretsFeature extends BaseFeature {
229
239
  // A starting access token was supplied. Spend it: if it is stale the
230
240
  // API answers 401 and the transport wrapper buys another, which is
231
241
  // the same path expiry takes anyway.
232
- return
242
+ return true
243
+ }
244
+
245
+ // `auth: null` is the documented way to send NO credential, and a
246
+ // purchase is a credential-bearing call: the refresh token goes to the
247
+ // token endpoint in the request body. _withRefresh honours suppression
248
+ // for the RETRY, but it runs after this — by then the refresh token has
249
+ // already left the process, and no later check can call it back. The
250
+ // suppression has to be honoured here, before the first purchase, or it
251
+ // only ever half-held.
252
+ if (null == this._client.options().auth) {
253
+ return false
233
254
  }
234
255
 
235
256
  this._client._options.apikey = await this._buy()
257
+
258
+ return true
236
259
  }
237
260
 
238
261
 
@@ -379,6 +379,71 @@ describe('secrets', () => {
379
379
  })
380
380
 
381
381
 
382
+ // A MISS IS NOT A CACHEABLE ANSWER — sekreto's own rule, which this
383
+ // feature used to override from the layer above.
384
+ //
385
+ // Default caching here, deliberately: `cache: true` is about holding a
386
+ // HIT, and holding the settled promise after a miss meant the chain was
387
+ // never asked again for the life of the client. A secret provisioned
388
+ // after startup (a mounted file, a vault policy granted a minute late)
389
+ // was invisible forever, and the only workaround was giving up hit
390
+ // caching entirely.
391
+ test('active: a MISS is re-asked, so a late secret is picked up',
392
+ async () => {
393
+ let calls = 0
394
+ const sdk = SDK.test({}, {
395
+ feature: {
396
+ secrets: {
397
+ active: true,
398
+ providers: [{
399
+ lookup(_name) {
400
+ calls++
401
+ // Absent on the first ask, present on the second.
402
+ return 1 < calls ? 'LATEKEY' : undefined
403
+ },
404
+ describe() { return 'late:test' },
405
+ }],
406
+ },
407
+ },
408
+ })
409
+
410
+ const first = await sdk.prepare({ path: '/' })
411
+ assert.equal(first.headers['authorization'], undefined,
412
+ 'the first resolve missed, so no credential should go out')
413
+
414
+ const second = await sdk.prepare({ path: '/' })
415
+ credentialIs(second.headers['authorization'], 'LATEKEY')
416
+
417
+ assert.ok(1 < calls,
418
+ 'the chain was asked once and the MISS cached: a secret that ' +
419
+ 'appears later can never be picked up')
420
+ })
421
+
422
+
423
+ // The other half of the same rule: a HIT is still cached by default, so
424
+ // the fix above must not turn every request into a chain walk.
425
+ test('active: a HIT is still cached by default', async () => {
426
+ let calls = 0
427
+ const sdk = SDK.test({}, {
428
+ feature: {
429
+ secrets: {
430
+ active: true,
431
+ providers: [{
432
+ lookup(_name) { calls++; return 'KEY' + calls },
433
+ describe() { return 'counting:test' },
434
+ }],
435
+ },
436
+ },
437
+ })
438
+
439
+ await sdk.prepare({ path: '/' })
440
+ await sdk.prepare({ path: '/' })
441
+
442
+ assert.equal(calls, 1,
443
+ 'a hit must be cached under the default cache: true')
444
+ })
445
+
446
+
382
447
  test('active: secret name is configurable', async () => {
383
448
  process.env[ENVPREFIX + 'API_TOKEN'] = 'TOKKEY01'
384
449
  try {
@@ -861,6 +926,14 @@ describe('secrets exchange', () => {
861
926
  assert.equal(stub.api().length, 1, 'a suppressed request must not be retried')
862
927
  assert.equal(stub.api()[0].auth, undefined,
863
928
  'no credential may be sent when auth is suppressed')
929
+
930
+ // AND NO PURCHASE. This is the half the API-call assertions cannot see:
931
+ // resolve() runs before _withRefresh's suppression check, so the
932
+ // refresh token used to go to the token endpoint in a request body
933
+ // even here. Stopping the retry does not unsend it.
934
+ assert.equal(stub.token().length, 0,
935
+ 'auth: null suppressed the credential but the refresh token was ' +
936
+ 'still POSTed to the exchange endpoint')
864
937
  })
865
938
 
866
939
 
@@ -270,11 +270,19 @@ class SecretsFeature : BaseFeature("secrets", "0.1.0", true) {
270
270
  ctx.utility!!.fetcher = { ctx2, url, fetchdef -> transport(ctx2, url, fetchdef, inner) }
271
271
  }
272
272
 
273
- // One resolution, shared by every concurrent caller. A settled SUCCESS is
273
+ // One resolution, shared by every concurrent caller. A settled HIT is
274
274
  // kept only when caching is on (`cache: false` means every resolve asks
275
275
  // the chain again); a FAILURE is always cleared, so a transient vault
276
276
  // outage never poisons the client permanently - the next operation asks
277
277
  // the chain again.
278
+ //
279
+ // A MISS is cleared too, however caching is set. That rule is sekreto's,
280
+ // not this feature's: `A miss is never cached: the next read asks again`,
281
+ // in sekreto's own source. Keeping a settled miss here would override
282
+ // that from the layer above, and a secret provisioned after startup - a
283
+ // mounted file, a policy granted a minute late - would never be picked up
284
+ // for the life of the client. `cache` is about caching a HIT; it was
285
+ // never a promise to keep saying no.
278
286
  fun resolve() {
279
287
  val ie = this.initerr
280
288
  if (null != ie) {
@@ -311,8 +319,9 @@ class SecretsFeature : BaseFeature("secrets", "0.1.0", true) {
311
319
 
312
320
  val call = mine!!
313
321
  var err: RuntimeException? = null
322
+ var hit = false
314
323
  try {
315
- resolveonce()
324
+ hit = resolveonce()
316
325
  } catch (e: RuntimeException) {
317
326
  err = e
318
327
  } catch (e: Exception) {
@@ -325,7 +334,7 @@ class SecretsFeature : BaseFeature("secrets", "0.1.0", true) {
325
334
  this.lock.withLock {
326
335
  call.err = err
327
336
  call.done = true
328
- if (null != err || !this.cache) {
337
+ if (null != err || !this.cache || !hit) {
329
338
  this.resolving = null
330
339
  }
331
340
  this.settled.signalAll()
@@ -336,8 +345,11 @@ class SecretsFeature : BaseFeature("secrets", "0.1.0", true) {
336
345
  }
337
346
  }
338
347
 
339
- private fun resolveonce() {
340
- val s = this.sek ?: return
348
+ // Resolve once, reporting whether a credential came out of it. That
349
+ // boolean is the whole of what resolve() needs to tell a cacheable HIT
350
+ // from a miss it must not keep.
351
+ private fun resolveonce(): Boolean {
352
+ val s = this.sek ?: return false
341
353
 
342
354
  // A provider ERROR throws out of here and fails the op (via the
343
355
  // transport gate); only a MISS (null) falls through.
@@ -353,7 +365,7 @@ class SecretsFeature : BaseFeature("secrets", "0.1.0", true) {
353
365
  // unreachable.)
354
366
  this.cred = found ?: ""
355
367
  }
356
- return
368
+ return null != found
357
369
  }
358
370
 
359
371
  // Exchanging: what the chain resolved is the REFRESH token, kept for
@@ -376,10 +388,23 @@ class SecretsFeature : BaseFeature("secrets", "0.1.0", true) {
376
388
  // A starting access token was supplied. Spend it: if it is stale the
377
389
  // API answers with an expiry status and the transport wrapper buys
378
390
  // another, which is the same path expiry takes anyway.
379
- return
391
+ return true
392
+ }
393
+
394
+ // `auth: null` is the documented way to send NO credential, and a
395
+ // purchase is a credential-bearing call: the refresh token goes to the
396
+ // token endpoint in the request body. withrefresh honours suppression
397
+ // for the RETRY, but it runs after this - by then the refresh token has
398
+ // already left the process, and no later check can call it back. The
399
+ // suppression has to be honoured here, before the first purchase, or it
400
+ // only ever half-held.
401
+ if (null == this.liveopts["auth"]) {
402
+ return false
380
403
  }
381
404
 
382
405
  buy()
406
+
407
+ return true
383
408
  }
384
409
 
385
410
  // transport wraps whatever transport was current at init.
@@ -449,6 +449,67 @@ class SecretsTest {
449
449
  "a chain MISS must leave the header off, got \"" + w.api()[0].auth + "\"")
450
450
  }
451
451
 
452
+ // A MISS IS NOT A CACHEABLE ANSWER - sekreto's own rule, which this
453
+ // feature used to override from the layer above.
454
+ //
455
+ // DEFAULT caching here, which is the whole point: `cache: true` is about
456
+ // holding a HIT, and keeping the settled resolution after a miss meant
457
+ // the chain was never asked again for the life of the client. A secret
458
+ // provisioned after startup (a mounted file, a vault policy granted a
459
+ // minute late) was invisible forever, and the only workaround was giving
460
+ // up hit caching entirely.
461
+ @Test
462
+ fun aCachedMissIsReasked() {
463
+ var present = false
464
+ var calls = 0
465
+ val w = Wire()
466
+ val client = secretsClient(w, map(
467
+ "feature" to chainOpts(TestProvider({ _ ->
468
+ synchronized(this) {
469
+ calls++
470
+ if (present) "LATEKEY01" else null
471
+ }
472
+ }, "late:test")),
473
+ ))
474
+
475
+ driveEntityOp(client, w)
476
+ val first = w.api()[0]
477
+ assertFalse(first.hasAuth && "" != first.auth,
478
+ "the chain has nothing yet, so no credential should go out")
479
+
480
+ val asked = synchronized(this) { calls }
481
+ assertTrue(0 < asked)
482
+
483
+ // The secret is provisioned while the client is live.
484
+ synchronized(this) { present = true }
485
+
486
+ driveEntityOp(client, w)
487
+ credentialIs(w.api().last().auth, "LATEKEY01")
488
+
489
+ assertTrue(asked < synchronized(this) { calls },
490
+ "the MISS was cached: a secret that appears later can never be picked up")
491
+ }
492
+
493
+ // The other half of the same rule: a HIT is still cached by default, so
494
+ // the fix above must not turn every request into a chain walk.
495
+ @Test
496
+ fun aCachedHitIsKept() {
497
+ var calls = 0
498
+ val w = Wire()
499
+ val client = secretsClient(w, map(
500
+ "feature" to chainOpts(TestProvider({ _ ->
501
+ synchronized(this) { calls++ }
502
+ "STABLEKEY01"
503
+ }, "counting:test")),
504
+ ))
505
+
506
+ driveEntityOp(client, w)
507
+ driveEntityOp(client, w)
508
+
509
+ assertEquals(1, synchronized(this) { calls },
510
+ "a hit must be cached under the default cache: true")
511
+ }
512
+
452
513
  @Test
453
514
  fun authNullSuppressesTheCredentialChainOrNoChain() {
454
515
  val w = Wire()
@@ -1114,6 +1175,14 @@ class SecretsTest {
1114
1175
  assertFalse(w.api()[0].hasAuth,
1115
1176
  "no credential may be sent when auth is suppressed, got \"" +
1116
1177
  w.api()[0].auth + "\"")
1178
+
1179
+ // AND NO PURCHASE. resolve() runs before withrefresh's suppression
1180
+ // check, so the refresh token used to go to the token endpoint in a
1181
+ // request body even here. Stopping the retry does not unsend it, and
1182
+ // only the token endpoint can see this.
1183
+ assertEquals(0, w.token().size,
1184
+ "auth null suppressed the credential but the refresh token was still " +
1185
+ "POSTed to the exchange endpoint")
1117
1186
  }
1118
1187
 
1119
1188
  @Test
@@ -1,13 +1,24 @@
1
1
  .PHONY: test build clean publish
2
2
 
3
- test:
3
+ # NATIVE is the list of compiled artefacts this SDK needs, and it is EMPTY
4
+ # unless a feature says otherwise. A feature that needs a compile step
5
+ # ships a `native.mk` fragment in its own folder, generated by the target's
6
+ # Main component ONLY when the model's choice of that feature's options
7
+ # calls for it, and it adds its artefact to NATIVE and the rule that builds
8
+ # it. No fragment means nothing is compiled and nothing beyond Lua is
9
+ # linked - which is the common case, and why the include is a wildcard
10
+ # rather than a name: this file names no feature.
11
+ NATIVE ?=
12
+ -include $(wildcard feature/*/native.mk)
13
+
14
+ test: build
4
15
  busted -p _test test/
5
16
 
6
- build:
7
- @echo "No build step for Lua"
17
+ build: $(NATIVE)
18
+ @echo "lua: build complete$(if $(NATIVE), ($(NATIVE)),: no compile step)"
8
19
 
9
20
  clean:
10
- @echo "No clean step for Lua"
21
+ @if [ -n "$(NATIVE)" ]; then rm -f $(NATIVE); echo "removed $(NATIVE)"; else echo "No clean step for Lua"; fi
11
22
 
12
23
  # --- Release: publish to LuaRocks -----------------------------------------
13
24
  # Upload the rockspec to LuaRocks, then tag lua/vX.Y.Z. LuaRocks has no boru