@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.
Files changed (376) hide show
  1. package/bin/voxgig-sdkgen +1 -1
  2. package/dist/action/doctor.d.ts +1 -0
  3. package/dist/action/doctor.js +50 -2
  4. package/dist/action/doctor.js.map +1 -1
  5. package/dist/helpers/naming.js +4 -2
  6. package/dist/helpers/naming.js.map +1 -1
  7. package/dist/tsconfig.tsbuildinfo +1 -1
  8. package/model/sdkgen.aon +21 -0
  9. package/package.json +1 -1
  10. package/project/.sdk/model/feature/secrets.aon +120 -18
  11. package/project/.sdk/model/target/c.aon +10 -0
  12. package/project/.sdk/model/target/clojure.aon +13 -0
  13. package/project/.sdk/model/target/cpp.aon +10 -0
  14. package/project/.sdk/model/target/csharp.aon +9 -0
  15. package/project/.sdk/model/target/dart.aon +10 -0
  16. package/project/.sdk/model/target/elixir.aon +9 -0
  17. package/project/.sdk/model/target/go.aon +13 -0
  18. package/project/.sdk/model/target/java.aon +9 -0
  19. package/project/.sdk/model/target/js.aon +7 -0
  20. package/project/.sdk/model/target/kotlin.aon +9 -0
  21. package/project/.sdk/model/target/lean.aon +17 -0
  22. package/project/.sdk/model/target/lua.aon +8 -0
  23. package/project/.sdk/model/target/ocaml.aon +9 -0
  24. package/project/.sdk/model/target/perl.aon +8 -0
  25. package/project/.sdk/model/target/php.aon +8 -0
  26. package/project/.sdk/model/target/py.aon +13 -0
  27. package/project/.sdk/model/target/rb.aon +8 -0
  28. package/project/.sdk/model/target/rust.aon +10 -0
  29. package/project/.sdk/model/target/scala.aon +21 -2
  30. package/project/.sdk/model/target/swift.aon +18 -0
  31. package/project/.sdk/model/target/ts.aon +13 -0
  32. package/project/.sdk/src/cmp/clojure/Package_clojure.ts +9 -2
  33. package/project/.sdk/src/cmp/cpp/Gitignore_cpp.ts +3 -0
  34. package/project/.sdk/src/cmp/dart/Test_dart.ts +2 -0
  35. package/project/.sdk/src/cmp/elixir/Package_elixir.ts +4 -1
  36. package/project/.sdk/src/cmp/go/Config_go.ts +59 -2
  37. package/project/.sdk/src/cmp/go/Main_go.ts +8 -2
  38. package/project/.sdk/src/cmp/java/Test_java.ts +6 -5
  39. package/project/.sdk/src/cmp/kotlin/Test_kotlin.ts +6 -5
  40. package/project/.sdk/src/cmp/lean/Package_lean.ts +23 -0
  41. package/project/.sdk/src/cmp/lean/ReadmeInstall_lean.ts +1 -0
  42. package/project/.sdk/src/cmp/lean/ReadmeTopTest_lean.ts +1 -0
  43. package/project/.sdk/src/cmp/ocaml/Gitignore_ocaml.ts +1 -0
  44. package/project/.sdk/src/cmp/ocaml/Main_ocaml.ts +7 -3
  45. package/project/.sdk/src/cmp/py/Config_py.ts +82 -1
  46. package/project/.sdk/src/cmp/py/Main_py.ts +44 -0
  47. package/project/.sdk/src/cmp/py/fragment/Main.fragment.py +2 -0
  48. package/project/.sdk/src/cmp/swift/Main_swift.ts +10 -0
  49. package/project/.sdk/src/cmp/swift/Package_swift.ts +13 -1
  50. package/project/.sdk/src/cmp/ts/Config_ts.ts +42 -17
  51. package/project/.sdk/src/cmp/ts/fragment/Config.data.fragment.ts +13 -1
  52. package/project/.sdk/src/cmp/ts/fragment/Config.fragment.ts +13 -1
  53. package/project/.sdk/tm/c/Makefile +38 -3
  54. package/project/.sdk/tm/c/tests/omni_resolver.h +361 -0
  55. package/project/.sdk/tm/c/tests/omni_smoke_test.c +237 -0
  56. package/project/.sdk/tm/c/tests/primary_corpus_test.c +205 -284
  57. package/project/.sdk/tm/c/tests/struct_corpus_test.c +292 -212
  58. package/project/.sdk/tm/c/tests/vendor/omni/json.c +811 -0
  59. package/project/.sdk/tm/c/tests/vendor/omni/omni.h +240 -0
  60. package/project/.sdk/tm/c/tests/vendor/omni/runner.c +940 -0
  61. package/project/.sdk/tm/c/tests/vendor/omni/util.c +351 -0
  62. package/project/.sdk/tm/c/utility/struct/utility.c +7 -2
  63. package/project/.sdk/tm/clojure/test/sdk/test/omni.clj +401 -0
  64. package/project/.sdk/tm/clojure/test/sdk/test/omni_smoke.clj +81 -0
  65. package/project/.sdk/tm/clojure/test/sdk/test/primary.clj +92 -58
  66. package/project/.sdk/tm/clojure/test/sdk/test/struct_corpus.clj +122 -149
  67. package/project/.sdk/tm/clojure/test/sdk/test_runner.clj +8 -3
  68. package/project/.sdk/tm/clojure/test/vendor/omni/voxgig/omni/json.clj +145 -0
  69. package/project/.sdk/tm/clojure/test/vendor/omni/voxgig/omni/runner.clj +445 -0
  70. package/project/.sdk/tm/clojure/test/vendor/omni/voxgig/omni/util.clj +145 -0
  71. package/project/.sdk/tm/cpp/Makefile +5 -1
  72. package/project/.sdk/tm/cpp/test/omni_resolver.hpp +473 -0
  73. package/project/.sdk/tm/cpp/test/omni_smoke_test.cpp +209 -0
  74. package/project/.sdk/tm/cpp/test/primary_utility_test.cpp +243 -184
  75. package/project/.sdk/tm/cpp/test/runner_support.hpp +68 -181
  76. package/project/.sdk/tm/cpp/test/struct_corpus_test.cpp +183 -56
  77. package/project/.sdk/tm/cpp/test/vendor/omni/json.hpp +406 -0
  78. package/project/.sdk/tm/cpp/test/vendor/omni/omni.hpp +751 -0
  79. package/project/.sdk/tm/cpp/test/vendor/omni/util.hpp +256 -0
  80. package/project/.sdk/tm/cpp/utility/pipeline.hpp +7 -1
  81. package/project/.sdk/tm/csharp/test/OmniResolver.cs +491 -0
  82. package/project/.sdk/tm/csharp/test/OmniSmokeTest.cs +106 -0
  83. package/project/.sdk/tm/csharp/test/PrimaryUtilityTest.cs +299 -316
  84. package/project/.sdk/tm/csharp/test/Runner.cs +104 -269
  85. package/project/.sdk/tm/csharp/test/StructUtilityTest.cs +535 -724
  86. package/project/.sdk/tm/csharp/test/vendor/omni/Runner.cs +864 -0
  87. package/project/.sdk/tm/csharp/test/vendor/omni/Util.cs +347 -0
  88. package/project/.sdk/tm/csharp/utility/MakeSpec.cs +3 -1
  89. package/project/.sdk/tm/csharp/utility/PrepareMethod.cs +6 -1
  90. package/project/.sdk/tm/csharp/utility/struct/Struct.cs +21 -5
  91. package/project/.sdk/tm/dart/test/omni.dart +520 -0
  92. package/project/.sdk/tm/dart/test/omni_smoke_test.dart +143 -0
  93. package/project/.sdk/tm/dart/test/primary_test.dart +86 -28
  94. package/project/.sdk/tm/dart/test/struct_test.dart +438 -11
  95. package/project/.sdk/tm/dart/test/vendor/omni/omni.dart +7 -0
  96. package/project/.sdk/tm/dart/test/vendor/omni/runner.dart +653 -0
  97. package/project/.sdk/tm/dart/test/vendor/omni/util.dart +232 -0
  98. package/project/.sdk/tm/elixir/Makefile +11 -3
  99. package/project/.sdk/tm/elixir/test/omni_smoke_test.exs +117 -0
  100. package/project/.sdk/tm/elixir/test/primary_utility_test.exs +341 -16
  101. package/project/.sdk/tm/elixir/test/struct_corpus_test.exs +554 -9
  102. package/project/.sdk/tm/elixir/test/support/omni.ex +377 -0
  103. package/project/.sdk/tm/elixir/test/vendor/omni/json.ex +122 -0
  104. package/project/.sdk/tm/elixir/test/vendor/omni/runner.ex +623 -0
  105. package/project/.sdk/tm/elixir/test/vendor/omni/util.ex +187 -0
  106. package/project/.sdk/tm/go/core/context.go +32 -16
  107. package/project/.sdk/tm/go/feature/secrets/plugin/capability.go +261 -0
  108. package/project/.sdk/tm/go/feature/secrets/plugin/catalog.go +78 -0
  109. package/project/.sdk/tm/go/feature/secrets/plugin/config.go +652 -0
  110. package/project/.sdk/tm/go/feature/secrets/plugin/depend.go +250 -0
  111. package/project/.sdk/tm/go/feature/secrets/plugin/env.go +194 -0
  112. package/project/.sdk/tm/go/feature/secrets/plugin/export.go +80 -0
  113. package/project/.sdk/tm/go/feature/secrets/plugin/graph.go +238 -0
  114. package/project/.sdk/tm/go/feature/secrets/plugin/host.go +1575 -0
  115. package/project/.sdk/tm/go/feature/secrets/plugin/order.go +248 -0
  116. package/project/.sdk/tm/go/feature/secrets/plugin/point.go +184 -0
  117. package/project/.sdk/tm/go/feature/secrets/plugin/ref.go +123 -0
  118. package/project/.sdk/tm/go/feature/secrets/plugin/resolve.go +79 -0
  119. package/project/.sdk/tm/go/feature/secrets/plugin/types.go +296 -0
  120. package/project/.sdk/tm/go/feature/secrets/plugin/util.go +87 -0
  121. package/project/.sdk/tm/go/feature/secrets/plugin/version.go +161 -0
  122. package/project/.sdk/tm/go/feature/secrets/plugins/aws/aws.go +292 -0
  123. package/project/.sdk/tm/go/feature/secrets/plugins/aws/sigv4.go +201 -0
  124. package/project/.sdk/tm/go/feature/secrets/plugins/azuresecrets/azuresecrets.go +187 -0
  125. package/project/.sdk/tm/go/feature/secrets/plugins/boru/boru.go +184 -0
  126. package/project/.sdk/tm/go/feature/secrets/plugins/doppler/doppler.go +114 -0
  127. package/project/.sdk/tm/go/feature/secrets/plugins/gcpsecrets/gcpsecrets.go +156 -0
  128. package/project/.sdk/tm/go/feature/secrets/plugins/hashicorp/hashicorp.go +209 -0
  129. package/project/.sdk/tm/go/feature/secrets/plugins/httpjson/httpjson.go +241 -0
  130. package/project/.sdk/tm/go/feature/secrets/plugins/infisical/infisical.go +151 -0
  131. package/project/.sdk/tm/go/feature/secrets/plugins/onepassword/onepassword.go +152 -0
  132. package/project/.sdk/tm/go/feature/secrets/plugins/secretspec/secretspec.go +143 -0
  133. package/project/.sdk/tm/go/feature/secrets/sekreto/addr.go +120 -0
  134. package/project/.sdk/tm/go/feature/secrets/sekreto/providers.go +439 -0
  135. package/project/.sdk/tm/go/feature/secrets/sekreto/sekreto.go +685 -0
  136. package/project/.sdk/tm/go/feature/secrets_feature.go +675 -0
  137. package/project/.sdk/tm/go/src/feature/secrets/.gitkeep +0 -0
  138. package/project/.sdk/tm/go/test/feature/secrets/secrets_feature_test.go +799 -0
  139. package/project/.sdk/tm/go/test/omni/omni.go +897 -0
  140. package/project/.sdk/tm/go/test/omni/util.go +360 -0
  141. package/project/.sdk/tm/go/test/omniresolver_test.go +748 -0
  142. package/project/.sdk/tm/go/test/omnismoke_test.go +112 -0
  143. package/project/.sdk/tm/go/test/primary_utility_test.go +123 -191
  144. package/project/.sdk/tm/go/test/struct_utility_test.go +323 -16
  145. package/project/.sdk/tm/go/test/testsupport_test.go +294 -0
  146. package/project/.sdk/tm/go/utility/make_options.go +8 -1
  147. package/project/.sdk/tm/go/utility/prepare_method.go +5 -1
  148. package/project/.sdk/tm/go/utility/struct/voxgigstruct.go +2 -2
  149. package/project/.sdk/tm/java/test/OmniResolver.java +355 -0
  150. package/project/.sdk/tm/java/test/OmniSmokeTest.java +99 -0
  151. package/project/.sdk/tm/java/test/PrimaryUtilityTest.java +254 -280
  152. package/project/.sdk/tm/java/test/RunnerSupport.java +9 -194
  153. package/project/.sdk/tm/java/test/StructCorpusTest.java +119 -42
  154. package/project/.sdk/tm/java/test/vendor/omni/Json.java +287 -0
  155. package/project/.sdk/tm/java/test/vendor/omni/Runner.java +851 -0
  156. package/project/.sdk/tm/java/test/vendor/omni/Util.java +322 -0
  157. package/project/.sdk/tm/java/utility/MakeSpec.java +3 -1
  158. package/project/.sdk/tm/java/utility/PrepareMethod.java +5 -5
  159. package/project/.sdk/tm/java/utility/struct/Struct.java +17 -4
  160. package/project/.sdk/tm/js/src/utility/StructUtility.js +3 -3
  161. package/project/.sdk/tm/js/test/omni.js +251 -0
  162. package/project/.sdk/tm/js/test/omni.test.js +105 -0
  163. package/project/.sdk/tm/js/test/utility/PrimaryUtility.test.js +6 -2
  164. package/project/.sdk/tm/js/test/utility/StructUtility.test.js +27 -2
  165. package/project/.sdk/tm/js/test/vendor/omni/index.js +77 -0
  166. package/project/.sdk/tm/js/test/vendor/omni/runner.js +613 -0
  167. package/project/.sdk/tm/js/test/vendor/omni/util.js +212 -0
  168. package/project/.sdk/tm/kotlin/core/Utility.kt +1 -1
  169. package/project/.sdk/tm/kotlin/test/OmniResolver.kt +343 -0
  170. package/project/.sdk/tm/kotlin/test/OmniSmokeTest.kt +100 -0
  171. package/project/.sdk/tm/kotlin/test/PrimaryUtilityTest.kt +244 -262
  172. package/project/.sdk/tm/kotlin/test/RunnerSupport.kt +9 -178
  173. package/project/.sdk/tm/kotlin/test/StructCorpusTest.kt +121 -32
  174. package/project/.sdk/tm/kotlin/test/vendor/omni/Json.kt +264 -0
  175. package/project/.sdk/tm/kotlin/test/vendor/omni/Runner.kt +615 -0
  176. package/project/.sdk/tm/kotlin/test/vendor/omni/Util.kt +139 -0
  177. package/project/.sdk/tm/kotlin/utility/MakeSpecUrl.kt +6 -3
  178. package/project/.sdk/tm/kotlin/utility/Prepare.kt +6 -6
  179. package/project/.sdk/tm/kotlin/utility/struct/Struct.kt +18 -2
  180. package/project/.sdk/tm/lean/Makefile +12 -5
  181. package/project/.sdk/tm/lean/src/SdkUtility.lean +14 -1
  182. package/project/.sdk/tm/lean/test/OmniResolver.lean +358 -0
  183. package/project/.sdk/tm/lean/test/OmniSmoke.lean +174 -0
  184. package/project/.sdk/tm/lean/test/StructCorpus.lean +245 -574
  185. package/project/.sdk/tm/lean/test/TPrimaryUtility.lean +155 -291
  186. package/project/.sdk/tm/lean/test/vendor/omni/Omni.lean +997 -0
  187. package/project/.sdk/tm/lua/test/omni.lua +456 -0
  188. package/project/.sdk/tm/lua/test/omni_smoke_test.lua +103 -0
  189. package/project/.sdk/tm/lua/test/primary_utility_test.lua +250 -509
  190. package/project/.sdk/tm/lua/test/struct_utility_test.lua +161 -70
  191. package/project/.sdk/tm/lua/test/vendor/omni/json.lua +268 -0
  192. package/project/.sdk/tm/lua/test/vendor/omni/regex.lua +385 -0
  193. package/project/.sdk/tm/lua/test/vendor/omni/runner.lua +641 -0
  194. package/project/.sdk/tm/lua/test/vendor/omni/util.lua +282 -0
  195. package/project/.sdk/tm/lua/utility/prepare_method.lua +5 -1
  196. package/project/.sdk/tm/lua/utility/struct/regex.lua +663 -0
  197. package/project/.sdk/tm/lua/utility/struct/struct.lua +660 -420
  198. package/project/.sdk/tm/ocaml/Makefile +37 -12
  199. package/project/.sdk/tm/ocaml/test/omni_resolver.ml +284 -0
  200. package/project/.sdk/tm/ocaml/test/omni_smoke_test.ml +169 -0
  201. package/project/.sdk/tm/ocaml/test/primary_utility_test.ml +84 -100
  202. package/project/.sdk/tm/ocaml/test/struct_corpus.ml +225 -201
  203. package/project/.sdk/tm/ocaml/test/vendor/omni/omni.ml +1157 -0
  204. package/project/.sdk/tm/perl/lib/Voxgig/Struct.pm +88 -12
  205. package/project/.sdk/tm/perl/t/omni.pm +647 -0
  206. package/project/.sdk/tm/perl/t/omni_smoke.t +87 -0
  207. package/project/.sdk/tm/perl/t/primary_utility.t +189 -487
  208. package/project/.sdk/tm/perl/t/struct_utility.t +455 -389
  209. package/project/.sdk/tm/perl/t/vendor/omni/Voxgig/Omni/Runner.pm +649 -0
  210. package/project/.sdk/tm/perl/t/vendor/omni/Voxgig/Omni/Util.pm +253 -0
  211. package/project/.sdk/tm/perl/t/vendor/omni/Voxgig/Omni.pm +24 -0
  212. package/project/.sdk/tm/perl/utility/prepare_method.pm +7 -2
  213. package/project/.sdk/tm/php/test/Omni.php +691 -0
  214. package/project/.sdk/tm/php/test/OmniSmokeTest.php +93 -0
  215. package/project/.sdk/tm/php/test/PrimaryUtilityTest.php +210 -571
  216. package/project/.sdk/tm/php/test/StructUtilityTest.php +320 -342
  217. package/project/.sdk/tm/php/test/vendor/omni/Runner.php +644 -0
  218. package/project/.sdk/tm/php/test/vendor/omni/Util.php +283 -0
  219. package/project/.sdk/tm/php/utility/MakeSpec.php +10 -3
  220. package/project/.sdk/tm/php/utility/PrepareBody.php +7 -1
  221. package/project/.sdk/tm/php/utility/PrepareMethod.php +6 -2
  222. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/__init__.py +36 -0
  223. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/capability.py +141 -0
  224. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/catalog.py +50 -0
  225. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/config.py +333 -0
  226. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/depend.py +198 -0
  227. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/env.py +147 -0
  228. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/export.py +52 -0
  229. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/graph.py +139 -0
  230. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/host.py +1053 -0
  231. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/order.py +171 -0
  232. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/point.py +95 -0
  233. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/ref.py +116 -0
  234. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/resolve.py +59 -0
  235. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/types.py +87 -0
  236. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/version.py +112 -0
  237. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/__init__.py +74 -0
  238. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/addr.py +116 -0
  239. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/aws.py +192 -0
  240. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/azuresecrets.py +120 -0
  241. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/boru.py +140 -0
  242. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/doppler.py +62 -0
  243. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/gcpsecrets.py +101 -0
  244. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/hashicorp.py +152 -0
  245. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/httpjson.py +115 -0
  246. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/infisical.py +92 -0
  247. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/onepassword.py +101 -0
  248. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/secretspec.py +119 -0
  249. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/sigv4.py +125 -0
  250. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/providers.py +211 -0
  251. package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/sekreto.py +455 -0
  252. package/project/.sdk/tm/py/pkg/feature/secrets_feature.py +467 -0
  253. package/project/.sdk/tm/py/pkg/utility/prepare_method.py +5 -1
  254. package/project/.sdk/tm/py/pkg/utility/voxgig_struct/__init__.py +0 -2
  255. package/project/.sdk/tm/py/pkg/utility/voxgig_struct/voxgig_struct.py +780 -529
  256. package/project/.sdk/tm/py/src/feature/secrets/.gitkeep +0 -0
  257. package/project/.sdk/tm/py/test/feature/__init__.py +0 -0
  258. package/project/.sdk/tm/py/test/feature/secrets/__init__.py +0 -0
  259. package/project/.sdk/tm/py/test/feature/secrets/test_secrets.py +337 -0
  260. package/project/.sdk/tm/py/test/omni.py +415 -0
  261. package/project/.sdk/tm/py/test/test_omni_smoke.py +74 -0
  262. package/project/.sdk/tm/py/test/test_primary_utility.py +144 -668
  263. package/project/.sdk/tm/py/test/test_struct_utility.py +74 -27
  264. package/project/.sdk/tm/py/test/voxgig_omni/__init__.py +62 -0
  265. package/project/.sdk/tm/py/test/voxgig_omni/runner.py +566 -0
  266. package/project/.sdk/tm/py/test/voxgig_omni/util.py +237 -0
  267. package/project/.sdk/tm/rb/test/omni.rb +505 -0
  268. package/project/.sdk/tm/rb/test/omni_smoke_test.rb +72 -0
  269. package/project/.sdk/tm/rb/test/primary_utility_test.rb +174 -560
  270. package/project/.sdk/tm/rb/test/struct_utility_test.rb +13 -7
  271. package/project/.sdk/tm/rb/test/vendor/omni/runner.rb +493 -0
  272. package/project/.sdk/tm/rb/test/vendor/omni/util.rb +199 -0
  273. package/project/.sdk/tm/rb/test/vendor/omni/voxgig_omni.rb +15 -0
  274. package/project/.sdk/tm/rb/utility/prepare_method.rb +5 -1
  275. package/project/.sdk/tm/rust/tests/common/mod.rs +19 -242
  276. package/project/.sdk/tm/rust/tests/omni_resolver/mod.rs +888 -0
  277. package/project/.sdk/tm/rust/tests/omni_smoke_test.rs +286 -0
  278. package/project/.sdk/tm/rust/tests/primary_utility_test.rs +318 -312
  279. package/project/.sdk/tm/rust/tests/struct_utility_test.rs +66 -28
  280. package/project/.sdk/tm/rust/tests/vendor/omni/json.rs +412 -0
  281. package/project/.sdk/tm/rust/tests/vendor/omni/mod.rs +38 -0
  282. package/project/.sdk/tm/rust/tests/vendor/omni/regex.rs +392 -0
  283. package/project/.sdk/tm/rust/tests/vendor/omni/runner.rs +1001 -0
  284. package/project/.sdk/tm/rust/tests/vendor/omni/util.rs +161 -0
  285. package/project/.sdk/tm/rust/utility/prepare_method.rs +5 -1
  286. package/project/.sdk/tm/scala/Makefile +16 -6
  287. package/project/.sdk/tm/scala/sdktest/OmniResolver.scala +497 -0
  288. package/project/.sdk/tm/scala/sdktest/OmniSmoke.scala +192 -0
  289. package/project/.sdk/tm/scala/sdktest/PrimaryCorpus.scala +47 -19
  290. package/project/.sdk/tm/scala/sdktest/StructCorpus.scala +0 -0
  291. package/project/.sdk/tm/scala/sdktest/vendor/omni/Json.scala +229 -0
  292. package/project/.sdk/tm/scala/sdktest/vendor/omni/Runner.scala +552 -0
  293. package/project/.sdk/tm/scala/sdktest/vendor/omni/Util.scala +104 -0
  294. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/Constants.swift +10 -0
  295. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/Inject.swift +28 -5
  296. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/Injection.swift +5 -1
  297. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/Minor.swift +4 -1
  298. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/Validate.swift +15 -5
  299. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/utility/Prepare.swift +6 -1
  300. package/project/.sdk/tm/swift/Tests/ProjectNameSDKTests/OmniResolver.swift +474 -0
  301. package/project/.sdk/tm/swift/Tests/ProjectNameSDKTests/OmniSmokeTest.swift +107 -0
  302. package/project/.sdk/tm/swift/Tests/ProjectNameSDKTests/PrimaryUtilityTest.swift +141 -178
  303. package/project/.sdk/tm/swift/Tests/ProjectNameSDKTests/Runner.swift +17 -113
  304. package/project/.sdk/tm/swift/Tests/ProjectNameSDKTests/StructUtilityTest.swift +295 -446
  305. package/project/.sdk/tm/swift/Tests/vendor/omni/Json.swift +364 -0
  306. package/project/.sdk/tm/swift/Tests/vendor/omni/Runner.swift +730 -0
  307. package/project/.sdk/tm/swift/Tests/vendor/omni/Util.swift +162 -0
  308. package/project/.sdk/tm/ts/src/feature/secrets/SecretsFeature.ts +7 -0
  309. package/project/.sdk/tm/ts/src/feature/secrets/plugin/Capability.ts +148 -0
  310. package/project/.sdk/tm/ts/src/feature/secrets/plugin/Catalog.ts +55 -0
  311. package/project/.sdk/tm/ts/src/feature/secrets/plugin/Config.ts +344 -0
  312. package/project/.sdk/tm/ts/src/feature/secrets/plugin/Depend.ts +205 -0
  313. package/project/.sdk/tm/ts/src/feature/secrets/plugin/Env.ts +138 -0
  314. package/project/.sdk/tm/ts/src/feature/secrets/plugin/Export.ts +46 -0
  315. package/project/.sdk/tm/ts/src/feature/secrets/plugin/FeatureHost.ts +349 -0
  316. package/project/.sdk/tm/ts/src/feature/secrets/plugin/Graph.ts +181 -0
  317. package/project/.sdk/tm/ts/src/feature/secrets/plugin/Host.ts +1132 -0
  318. package/project/.sdk/tm/ts/src/feature/secrets/plugin/Order.ts +177 -0
  319. package/project/.sdk/tm/ts/src/feature/secrets/plugin/Point.ts +119 -0
  320. package/project/.sdk/tm/ts/src/feature/secrets/plugin/Ref.ts +102 -0
  321. package/project/.sdk/tm/ts/src/feature/secrets/plugin/Resolve.ts +61 -0
  322. package/project/.sdk/tm/ts/src/feature/secrets/plugin/Types.ts +112 -0
  323. package/project/.sdk/tm/ts/src/feature/secrets/plugin/Version.ts +100 -0
  324. package/project/.sdk/tm/ts/src/feature/secrets/plugin/index.ts +37 -0
  325. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/Sekreto.ts +163 -30
  326. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/index.ts +27 -22
  327. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/{provider → plugins}/aws.ts +26 -36
  328. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/{provider → plugins}/azuresecrets.ts +19 -21
  329. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/{provider → plugins}/boru.ts +36 -17
  330. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/{provider → plugins}/doppler.ts +14 -21
  331. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/{provider → plugins}/gcpsecrets.ts +27 -27
  332. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/{provider → plugins}/hashicorp.ts +25 -39
  333. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/plugins/httpjson.ts +99 -0
  334. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/{provider → plugins}/infisical.ts +14 -16
  335. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/{provider → plugins}/onepassword.ts +15 -22
  336. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/plugins/secretspec.ts +98 -0
  337. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/{Sigv4.ts → plugins/sigv4.ts} +7 -6
  338. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/addr.ts +97 -23
  339. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/builtin.ts +37 -0
  340. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/dotenv.ts +4 -17
  341. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/env.ts +4 -16
  342. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/file.ts +11 -25
  343. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/memory.ts +6 -23
  344. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/support.ts +106 -39
  345. package/project/.sdk/tm/ts/src/utility/StructUtility.ts +3 -3
  346. package/project/.sdk/tm/ts/test/omni.ts +104 -32
  347. package/project/.sdk/tm/ts/test/utility/StructUtility.test.ts +27 -0
  348. package/project/.sdk/tm/ts/test/vendor/omni/Runner.ts +32 -5
  349. package/project/.sdk/tm/ts/test/vendor/omni/Util.ts +2 -2
  350. package/project/.sdk/tm/ts/test/vendor/omni/index.ts +2 -2
  351. package/project/.sdk/tm/zig/test/primary_utility_test.zig +1 -1
  352. package/project/.sdk/tm/zig/test/struct_runner.zig +5 -4
  353. package/project/sdkgen-package.json +1 -1
  354. package/src/action/doctor.ts +66 -2
  355. package/src/helpers/naming.ts +4 -2
  356. package/project/.sdk/tm/c/tests/runner.h +0 -274
  357. package/project/.sdk/tm/cpp/test/struct_runner.hpp +0 -314
  358. package/project/.sdk/tm/csharp/test/StructRunner.cs +0 -276
  359. package/project/.sdk/tm/dart/test/runner.dart +0 -406
  360. package/project/.sdk/tm/dart/test/struct_corpus.dart +0 -531
  361. package/project/.sdk/tm/elixir/test/support/struct_corpus.ex +0 -1088
  362. package/project/.sdk/tm/go/test/runner_test.go +0 -629
  363. package/project/.sdk/tm/go/test/struct_runner_test.go +0 -1094
  364. package/project/.sdk/tm/java/test/StructRunner.java +0 -281
  365. package/project/.sdk/tm/js/test/runner.js +0 -387
  366. package/project/.sdk/tm/kotlin/test/StructRunner.kt +0 -177
  367. package/project/.sdk/tm/lua/test/struct_runner.lua +0 -602
  368. package/project/.sdk/tm/ocaml/test/corpus_runner.ml +0 -185
  369. package/project/.sdk/tm/perl/t/struct_runner.pm +0 -275
  370. package/project/.sdk/tm/php/test/StructRunner.php +0 -275
  371. package/project/.sdk/tm/py/test/struct_runner.py +0 -411
  372. package/project/.sdk/tm/rb/test/struct_runner.rb +0 -309
  373. package/project/.sdk/tm/rust/tests/struct_runner/mod.rs +0 -424
  374. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/Registry.ts +0 -90
  375. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/http.ts +0 -66
  376. package/project/.sdk/tm/ts/test/vendor/omni/compat.ts +0 -188
@@ -0,0 +1,344 @@
1
+ // VENDORED: @voxgig/plugin 0.1.6 (typescript/src/Config.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 declarative document (§9): normalization, and the ten-level
5
+ * precedence ladder.
6
+ *
7
+ * TWO FUNCTIONS, AND THE SPLIT BETWEEN THEM IS FORCED.
8
+ *
9
+ * `normalizeconfig` normalizes STRUCTURE and ENTRY KEYS. It does not
10
+ * merge options, and cannot: §9.4 makes merge behaviour a property of
11
+ * the definition's option SHAPE, which normalization has never seen. A
12
+ * normalizer that flattened the option layers would make
13
+ * `$MERGE: append` unimplementable at load time, because the layers it
14
+ * must concatenate would already be collapsed.
15
+ *
16
+ * `resolveoptions` applies the ladder, and it is the only place that
17
+ * knows the shape. */
18
+
19
+ import { Normalized, Instance, fail } from './Types'
20
+ import { canonref, parseref } from './Ref'
21
+
22
+ // ---------------------------------------------------------------------
23
+ // normalizeconfig
24
+ // ---------------------------------------------------------------------
25
+
26
+ export type NormalizeInput = {
27
+ doc: any
28
+ profile?: string
29
+ /** §9.1: a host may rename `instance` and `default` into its own
30
+ * vocabulary. */
31
+ keys?: { instance?: string, default?: string }
32
+ /** §9.1: refs the host declares itself and always wins on. */
33
+ reserved?: string[]
34
+ }
35
+
36
+ export function normalizeconfig(input: NormalizeInput): Normalized {
37
+ const doc = (input && input.doc) || {}
38
+ const keys = (input && input.keys) || {}
39
+ const ikey = keys.instance || 'instance'
40
+ const dkey = keys.default || 'default'
41
+ const reserved = (input && input.reserved) || []
42
+ const profile = input && input.profile
43
+
44
+ // The rename is applied at TWO PLACES AND NO OTHERS: the document
45
+ // root, and every profile.<name> overlay root (§9.1). A rename applied
46
+ // only at the root would leave `profile.prod.sdk` untranslated and
47
+ // silently drop every environment override the host depends on.
48
+ // Recursing further would be worse: option data is the definition's.
49
+ const baseinst = doc[ikey]
50
+ const basedef = doc[dkey] || {}
51
+
52
+ const overlay = profile && doc.profile && doc.profile[profile]
53
+ const overinst = overlay ? overlay[ikey] : undefined
54
+ const overdef = (overlay && overlay[dkey]) || {}
55
+
56
+ // Entry layers, base then overlay, each as {ref -> entry} plus the
57
+ // order the form implies.
58
+ const base = entries(baseinst)
59
+ const over = entries(overinst)
60
+
61
+ for (const r of Object.keys(base.map)) checkreserved(r, reserved)
62
+ for (const r of Object.keys(over.map)) checkreserved(r, reserved)
63
+ for (const n of Object.keys(basedef)) checkreserved(n, reserved)
64
+ for (const n of Object.keys(overdef)) checkreserved(n, reserved)
65
+
66
+ // A PARTIAL ARRAY IS NOT A FILTER (§9.1). sdkgen learned this the hard
67
+ // way: deriving order from a partial array silently dropped
68
+ // config-activated features. Refs in the base but absent from the
69
+ // overlay still load, in sorted position AFTER the listed ones. A
70
+ // profile may also INTRODUCE a ref the base never declared.
71
+ const order: string[] = []
72
+ for (const r of over.order) if (-1 === order.indexOf(r)) order.push(r)
73
+ // The remainder keeps the BASE's own order — array position for the
74
+ // array form, sorted refs for the map form. Re-sorting here would
75
+ // discard an array document's positional order entirely, which is the
76
+ // one thing the array form exists to express.
77
+ for (const r of base.order) if (-1 === order.indexOf(r)) order.push(r)
78
+
79
+ const instance: { [ref: string]: Instance } = {}
80
+ for (let i = 0; i < order.length; i++) {
81
+ const ref = order[i]
82
+ const b = base.map[ref]
83
+ const o = over.map[ref]
84
+
85
+ // MERGE THE ENTRIES AS AUTHORED, THEN APPLY DEFAULTS TO THE RESULT
86
+ // (§9.3). A safety rule, not a tidiness one: if the overlay had its
87
+ // defaults filled in before merging it would carry a synthesized
88
+ // active:true and overwrite a base's false — silently re-enabling a
89
+ // deliberately disabled integration in production.
90
+ const active = pick(o, 'active', pick(b, 'active', true))
91
+ const start = pick(o, 'start', pick(b, 'start', 'eager'))
92
+ const ord = pick(o, 'order', pick(b, 'order', undefined))
93
+
94
+ // Option layers, levels 3-6, IN LADDER ORDER. Never merged here.
95
+ const layers: any[] = []
96
+ const nm = parseref(ref).name
97
+ if (basedef[nm] && undefined !== basedef[nm].options) layers.push(basedef[nm].options)
98
+ if (b && undefined !== b.options) layers.push(b.options)
99
+ if (overdef[nm] && undefined !== overdef[nm].options) layers.push(overdef[nm].options)
100
+ if (o && undefined !== o.options) layers.push(o.options)
101
+
102
+ const ent: Instance = { pos: i, active, start, optionlayers: layers }
103
+ if (undefined !== ord) ent.order = ord
104
+ instance[ref] = ent
105
+ }
106
+
107
+ // `default` DECLARES NOTHING (§9.3). It is a base for every instance
108
+ // of that definition; it does not create one, and an entry for a name
109
+ // with no instances is inert rather than an error — which is what
110
+ // makes a shared library of defaults shippable.
111
+ const defout: { [name: string]: any } = {}
112
+ for (const n of Object.keys(basedef)) defout[n] = basedef[n]
113
+ for (const n of Object.keys(overdef)) defout[n] = overdef[n]
114
+
115
+ return { instance, order, default: defout }
116
+ }
117
+
118
+ /** Byte-wise, NOT locale-aware and NOT case-folded. All-lowercase refs
119
+ * sort identically under all three, so only mixed input discriminates:
120
+ * '@' is 0x40, uppercase 0x41-0x5A, lowercase 0x61-0x7A. */
121
+ function bytewise(a: string, b: string): number {
122
+ return a < b ? -1 : a > b ? 1 : 0
123
+ }
124
+
125
+ function pick(src: any, key: string, dflt: any): any {
126
+ return src && undefined !== src[key] ? src[key] : dflt
127
+ }
128
+
129
+ /** Both document forms reduce to {ref -> entry} plus the order the form
130
+ * implies: array POSITION for the array form, sorted refs for the map
131
+ * form. */
132
+ function entries(src: any): { map: { [ref: string]: any }, order: string[] } {
133
+ const map: { [ref: string]: any } = {}
134
+ const order: string[] = []
135
+ if (null == src) return { map, order }
136
+
137
+ if (Array.isArray(src)) {
138
+ for (const item of src) {
139
+ const ref = canonref(item.ref)
140
+ map[ref] = item
141
+ order.push(ref)
142
+ }
143
+ }
144
+ else {
145
+ // Map-form refs arrive as KEYS, through a different path than an
146
+ // array element's `ref` field — and must canonicalize the same way.
147
+ for (const key of Object.keys(src)) {
148
+ map[canonref(key)] = src[key]
149
+ }
150
+ order.push(...Object.keys(map).sort(bytewise))
151
+ }
152
+ return { map, order }
153
+ }
154
+
155
+ /** §9.1: reservation is all-or-nothing per NAME, so the tagged forms go
156
+ * too. A configuration surface that can disable the thing reading it is
157
+ * not a surface, it is a trap. */
158
+ function checkreserved(ref: string, reserved: string[]): void {
159
+ if (0 === reserved.length) return
160
+ const name = parseref(ref).name
161
+ if (-1 !== reserved.indexOf(name)) {
162
+ fail('plugin_ref_reserved', 'ref is reserved by the host: ' + ref, { ref })
163
+ }
164
+ }
165
+
166
+ // ---------------------------------------------------------------------
167
+ // resolveoptions — §9.3's ten levels, and §9.4's merge directives
168
+ // ---------------------------------------------------------------------
169
+
170
+ export type ResolveInput = {
171
+ ref: string
172
+ /** Level 1 — the definition's option shape. Also carries the $MERGE
173
+ * directives, which is why merging cannot happen without it. */
174
+ shape?: any
175
+ hostdefaults?: any // 2
176
+ doc?: any // 3-6
177
+ profile?: string
178
+ env?: any // 7
179
+ hostoptions?: any // 8
180
+ loadoptions?: any // 9
181
+ patch?: any // 10
182
+ }
183
+
184
+ export function resolveoptions(input: ResolveInput): any {
185
+ const shape = input.shape || {}
186
+ checkshape(shape)
187
+
188
+ const ref = canonref(input.ref)
189
+ const name = parseref(ref).name
190
+ const doc = input.doc || {}
191
+ const overlay = input.profile && doc.profile && doc.profile[input.profile]
192
+
193
+ // ONE ordered merge, lowest to highest. Levels 3-6 are not two
194
+ // namespaces collapsed separately and composed afterwards: that
195
+ // inverts the rule that PROFILE SPECIFICITY OUTRANKS DEFINITION
196
+ // SPECIFICITY, so a prod per-definition default would lose to a base
197
+ // instance value.
198
+ const layers = [
199
+ defaultsof(shape), // 1
200
+ input.hostdefaults, // 2
201
+ optsof(doc.default, name), // 3
202
+ optsof(doc.instance, ref), // 4
203
+ optsof(overlay && overlay.default, name), // 5
204
+ optsof(overlay && overlay.instance, ref), // 6
205
+ input.env, // 7
206
+ input.hostoptions, // 8
207
+ input.loadoptions, // 9
208
+ input.patch, // 10
209
+ ]
210
+
211
+ let out: any = {}
212
+ for (const layer of layers) {
213
+ if (null == layer) continue
214
+ out = mergeone(out, layer, shape)
215
+ }
216
+ return out
217
+ }
218
+
219
+ /** The shape's non-directive values are the level-1 defaults. */
220
+ function defaultsof(shape: any): any {
221
+ const out: any = {}
222
+ for (const k of Object.keys(shape)) {
223
+ const v = shape[k]
224
+ if (v && 'object' === typeof v && !Array.isArray(v) && undefined !== v.$MERGE) continue
225
+ out[k] = v
226
+ }
227
+ return out
228
+ }
229
+
230
+ function optsof(src: any, key: string): any {
231
+ if (null == src) return undefined
232
+ // The array form is equivalent to the map form (§9.1).
233
+ if (Array.isArray(src)) {
234
+ for (const item of src) {
235
+ if (canonref(item.ref) === key) return item.options
236
+ }
237
+ return undefined
238
+ }
239
+ for (const k of Object.keys(src)) {
240
+ if (canonref(k) === key) return src[k].options
241
+ }
242
+ return undefined
243
+ }
244
+
245
+ /** Merge ONE layer onto the accumulator, honouring the shape's
246
+ * directives. The directive holds at EVERY precedence level, not only
247
+ * between document levels — §9.4 makes it a property of the shape,
248
+ * which does not know which layer a value arrived from. */
249
+ function mergeone(base: any, over: any, shape: any): any {
250
+ if (null == over) return base
251
+ if (!isMap(base) || !isMap(over)) return clone(over)
252
+
253
+ const out: any = {}
254
+ for (const k of Object.keys(base)) out[k] = base[k]
255
+
256
+ for (const k of Object.keys(over)) {
257
+ const directive = shape && shape[k] ? shape[k].$MERGE : undefined
258
+ const b = out[k]
259
+ const o = over[k]
260
+
261
+ if ('replace' === directive) {
262
+ out[k] = clone(o)
263
+ }
264
+ else if ('append' === directive) {
265
+ const bl = Array.isArray(b) ? b : []
266
+ const ol = Array.isArray(o) ? o : [o]
267
+ out[k] = bl.concat(ol)
268
+ }
269
+ else if (directive && 'object' === typeof directive && undefined !== directive.deep) {
270
+ out[k] = deepto(b, o, directive.deep)
271
+ }
272
+ else {
273
+ // Library default: deep for maps, REPLACE for lists. struct.merge
274
+ // is element-wise by index, which for option maps is nearly always
275
+ // wrong — ["a"] over ["x","y","z"] yielding ["a","y","z"] is the
276
+ // defect station hit on secrets.providers.
277
+ out[k] = (isMap(b) && isMap(o)) ? mergeone(b, o, undefined) : clone(o)
278
+ }
279
+ }
280
+ return out
281
+ }
282
+
283
+ /** Merge N levels below this key, replace below that. */
284
+ function deepto(base: any, over: any, n: number): any {
285
+ if (n <= 0) return clone(over)
286
+ if (!isMap(base) || !isMap(over)) return clone(over)
287
+ const out: any = {}
288
+ for (const k of Object.keys(base)) out[k] = base[k]
289
+ for (const k of Object.keys(over)) {
290
+ out[k] = deepto(out[k], over[k], n - 1)
291
+ }
292
+ return out
293
+ }
294
+
295
+ /** §9.4: N is an integer of at least 1, and everything else is an error.
296
+ *
297
+ * `{"deep": 0}` is rejected DESPITE having an obvious reading, because
298
+ * "replace at this key" already has a spelling and two spellings for one
299
+ * behaviour is the defect class this repo exists to avoid. Without the
300
+ * stated domain each port picks its own reading — reject, replace,
301
+ * unlimited merge, or clamp to 1 — and the same document resolves
302
+ * differently per language. */
303
+ const MERGE_WORDS = ['replace', 'append']
304
+
305
+ export function checkshape(shape: any): void {
306
+ if (!isMap(shape)) return
307
+ for (const k of Object.keys(shape)) {
308
+ const v = shape[k]
309
+ if (!isMap(v) || undefined === v.$MERGE) continue
310
+ const d = v.$MERGE
311
+
312
+ if ('string' === typeof d) {
313
+ if (-1 === MERGE_WORDS.indexOf(d)) {
314
+ fail('plugin_shape_invalid',
315
+ 'invalid $MERGE directive at ' + k + ': ' + d, { key: k, directive: d })
316
+ }
317
+ continue
318
+ }
319
+ if (isMap(d) && undefined !== d.deep) {
320
+ const n = d.deep
321
+ if ('number' !== typeof n || !Number.isInteger(n) || n < 1) {
322
+ fail('plugin_shape_invalid',
323
+ 'invalid $MERGE deep at ' + k + ': ' + JSON.stringify(n), { key: k, directive: d })
324
+ }
325
+ continue
326
+ }
327
+ fail('plugin_shape_invalid',
328
+ 'invalid $MERGE directive at ' + k + ': ' + JSON.stringify(d), { key: k, directive: d })
329
+ }
330
+ }
331
+
332
+ function isMap(v: any): boolean {
333
+ return null != v && 'object' === typeof v && !Array.isArray(v)
334
+ }
335
+
336
+ function clone(v: any): any {
337
+ if (Array.isArray(v)) return v.map(clone)
338
+ if (isMap(v)) {
339
+ const out: any = {}
340
+ for (const k of Object.keys(v)) out[k] = clone(v[k])
341
+ return out
342
+ }
343
+ return v
344
+ }
@@ -0,0 +1,205 @@
1
+ // VENDORED: @voxgig/plugin 0.1.6 (typescript/src/Depend.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
+ /* Dependency cardinality, policy, and the restart graph (§11.3).
5
+ *
6
+ * TWO AXES, BOTH DECLARED BY THE DEFINITION THAT HAS THE REQUIREMENT,
7
+ * because only it knows what it can cope with:
8
+ *
9
+ * | static (default) | dynamic
10
+ * -------------|---------------------------|--------------------------
11
+ * mandatory | unmet -> pending; | unmet -> pending;
12
+ * (default) | lost -> pending, | lost -> STAYS LIVE,
13
+ * | recursively | notified
14
+ * -------------|---------------------------|--------------------------
15
+ * optional:true| never gates activation; | never gates activation;
16
+ * | a change deactivates and | a change is a
17
+ * | reactivates | notification, nothing else
18
+ *
19
+ * `dynamic` means the plugin has said, IN WRITING, that it can survive
20
+ * its provider being swapped underneath it. It is not the default
21
+ * because most plugins cannot, and the cost of wrongly assuming they
22
+ * can is a live instance holding a dead reference.
23
+ *
24
+ * The rebinding-preference axis is deliberately omitted. OSGi has
25
+ * reluctant vs greedy and it is a knob every author must understand to
26
+ * read anyone else's component; we take always-reluctant. Three axes
27
+ * were more than the model can carry across twenty ports. */
28
+
29
+ import { Required } from './Capability'
30
+ import { tryref } from './Ref'
31
+ import { fail } from './Types'
32
+
33
+ /** A bare string is shorthand for `{name}`. */
34
+ export function normrequire(r: any): Required {
35
+ return ('string' === typeof r ? { name: r } : (r || {})) as Required
36
+ }
37
+
38
+ /** The requirements a definition declared, normalized.
39
+ *
40
+ * BOTH AXES ARE READ AT TWO LEVELS, AND THE PER-REQUIREMENT ONE WINS.
41
+ *
42
+ * The instance-level `policy` and `optional` list are how a DOCUMENT
43
+ * states the axis without editing the definition, and they apply to
44
+ * every requirement. The per-requirement form is the one §11.1's object
45
+ * syntax exists for, and it is strictly more expressive: an instance
46
+ * that is `static` on its store and `dynamic` on its metrics cannot be
47
+ * written at all at the instance level, and that is the ordinary case
48
+ * rather than an exotic one.
49
+ *
50
+ * `optional` unions rather than overriding — both spellings are
51
+ * statements that this requirement need not gate activation, and there
52
+ * is no reading under which one of them means "actually, mandatory". */
53
+ export function requirements(options: any): Required[] {
54
+ const raw: any[] = (options && options.requires) || []
55
+ const marked: string[] = (options && options.optional) || []
56
+ const fallback = options && options.policy
57
+ return raw.map(normrequire).map((r) => {
58
+ const out: Required = { ...r }
59
+ if (r.optional || -1 !== marked.indexOf(r.name)) { out.optional = true }
60
+ if (undefined === out.policy && undefined !== fallback) {
61
+ out.policy = fallback
62
+ }
63
+ return out
64
+ })
65
+ }
66
+
67
+ /** Does losing this requirement's SELECTED provider restart the
68
+ * consumer? The mandatory ones under `static`, and the `static`
69
+ * optional ones — both make a capability change deactivate and
70
+ * reactivate. `dynamic` never restarts: mandatory-dynamic stays live
71
+ * and is notified, optional-dynamic is a notification and nothing
72
+ * else. */
73
+ export function restartsonloss(r: Required): boolean {
74
+ return 'dynamic' !== (r.policy || 'static')
75
+ }
76
+
77
+ /** Does an unmet requirement keep the consumer out of `live`?
78
+ *
79
+ * Cardinality alone decides this, NOT policy. `dynamic` is a statement
80
+ * about surviving a SWAP, not about starting without the thing at all —
81
+ * a mandatory-dynamic consumer still waits in `pending` for its first
82
+ * provider. Conflating the two would let a plugin that declared it can
83
+ * cope with replacement activate with nothing to call. */
84
+ export function gatesactivation(r: Required): boolean {
85
+ return true !== r.optional
86
+ }
87
+
88
+ /** Edges that can cause a restart, which is exactly the set a cycle
89
+ * must be detected over (§11.3).
90
+ *
91
+ * Those are the mandatory requirements AND THE `static` OPTIONAL ONES,
92
+ * because both make a capability change deactivate and reactivate the
93
+ * consumer — and a cycle of restarts does not settle: A comes up, B
94
+ * restarts, which changes B's capability, which restarts A,
95
+ * indefinitely.
96
+ *
97
+ * ONLY `dynamic` OPTIONAL EDGES ARE EXCLUDED, and they are the ones the
98
+ * exclusion was for: two plugins that optionally and dynamically
99
+ * consume each other's capabilities both activate happily, neither
100
+ * gates on the other, and each is merely notified when the other
101
+ * appears. Nothing restarts, so nothing oscillates.
102
+ *
103
+ * An earlier draft of §11.3 excluded EVERY optional edge and thereby
104
+ * admitted the non-terminating case it was trying to permit. */
105
+ export function restartcausing(r: Required): boolean {
106
+ return gatesactivation(r) || restartsonloss(r)
107
+ }
108
+
109
+ export type Node = {
110
+ ref: string
111
+ provides: string[]
112
+ requires: Required[]
113
+ }
114
+
115
+ /** A cycle through restart-causing requirements is
116
+ * `plugin_dependency_cycle`, detected AT LOAD — before anything runs,
117
+ * because the failure it describes is a non-terminating reconcile and
118
+ * the only safe time to report that is before it starts.
119
+ *
120
+ * The graph is over capabilities, not refs: an edge runs from a
121
+ * consumer to EVERY node that provides what it needs, because any of
122
+ * them could be the one selected and a cycle through any is a cycle.
123
+ * A node also satisfies its own name as a ref (§11.1), which is why the
124
+ * ref is a provider of itself here. */
125
+ export function dependencycycle(nodes: Node[]): string[] | null {
126
+ // TWO INDEXES, NOT ONE MERGED MAP. Capability names and refs are
127
+ // matched differently — a capability by its exact name, a ref through
128
+ // the canonical spelling (§4 rule 5) — and a single map keyed by both
129
+ // can only do one of them. Keyed by both and looked up raw, as this
130
+ // was, a cycle spelled `a$`/`b$` found no providers and EVADED the
131
+ // load-time check that exists to catch a non-terminating reconcile:
132
+ // the same graph, written two ways, gave two answers.
133
+ const bycap: { [cap: string]: string[] } = {}
134
+ const isref: { [ref: string]: boolean } = {}
135
+ for (const n of nodes) {
136
+ isref[n.ref] = true
137
+ for (const cap of n.provides) {
138
+ (bycap[cap] = bycap[cap] || []).push(n.ref)
139
+ }
140
+ }
141
+
142
+ const edges: { [ref: string]: string[] } = {}
143
+ for (const n of nodes) {
144
+ const out: string[] = []
145
+ for (const r of n.requires) {
146
+ if (!restartcausing(r)) continue
147
+ const from: string[] = (bycap[r.name] || []).slice()
148
+ // A node satisfies its own name AS A REF (§11.1), canonically —
149
+ // exactly what `providersof` does at runtime, so the load-time
150
+ // graph and the running one agree about what an edge is.
151
+ const asref = tryref(r.name)
152
+ if (undefined !== asref && isref[asref] && -1 === from.indexOf(asref)) {
153
+ from.push(asref)
154
+ }
155
+ for (const p of from) {
156
+ if (p !== n.ref && -1 === out.indexOf(p)) out.push(p)
157
+ }
158
+ }
159
+ edges[n.ref] = out.sort()
160
+ }
161
+
162
+ // Iterative DFS with an explicit stack: twenty ports, and several of
163
+ // them have no recursion budget worth relying on.
164
+ const WHITE = 0, GREY = 1, BLACK = 2
165
+ const colour: { [ref: string]: number } = {}
166
+ for (const n of nodes) colour[n.ref] = WHITE
167
+
168
+ for (const start of Object.keys(edges).sort()) {
169
+ if (WHITE !== colour[start]) continue
170
+ const path: string[] = []
171
+ const stack: { ref: string, i: number }[] = [{ ref: start, i: 0 }]
172
+ colour[start] = GREY
173
+ path.push(start)
174
+
175
+ while (0 < stack.length) {
176
+ const top = stack[stack.length - 1]
177
+ const next = edges[top.ref][top.i++]
178
+ if (undefined === next) {
179
+ colour[top.ref] = BLACK
180
+ stack.pop()
181
+ path.pop()
182
+ continue
183
+ }
184
+ if (GREY === colour[next]) {
185
+ // Report the cycle itself, not the walk that found it.
186
+ return path.slice(path.indexOf(next)).concat([next])
187
+ }
188
+ if (BLACK === colour[next]) continue
189
+ colour[next] = GREY
190
+ path.push(next)
191
+ stack.push({ ref: next, i: 0 })
192
+ }
193
+ }
194
+ return null
195
+ }
196
+
197
+ /** Raise on a cycle, naming it. Separate from the detector so the
198
+ * detector stays pure and corpus-testable. */
199
+ export function checkcycle(nodes: Node[]): void {
200
+ const cycle = dependencycycle(nodes)
201
+ if (null != cycle) {
202
+ fail('plugin_dependency_cycle',
203
+ 'requirements cycle: ' + cycle.join(' -> '), { cycle })
204
+ }
205
+ }
@@ -0,0 +1,138 @@
1
+ // VENDORED: @voxgig/plugin 0.1.6 (typescript/src/Env.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
+ /* Environment overrides (§9.5) — level 7 of the ladder.
5
+ *
6
+ * One prefix, so nothing drifts: `VOXGIG_PLUGIN_*`.
7
+ *
8
+ * VOXGIG_PLUGIN_PROFILE the profile name
9
+ * VOXGIG_PLUGIN_<REF>_<PATH> one option
10
+ * VOXGIG_PLUGIN_ACTIVE/INACTIVE comma-separated refs, INACTIVE wins
11
+ *
12
+ * THE ENCODING IS LOSSY, AND THIS SAYS SO RATHER THAN PRETENDING
13
+ * OTHERWISE. Ref and path are upper-snake with `$` -> `__` and `.` ->
14
+ * `_`. But `_` is legal in a name and in a tag, and the mapping folds
15
+ * case, so `retry$fast` and `retry__fast` both encode to `RETRY__FAST`,
16
+ * as do `Retry$fast` and `retry$Fast`.
17
+ *
18
+ * Rather than restrict a grammar the rest of the stack already uses,
19
+ * the host DETECTS THE COLLISION: it encodes every ref it holds, and a
20
+ * key two refs claim is `plugin_env_ambiguous`, naming both. The
21
+ * affected pair stays configurable by document and by API, just not by
22
+ * environment — which is the honest trade.
23
+ *
24
+ * Pure: a function over a string map and a ref set. The corpus tests it
25
+ * without touching a real environment. */
26
+
27
+ import { fail } from './Types'
28
+ import { canonref, parseref } from './Ref'
29
+
30
+ const PREFIX = 'VOXGIG_PLUGIN_'
31
+
32
+ export type EnvResult = {
33
+ profile?: string
34
+ options: { [ref: string]: any }
35
+ active: string[]
36
+ inactive: string[]
37
+ }
38
+
39
+ export type EnvInput = {
40
+ env: { [k: string]: string }
41
+ /** Every ref the host holds. Needed because the encoding is lossy:
42
+ * without the set there is no way to know where the ref ends and the
43
+ * path begins in `RETRY__FAST_MIN_DELAY`. */
44
+ refs?: string[]
45
+ reserved?: string[]
46
+ }
47
+
48
+ /** `retry$fast` -> `RETRY__FAST`. */
49
+ export function encoderef(ref: string): string {
50
+ return ref.replace(/\$/g, '__').replace(/\./g, '_').toUpperCase()
51
+ }
52
+
53
+ export function applyenv(input: EnvInput): EnvResult {
54
+ const env = (input && input.env) || {}
55
+ const refs = ((input && input.refs) || []).map(canonref)
56
+ const reserved = (input && input.reserved) || []
57
+ const out: EnvResult = { options: {}, active: [], inactive: [] }
58
+
59
+ // Encode every ref the host holds, and refuse a key that two of them
60
+ // claim. Done up front so the collision is reported even when no
61
+ // environment variable exercises it — a latent ambiguity is still an
62
+ // ambiguity, and finding it at deploy time is the failure this exists
63
+ // to prevent.
64
+ const byencoded: { [enc: string]: string[] } = {}
65
+ for (const r of refs) {
66
+ const e = encoderef(r)
67
+ ;(byencoded[e] || (byencoded[e] = [])).push(r)
68
+ }
69
+ for (const e of Object.keys(byencoded).sort()) {
70
+ if (1 < byencoded[e].length) {
71
+ const pair = byencoded[e].slice().sort()
72
+ fail('plugin_env_ambiguous',
73
+ 'refs collide in the environment encoding as ' + e + ': ' + pair.join(', '),
74
+ { encoded: e, refs: pair })
75
+ }
76
+ }
77
+
78
+ // Longest encoded ref first, so `retry$fast` wins over `retry` on
79
+ // `RETRY__FAST_MIN`. Shortest-first would read the tag as a path.
80
+ const encoded = Object.keys(byencoded).sort((a, b) => b.length - a.length)
81
+
82
+ for (const key of Object.keys(env).sort()) {
83
+ if (!key.startsWith(PREFIX)) continue
84
+ const rest = key.substring(PREFIX.length)
85
+
86
+ if ('PROFILE' === rest) { out.profile = env[key]; continue }
87
+
88
+ if ('ACTIVE' === rest || 'INACTIVE' === rest) {
89
+ for (const r of split(env[key])) {
90
+ const c = canonref(r)
91
+ // The reservation covers EVERY input layer (§9.1).
92
+ // VOXGIG_PLUGIN_INACTIVE=station is easier to set than editing
93
+ // a config file, and INACTIVE has the final word — so guarding
94
+ // documents alone would leave the one lever this mechanism
95
+ // exists to deny wide open.
96
+ checkreserved(c, reserved)
97
+ if ('ACTIVE' === rest) out.active.push(c)
98
+ else out.inactive.push(c)
99
+ }
100
+ continue
101
+ }
102
+
103
+ const enc = encoded.find((e) => rest === e || rest.startsWith(e + '_'))
104
+ if (undefined === enc) continue // not for any ref this host holds
105
+ const ref = byencoded[enc][0]
106
+ checkreserved(ref, reserved)
107
+
108
+ if (rest === enc) continue // a ref with no path sets nothing
109
+ const path = rest.substring(enc.length + 1).toLowerCase().split('_')
110
+
111
+ let node = out.options[ref] || (out.options[ref] = {})
112
+ for (let i = 0; i < path.length - 1; i++) {
113
+ node = node[path[i]] || (node[path[i]] = {})
114
+ }
115
+ node[path[path.length - 1]] = parsevalue(env[key])
116
+ }
117
+
118
+ return out
119
+ }
120
+
121
+ function split(v: string): string[] {
122
+ return String(v).split(',').map((s) => s.trim()).filter((s) => 0 < s.length)
123
+ }
124
+
125
+ function checkreserved(ref: string, reserved: string[]): void {
126
+ if (0 === reserved.length) return
127
+ if (-1 !== reserved.indexOf(parseref(ref).name)) {
128
+ fail('plugin_ref_reserved', 'ref is reserved by the host: ' + ref, { ref })
129
+ }
130
+ }
131
+
132
+ /** Values parse as JSON, FALLING BACK TO STRING — so `8080` is a
133
+ * number, `true` is a boolean, `{"a":1}` is a map, and `hello` is the
134
+ * string it looks like rather than a parse error. */
135
+ function parsevalue(v: string): any {
136
+ try { return JSON.parse(v) }
137
+ catch (err) { return v }
138
+ }