@voxgig/sdkgen-langpack 0.0.1

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 (300) hide show
  1. package/.sdk/model/target/dart.aon +63 -0
  2. package/.sdk/model/target/haskell.aon +72 -0
  3. package/.sdk/model/target/lean.aon +91 -0
  4. package/.sdk/src/cmp/dart/Config_dart.ts +248 -0
  5. package/.sdk/src/cmp/dart/EntityBase_dart.ts +34 -0
  6. package/.sdk/src/cmp/dart/EntityOperation_dart.ts +43 -0
  7. package/.sdk/src/cmp/dart/EntityTypes_dart.ts +207 -0
  8. package/.sdk/src/cmp/dart/Entity_dart.ts +87 -0
  9. package/.sdk/src/cmp/dart/Gitignore_dart.ts +34 -0
  10. package/.sdk/src/cmp/dart/MainEntity_dart.ts +33 -0
  11. package/.sdk/src/cmp/dart/Main_dart.ts +178 -0
  12. package/.sdk/src/cmp/dart/Package_dart.ts +82 -0
  13. package/.sdk/src/cmp/dart/ReadmeEntity_dart.ts +177 -0
  14. package/.sdk/src/cmp/dart/ReadmeExamplesTest_dart.ts +238 -0
  15. package/.sdk/src/cmp/dart/ReadmeExplanation_dart.ts +53 -0
  16. package/.sdk/src/cmp/dart/ReadmeHowto_dart.ts +152 -0
  17. package/.sdk/src/cmp/dart/ReadmeInstall_dart.ts +59 -0
  18. package/.sdk/src/cmp/dart/ReadmeIntro_dart.ts +65 -0
  19. package/.sdk/src/cmp/dart/ReadmeModel_dart.ts +151 -0
  20. package/.sdk/src/cmp/dart/ReadmeOptions_dart.ts +63 -0
  21. package/.sdk/src/cmp/dart/ReadmeQuick_dart.ts +225 -0
  22. package/.sdk/src/cmp/dart/ReadmeRef_dart.ts +397 -0
  23. package/.sdk/src/cmp/dart/ReadmeTopHowto_dart.ts +24 -0
  24. package/.sdk/src/cmp/dart/ReadmeTopQuick_dart.ts +106 -0
  25. package/.sdk/src/cmp/dart/ReadmeTopTest_dart.ts +78 -0
  26. package/.sdk/src/cmp/dart/SdkError_dart.ts +42 -0
  27. package/.sdk/src/cmp/dart/TestDirect_dart.ts +516 -0
  28. package/.sdk/src/cmp/dart/TestEntity_dart.ts +628 -0
  29. package/.sdk/src/cmp/dart/Test_dart.ts +138 -0
  30. package/.sdk/src/cmp/dart/fragment/Config.data.fragment.dart +98 -0
  31. package/.sdk/src/cmp/dart/fragment/Config.fragment.dart +70 -0
  32. package/.sdk/src/cmp/dart/fragment/Direct.test.fragment.dart +25 -0
  33. package/.sdk/src/cmp/dart/fragment/Entity.fragment.dart +29 -0
  34. package/.sdk/src/cmp/dart/fragment/Entity.test.fragment.dart +28 -0
  35. package/.sdk/src/cmp/dart/fragment/EntityBase.fragment.dart +302 -0
  36. package/.sdk/src/cmp/dart/fragment/EntityCreateOp.fragment.dart +98 -0
  37. package/.sdk/src/cmp/dart/fragment/EntityListOp.fragment.dart +90 -0
  38. package/.sdk/src/cmp/dart/fragment/EntityLoadOp.fragment.dart +102 -0
  39. package/.sdk/src/cmp/dart/fragment/EntityRemoveOp.fragment.dart +108 -0
  40. package/.sdk/src/cmp/dart/fragment/EntityUpdateOp.fragment.dart +102 -0
  41. package/.sdk/src/cmp/dart/fragment/Main.fragment.dart +339 -0
  42. package/.sdk/src/cmp/dart/fragment/SdkError.fragment.dart +26 -0
  43. package/.sdk/src/cmp/dart/tsconfig.json +15 -0
  44. package/.sdk/src/cmp/dart/utility_dart.ts +155 -0
  45. package/.sdk/src/cmp/haskell/Config_haskell.ts +98 -0
  46. package/.sdk/src/cmp/haskell/Entity_haskell.ts +13 -0
  47. package/.sdk/src/cmp/haskell/Gitignore_haskell.ts +27 -0
  48. package/.sdk/src/cmp/haskell/Main_haskell.ts +123 -0
  49. package/.sdk/src/cmp/haskell/Package_haskell.ts +60 -0
  50. package/.sdk/src/cmp/haskell/ReadmeEntity_haskell.ts +186 -0
  51. package/.sdk/src/cmp/haskell/ReadmeExamplesTest_haskell.ts +135 -0
  52. package/.sdk/src/cmp/haskell/ReadmeExplanation_haskell.ts +48 -0
  53. package/.sdk/src/cmp/haskell/ReadmeHowto_haskell.ts +168 -0
  54. package/.sdk/src/cmp/haskell/ReadmeInstall_haskell.ts +51 -0
  55. package/.sdk/src/cmp/haskell/ReadmeIntro_haskell.ts +67 -0
  56. package/.sdk/src/cmp/haskell/ReadmeModel_haskell.ts +162 -0
  57. package/.sdk/src/cmp/haskell/ReadmeOptions_haskell.ts +74 -0
  58. package/.sdk/src/cmp/haskell/ReadmeQuick_haskell.ts +241 -0
  59. package/.sdk/src/cmp/haskell/ReadmeRef_haskell.ts +408 -0
  60. package/.sdk/src/cmp/haskell/ReadmeTopHowto_haskell.ts +31 -0
  61. package/.sdk/src/cmp/haskell/ReadmeTopQuick_haskell.ts +104 -0
  62. package/.sdk/src/cmp/haskell/ReadmeTopTest_haskell.ts +80 -0
  63. package/.sdk/src/cmp/haskell/Test_haskell.ts +297 -0
  64. package/.sdk/src/cmp/haskell/tsconfig.json +15 -0
  65. package/.sdk/src/cmp/haskell/utility_haskell.ts +166 -0
  66. package/.sdk/src/cmp/lean/Config_lean.ts +93 -0
  67. package/.sdk/src/cmp/lean/Entity_lean.ts +9 -0
  68. package/.sdk/src/cmp/lean/Gitignore_lean.ts +18 -0
  69. package/.sdk/src/cmp/lean/Main_lean.ts +120 -0
  70. package/.sdk/src/cmp/lean/Package_lean.ts +93 -0
  71. package/.sdk/src/cmp/lean/ReadmeEntity_lean.ts +29 -0
  72. package/.sdk/src/cmp/lean/ReadmeExplanation_lean.ts +19 -0
  73. package/.sdk/src/cmp/lean/ReadmeHowto_lean.ts +25 -0
  74. package/.sdk/src/cmp/lean/ReadmeInstall_lean.ts +39 -0
  75. package/.sdk/src/cmp/lean/ReadmeIntro_lean.ts +25 -0
  76. package/.sdk/src/cmp/lean/ReadmeModel_lean.ts +24 -0
  77. package/.sdk/src/cmp/lean/ReadmeOptions_lean.ts +22 -0
  78. package/.sdk/src/cmp/lean/ReadmeQuick_lean.ts +50 -0
  79. package/.sdk/src/cmp/lean/ReadmeRef_lean.ts +40 -0
  80. package/.sdk/src/cmp/lean/ReadmeTopHowto_lean.ts +16 -0
  81. package/.sdk/src/cmp/lean/ReadmeTopQuick_lean.ts +23 -0
  82. package/.sdk/src/cmp/lean/ReadmeTopTest_lean.ts +19 -0
  83. package/.sdk/src/cmp/lean/Test_lean.ts +261 -0
  84. package/.sdk/src/cmp/lean/utility_lean.ts +129 -0
  85. package/.sdk/tm/dart/LICENSE +22 -0
  86. package/.sdk/tm/dart/Makefile +50 -0
  87. package/.sdk/tm/dart/lib/Context.dart +150 -0
  88. package/.sdk/tm/dart/lib/Control.dart +15 -0
  89. package/.sdk/tm/dart/lib/Operation.dart +31 -0
  90. package/.sdk/tm/dart/lib/Point.dart +51 -0
  91. package/.sdk/tm/dart/lib/Response.dart +32 -0
  92. package/.sdk/tm/dart/lib/Result.dart +39 -0
  93. package/.sdk/tm/dart/lib/Spec.dart +49 -0
  94. package/.sdk/tm/dart/lib/feature/audit/AuditFeature.dart +103 -0
  95. package/.sdk/tm/dart/lib/feature/base/BaseFeature.dart +76 -0
  96. package/.sdk/tm/dart/lib/feature/cache/CacheFeature.dart +152 -0
  97. package/.sdk/tm/dart/lib/feature/clienttrack/ClienttrackFeature.dart +104 -0
  98. package/.sdk/tm/dart/lib/feature/cost/CostFeature.dart +446 -0
  99. package/.sdk/tm/dart/lib/feature/debug/DebugFeature.dart +153 -0
  100. package/.sdk/tm/dart/lib/feature/idempotency/IdempotencyFeature.dart +92 -0
  101. package/.sdk/tm/dart/lib/feature/log/LogFeature.dart +85 -0
  102. package/.sdk/tm/dart/lib/feature/metrics/MetricsFeature.dart +103 -0
  103. package/.sdk/tm/dart/lib/feature/netsim/NetsimFeature.dart +186 -0
  104. package/.sdk/tm/dart/lib/feature/paging/PagingFeature.dart +240 -0
  105. package/.sdk/tm/dart/lib/feature/proxy/ProxyFeature.dart +118 -0
  106. package/.sdk/tm/dart/lib/feature/ratelimit/RatelimitFeature.dart +103 -0
  107. package/.sdk/tm/dart/lib/feature/rbac/RbacFeature.dart +121 -0
  108. package/.sdk/tm/dart/lib/feature/retry/RetryFeature.dart +155 -0
  109. package/.sdk/tm/dart/lib/feature/secrets/SecretsFeature.dart +649 -0
  110. package/.sdk/tm/dart/lib/feature/secrets/plugin/capability.dart +105 -0
  111. package/.sdk/tm/dart/lib/feature/secrets/plugin/catalog.dart +46 -0
  112. package/.sdk/tm/dart/lib/feature/secrets/plugin/config.dart +297 -0
  113. package/.sdk/tm/dart/lib/feature/secrets/plugin/depend.dart +198 -0
  114. package/.sdk/tm/dart/lib/feature/secrets/plugin/env.dart +144 -0
  115. package/.sdk/tm/dart/lib/feature/secrets/plugin/export.dart +58 -0
  116. package/.sdk/tm/dart/lib/feature/secrets/plugin/graph.dart +160 -0
  117. package/.sdk/tm/dart/lib/feature/secrets/plugin/host.dart +1067 -0
  118. package/.sdk/tm/dart/lib/feature/secrets/plugin/order.dart +172 -0
  119. package/.sdk/tm/dart/lib/feature/secrets/plugin/plugin.dart +23 -0
  120. package/.sdk/tm/dart/lib/feature/secrets/plugin/point.dart +117 -0
  121. package/.sdk/tm/dart/lib/feature/secrets/plugin/ref.dart +105 -0
  122. package/.sdk/tm/dart/lib/feature/secrets/plugin/resolve.dart +58 -0
  123. package/.sdk/tm/dart/lib/feature/secrets/plugin/types.dart +201 -0
  124. package/.sdk/tm/dart/lib/feature/secrets/plugin/version.dart +116 -0
  125. package/.sdk/tm/dart/lib/feature/secrets/sekreto/plugins/aws.dart +285 -0
  126. package/.sdk/tm/dart/lib/feature/secrets/sekreto/plugins/azuresecrets.dart +178 -0
  127. package/.sdk/tm/dart/lib/feature/secrets/sekreto/plugins/boru.dart +145 -0
  128. package/.sdk/tm/dart/lib/feature/secrets/sekreto/plugins/crypto.dart +194 -0
  129. package/.sdk/tm/dart/lib/feature/secrets/sekreto/plugins/doppler.dart +101 -0
  130. package/.sdk/tm/dart/lib/feature/secrets/sekreto/plugins/gcpsecrets.dart +143 -0
  131. package/.sdk/tm/dart/lib/feature/secrets/sekreto/plugins/hashicorp.dart +190 -0
  132. package/.sdk/tm/dart/lib/feature/secrets/sekreto/plugins/httpjson.dart +363 -0
  133. package/.sdk/tm/dart/lib/feature/secrets/sekreto/plugins/infisical.dart +149 -0
  134. package/.sdk/tm/dart/lib/feature/secrets/sekreto/plugins/onepassword.dart +146 -0
  135. package/.sdk/tm/dart/lib/feature/secrets/sekreto/plugins/secretspec.dart +116 -0
  136. package/.sdk/tm/dart/lib/feature/secrets/sekreto/plugins/sigv4.dart +237 -0
  137. package/.sdk/tm/dart/lib/feature/secrets/sekreto/src/addr.dart +138 -0
  138. package/.sdk/tm/dart/lib/feature/secrets/sekreto/src/json.dart +276 -0
  139. package/.sdk/tm/dart/lib/feature/secrets/sekreto/src/provider.dart +31 -0
  140. package/.sdk/tm/dart/lib/feature/secrets/sekreto/src/providers.dart +243 -0
  141. package/.sdk/tm/dart/lib/feature/secrets/sekreto/src/sekreto.dart +730 -0
  142. package/.sdk/tm/dart/lib/feature/secrets/sekreto/src/spec.dart +200 -0
  143. package/.sdk/tm/dart/lib/feature/secrets/sekreto/src/support.dart +217 -0
  144. package/.sdk/tm/dart/lib/feature/streaming/StreamingFeature.dart +97 -0
  145. package/.sdk/tm/dart/lib/feature/telemetry/TelemetryFeature.dart +136 -0
  146. package/.sdk/tm/dart/lib/feature/test/TestFeature.dart +328 -0
  147. package/.sdk/tm/dart/lib/feature/timeout/TimeoutFeature.dart +104 -0
  148. package/.sdk/tm/dart/lib/utility/CleanUtility.dart +12 -0
  149. package/.sdk/tm/dart/lib/utility/DoneUtility.dart +18 -0
  150. package/.sdk/tm/dart/lib/utility/ErrUtility.dart +46 -0
  151. package/.sdk/tm/dart/lib/utility/FeatureAddUtility.dart +35 -0
  152. package/.sdk/tm/dart/lib/utility/FeatureHookUtility.dart +20 -0
  153. package/.sdk/tm/dart/lib/utility/FeatureInitUtility.dart +9 -0
  154. package/.sdk/tm/dart/lib/utility/FetcherUtility.dart +104 -0
  155. package/.sdk/tm/dart/lib/utility/GraphqlUtility.dart +162 -0
  156. package/.sdk/tm/dart/lib/utility/MakeContextUtility.dart +6 -0
  157. package/.sdk/tm/dart/lib/utility/MakeErrorUtility.dart +71 -0
  158. package/.sdk/tm/dart/lib/utility/MakeFetchDefUtility.dart +42 -0
  159. package/.sdk/tm/dart/lib/utility/MakeOptionsUtility.dart +233 -0
  160. package/.sdk/tm/dart/lib/utility/MakePointUtility.dart +130 -0
  161. package/.sdk/tm/dart/lib/utility/MakeRequestUtility.dart +66 -0
  162. package/.sdk/tm/dart/lib/utility/MakeResponseUtility.dart +59 -0
  163. package/.sdk/tm/dart/lib/utility/MakeResultUtility.dart +49 -0
  164. package/.sdk/tm/dart/lib/utility/MakeSpecUtility.dart +77 -0
  165. package/.sdk/tm/dart/lib/utility/MakeUrlUtility.dart +51 -0
  166. package/.sdk/tm/dart/lib/utility/ParamUtility.dart +56 -0
  167. package/.sdk/tm/dart/lib/utility/PrepareAuthUtility.dart +46 -0
  168. package/.sdk/tm/dart/lib/utility/PrepareBodyUtility.dart +19 -0
  169. package/.sdk/tm/dart/lib/utility/PrepareHeadersUtility.dart +11 -0
  170. package/.sdk/tm/dart/lib/utility/PrepareMethodUtility.dart +30 -0
  171. package/.sdk/tm/dart/lib/utility/PrepareParamsUtility.dart +23 -0
  172. package/.sdk/tm/dart/lib/utility/PreparePathUtility.dart +9 -0
  173. package/.sdk/tm/dart/lib/utility/PrepareQueryUtility.dart +18 -0
  174. package/.sdk/tm/dart/lib/utility/ResultBasicUtility.dart +29 -0
  175. package/.sdk/tm/dart/lib/utility/ResultBodyUtility.dart +15 -0
  176. package/.sdk/tm/dart/lib/utility/ResultHeadersUtility.dart +18 -0
  177. package/.sdk/tm/dart/lib/utility/StructUtility.dart +127 -0
  178. package/.sdk/tm/dart/lib/utility/TransformRequestUtility.dart +28 -0
  179. package/.sdk/tm/dart/lib/utility/TransformResponseUtility.dart +44 -0
  180. package/.sdk/tm/dart/lib/utility/Utility.dart +239 -0
  181. package/.sdk/tm/dart/lib/utility/voxgig_struct.dart +2462 -0
  182. package/.sdk/tm/dart/src/feature/README.md +3 -0
  183. package/.sdk/tm/dart/src/feature/audit/.gitkeep +0 -0
  184. package/.sdk/tm/dart/src/feature/base/.gitkeep +0 -0
  185. package/.sdk/tm/dart/src/feature/cache/.gitkeep +0 -0
  186. package/.sdk/tm/dart/src/feature/clienttrack/.gitkeep +0 -0
  187. package/.sdk/tm/dart/src/feature/cost/.gitkeep +0 -0
  188. package/.sdk/tm/dart/src/feature/debug/.gitkeep +0 -0
  189. package/.sdk/tm/dart/src/feature/idempotency/.gitkeep +0 -0
  190. package/.sdk/tm/dart/src/feature/log/.gitkeep +0 -0
  191. package/.sdk/tm/dart/src/feature/metrics/.gitkeep +0 -0
  192. package/.sdk/tm/dart/src/feature/netsim/.gitkeep +0 -0
  193. package/.sdk/tm/dart/src/feature/paging/.gitkeep +0 -0
  194. package/.sdk/tm/dart/src/feature/proxy/.gitkeep +0 -0
  195. package/.sdk/tm/dart/src/feature/ratelimit/.gitkeep +0 -0
  196. package/.sdk/tm/dart/src/feature/rbac/.gitkeep +0 -0
  197. package/.sdk/tm/dart/src/feature/retry/.gitkeep +0 -0
  198. package/.sdk/tm/dart/src/feature/secrets/.gitkeep +0 -0
  199. package/.sdk/tm/dart/src/feature/streaming/.gitkeep +0 -0
  200. package/.sdk/tm/dart/src/feature/telemetry/.gitkeep +0 -0
  201. package/.sdk/tm/dart/src/feature/test/.gitkeep +0 -0
  202. package/.sdk/tm/dart/src/feature/timeout/.gitkeep +0 -0
  203. package/.sdk/tm/dart/test/custom_test.dart +65 -0
  204. package/.sdk/tm/dart/test/exists_test.dart +12 -0
  205. package/.sdk/tm/dart/test/feature/harness.dart +347 -0
  206. package/.sdk/tm/dart/test/feature/secrets/secrets_test.dart +1107 -0
  207. package/.sdk/tm/dart/test/feature_test.dart +1193 -0
  208. package/.sdk/tm/dart/test/harness.dart +153 -0
  209. package/.sdk/tm/dart/test/netsim_test.dart +48 -0
  210. package/.sdk/tm/dart/test/omni.dart +520 -0
  211. package/.sdk/tm/dart/test/omni_smoke_test.dart +143 -0
  212. package/.sdk/tm/dart/test/pipeline_test.dart +608 -0
  213. package/.sdk/tm/dart/test/primary_test.dart +476 -0
  214. package/.sdk/tm/dart/test/sdk-test-control.json +19 -0
  215. package/.sdk/tm/dart/test/struct_test.dart +468 -0
  216. package/.sdk/tm/dart/test/utility.dart +198 -0
  217. package/.sdk/tm/dart/test/vendor/omni/omni.dart +7 -0
  218. package/.sdk/tm/dart/test/vendor/omni/runner.dart +653 -0
  219. package/.sdk/tm/dart/test/vendor/omni/util.dart +232 -0
  220. package/.sdk/tm/haskell/LICENSE +21 -0
  221. package/.sdk/tm/haskell/Makefile +22 -0
  222. package/.sdk/tm/haskell/VERSION +1 -0
  223. package/.sdk/tm/haskell/src/SdkFeatures.hs +1440 -0
  224. package/.sdk/tm/haskell/src/SdkHelpers.hs +337 -0
  225. package/.sdk/tm/haskell/src/SdkJson.hs +111 -0
  226. package/.sdk/tm/haskell/src/SdkRuntime.hs +1279 -0
  227. package/.sdk/tm/haskell/src/SdkTypes.hs +195 -0
  228. package/.sdk/tm/haskell/src/VoxgigStruct.hs +2299 -0
  229. package/.sdk/tm/haskell/src/Vregex.hs +237 -0
  230. package/.sdk/tm/haskell/src/feature/README.md +5 -0
  231. package/.sdk/tm/haskell/src/feature/audit/.gitkeep +0 -0
  232. package/.sdk/tm/haskell/src/feature/base/.gitkeep +0 -0
  233. package/.sdk/tm/haskell/src/feature/cache/.gitkeep +0 -0
  234. package/.sdk/tm/haskell/src/feature/clienttrack/.gitkeep +0 -0
  235. package/.sdk/tm/haskell/src/feature/debug/.gitkeep +0 -0
  236. package/.sdk/tm/haskell/src/feature/idempotency/.gitkeep +0 -0
  237. package/.sdk/tm/haskell/src/feature/log/.gitkeep +0 -0
  238. package/.sdk/tm/haskell/src/feature/metrics/.gitkeep +0 -0
  239. package/.sdk/tm/haskell/src/feature/netsim/.gitkeep +0 -0
  240. package/.sdk/tm/haskell/src/feature/paging/.gitkeep +0 -0
  241. package/.sdk/tm/haskell/src/feature/proxy/.gitkeep +0 -0
  242. package/.sdk/tm/haskell/src/feature/ratelimit/.gitkeep +0 -0
  243. package/.sdk/tm/haskell/src/feature/rbac/.gitkeep +0 -0
  244. package/.sdk/tm/haskell/src/feature/retry/.gitkeep +0 -0
  245. package/.sdk/tm/haskell/src/feature/streaming/.gitkeep +0 -0
  246. package/.sdk/tm/haskell/src/feature/telemetry/.gitkeep +0 -0
  247. package/.sdk/tm/haskell/src/feature/test/.gitkeep +0 -0
  248. package/.sdk/tm/haskell/src/feature/timeout/.gitkeep +0 -0
  249. package/.sdk/tm/haskell/test/Harness.hs +281 -0
  250. package/.sdk/tm/haskell/test/OmniResolver.hs +252 -0
  251. package/.sdk/tm/haskell/test/Runner.hs +49 -0
  252. package/.sdk/tm/haskell/test/StructCorpus.hs +449 -0
  253. package/.sdk/tm/haskell/test/TCustomUtility.hs +38 -0
  254. package/.sdk/tm/haskell/test/TFeature.hs +794 -0
  255. package/.sdk/tm/haskell/test/TNetsim.hs +50 -0
  256. package/.sdk/tm/haskell/test/TPipeline.hs +334 -0
  257. package/.sdk/tm/haskell/test/TPrimaryCorpus.hs +263 -0
  258. package/.sdk/tm/haskell/test/TPrimaryUtility.hs +386 -0
  259. package/.sdk/tm/haskell/test/Testutil.hs +59 -0
  260. package/.sdk/tm/haskell/test/vendor/omni/Omni.hs +1147 -0
  261. package/.sdk/tm/lean/LICENSE +21 -0
  262. package/.sdk/tm/lean/Makefile +32 -0
  263. package/.sdk/tm/lean/VERSION +1 -0
  264. package/.sdk/tm/lean/src/SdkFeature.lean +171 -0
  265. package/.sdk/tm/lean/src/SdkFeatures.lean +787 -0
  266. package/.sdk/tm/lean/src/SdkJson.lean +134 -0
  267. package/.sdk/tm/lean/src/SdkRuntime.lean +374 -0
  268. package/.sdk/tm/lean/src/SdkUtility.lean +809 -0
  269. package/.sdk/tm/lean/src/VoxgigStruct.lean +2880 -0
  270. package/.sdk/tm/lean/src/Vregex.lean +412 -0
  271. package/.sdk/tm/lean/src/feature/README.md +5 -0
  272. package/.sdk/tm/lean/src/feature/audit/.gitkeep +0 -0
  273. package/.sdk/tm/lean/src/feature/base/.gitkeep +0 -0
  274. package/.sdk/tm/lean/src/feature/cache/.gitkeep +0 -0
  275. package/.sdk/tm/lean/src/feature/clienttrack/.gitkeep +0 -0
  276. package/.sdk/tm/lean/src/feature/cost/.gitkeep +0 -0
  277. package/.sdk/tm/lean/src/feature/debug/.gitkeep +0 -0
  278. package/.sdk/tm/lean/src/feature/idempotency/.gitkeep +0 -0
  279. package/.sdk/tm/lean/src/feature/log/.gitkeep +0 -0
  280. package/.sdk/tm/lean/src/feature/metrics/.gitkeep +0 -0
  281. package/.sdk/tm/lean/src/feature/netsim/.gitkeep +0 -0
  282. package/.sdk/tm/lean/src/feature/paging/.gitkeep +0 -0
  283. package/.sdk/tm/lean/src/feature/proxy/.gitkeep +0 -0
  284. package/.sdk/tm/lean/src/feature/ratelimit/.gitkeep +0 -0
  285. package/.sdk/tm/lean/src/feature/rbac/.gitkeep +0 -0
  286. package/.sdk/tm/lean/src/feature/retry/.gitkeep +0 -0
  287. package/.sdk/tm/lean/src/feature/streaming/.gitkeep +0 -0
  288. package/.sdk/tm/lean/src/feature/telemetry/.gitkeep +0 -0
  289. package/.sdk/tm/lean/src/feature/test/.gitkeep +0 -0
  290. package/.sdk/tm/lean/src/feature/timeout/.gitkeep +0 -0
  291. package/.sdk/tm/lean/test/OmniResolver.lean +358 -0
  292. package/.sdk/tm/lean/test/OmniSmoke.lean +174 -0
  293. package/.sdk/tm/lean/test/StructCorpus.lean +368 -0
  294. package/.sdk/tm/lean/test/TFeature.lean +281 -0
  295. package/.sdk/tm/lean/test/TPrimaryUtility.lean +227 -0
  296. package/.sdk/tm/lean/test/vendor/omni/Omni.lean +997 -0
  297. package/LICENSE +21 -0
  298. package/README.md +104 -0
  299. package/package.json +78 -0
  300. package/sdkgen-package.json +22 -0
@@ -0,0 +1,468 @@
1
+ // VERSION: @voxgig/struct 0.0.10 (dart port)
2
+ // Drives the scaffold's shared struct corpus (../.sdk/test/test.json, root
3
+ // key "struct") through the vendored struct port, reached via the SDK's
4
+ // utility surface — mirroring ts test/utility/StructUtility.test.ts and the
5
+ // java target's StructCorpusTest.
6
+ //
7
+ // The engine is the VENDORED @voxgig/omni runner, driven through
8
+ // test/omni.dart. It supersedes test/struct_corpus.dart, the second,
9
+ // independent runner this suite used to carry (its own fixJson, eqv,
10
+ // matchval, doMatch and record/count loop — 531 lines that could and did
11
+ // drift from the shared semantics).
12
+ //
13
+ // Two behavioural changes come with the engine swap, both deliberate:
14
+ //
15
+ // - A failing entry now THROWS, with the section, the index and the entry
16
+ // named, instead of being counted into a tally. The first failure in a
17
+ // category stops that category's case; the other categories still run.
18
+ //
19
+ // - A missing or EMPTY section FAILS. The retired runner skipped one
20
+ // silently: `sentinels.*` had not existed in the corpus for some time and
21
+ // its six drive sites were running zero assertions while reporting PASS.
22
+ // They are gone; the corpus's `nullsem` group takes their place below.
23
+
24
+ import 'harness.dart';
25
+ import 'omni.dart';
26
+
27
+ import '../lib/ProjectNameSDK.dart';
28
+ import '../lib/utility/voxgig_struct.dart' as s;
29
+
30
+ const TEST_JSON_FILE = '../.sdk/test/test.json';
31
+
32
+ Run? _runner;
33
+
34
+ Run _run() {
35
+ if (null == _runner) {
36
+ final make = makeRunner(TEST_JSON_FILE, ProjectNameSDK.test());
37
+ final run = make('struct');
38
+ ok(null != run.spec, 'struct section not found in ' + TEST_JSON_FILE);
39
+ _runner = run;
40
+ }
41
+ return _runner!;
42
+ }
43
+
44
+ // A getter, not a field: every read must go through _run(), or the first
45
+ // section driven in a case reads a spec the lazy setup has not built yet.
46
+ dynamic get _spec => _run().spec;
47
+
48
+ // ---------------------------------------------------------------------------
49
+ // Drive helpers
50
+ // ---------------------------------------------------------------------------
51
+
52
+ dynamic _vget(dynamic vin, String key) =>
53
+ (vin is Map && vin.containsKey(key)) ? vin[key] : null;
54
+
55
+ bool _vhas(dynamic vin, String key) => vin is Map && vin.containsKey(key);
56
+
57
+ // omni.dart hands a zero-argument entry the struct port's own no-value
58
+ // sentinel (test/omni.dart, decision 4). Only typify/stringify/pathify know
59
+ // what to do with it; every other section wants the port's single `null`,
60
+ // which is exactly what the retired runner passed.
61
+ dynamic _plain(dynamic val) => identical(val, s.pathifyNoArg) ? null : val;
62
+
63
+ // Drive one corpus section. A missing, non-set or EMPTY section fails here,
64
+ // before any subject runs: a renamed fixture must not report PASS over zero
65
+ // assertions.
66
+ Future<void> _sec(String cat, String name, bool nulls,
67
+ dynamic Function(dynamic) subject,
68
+ {bool noarg = false}) async {
69
+ final catspec = s.getprop(_spec, cat);
70
+ ok(null != catspec,
71
+ 'struct corpus category missing: ' + cat + ' - check .sdk/test/struct/');
72
+
73
+ final secspec = s.getprop(catspec, name);
74
+ ok(null != secspec,
75
+ 'struct corpus section missing: ' + cat + '.' + name +
76
+ ' - check .sdk/test/struct/');
77
+
78
+ final testset = s.getprop(secspec, 'set');
79
+ ok(testset is List && testset.isNotEmpty,
80
+ 'struct corpus section is EMPTY: ' + cat + '.' + name +
81
+ ' - zero cases would run');
82
+
83
+ await _run().runsetflags(secspec, Flags(nulls: nulls, name: cat + '.' + name),
84
+ (dynamic val) => subject(noarg ? val : _plain(val)));
85
+ }
86
+
87
+ // A section that is ONE case rather than a set (merge.basic, inject.basic,
88
+ // transform.basic): wrapped into a one-entry set so the same engine, the
89
+ // same normalisation and the same failure text apply.
90
+ Future<void> _one(String cat, String name,
91
+ dynamic Function(dynamic) subject) async {
92
+ final catspec = s.getprop(_spec, cat);
93
+ ok(null != catspec,
94
+ 'struct corpus category missing: ' + cat + ' - check .sdk/test/struct/');
95
+
96
+ final node = s.getprop(catspec, name);
97
+ ok(node is Map && node.containsKey('in'),
98
+ 'struct corpus single-case section missing: ' + cat + '.' + name);
99
+
100
+ await _run().runsetflags({
101
+ 'set': [node]
102
+ }, Flags(name: cat + '.' + name), (dynamic val) => subject(_plain(val)));
103
+ }
104
+
105
+ // ---------------------------------------------------------------------------
106
+ // Subjects that need more than one expression
107
+ // ---------------------------------------------------------------------------
108
+
109
+ dynamic _walkCopySubject(dynamic vin) {
110
+ var cur = <dynamic>[null];
111
+ walkcopy(key, v, parent, path) {
112
+ if (key == null) {
113
+ cur[0] = [
114
+ s.ismap(v) ? <String, dynamic>{} : (s.islist(v) ? <dynamic>[] : v)
115
+ ];
116
+ return v;
117
+ }
118
+ var i = s.size(path);
119
+ dynamic nv;
120
+ if (s.isnode(v)) {
121
+ var c = cur[0] as List;
122
+ while (c.length <= i) {
123
+ c.add(null);
124
+ }
125
+ nv = s.ismap(v) ? <String, dynamic>{} : <dynamic>[];
126
+ c[i] = nv;
127
+ } else {
128
+ nv = v;
129
+ }
130
+ s.setprop(s.getelem(cur[0], i - 1), key, nv);
131
+ return v;
132
+ }
133
+
134
+ s.walk(vin, before: walkcopy);
135
+ return s.getelem(cur[0], 0);
136
+ }
137
+
138
+ dynamic _walkDepthSubject(dynamic vin) {
139
+ var state = <String, dynamic>{'top': null, 'cur': null};
140
+ copy(key, v, parent, path) {
141
+ if (key == null || s.isnode(v)) {
142
+ var child = s.islist(v) ? <dynamic>[] : <String, dynamic>{};
143
+ if (key == null) {
144
+ state['top'] = child;
145
+ state['cur'] = child;
146
+ } else {
147
+ s.setprop(state['cur'], key, child);
148
+ state['cur'] = child;
149
+ }
150
+ } else {
151
+ s.setprop(state['cur'], key, v);
152
+ }
153
+ return v;
154
+ }
155
+
156
+ s.walk(_vget(vin, 'src'), before: copy, maxdepth: _vget(vin, 'maxdepth'));
157
+ return state['top'];
158
+ }
159
+
160
+ dynamic _walkLogSubject(dynamic vin) {
161
+ var log = <dynamic>[];
162
+ walklog(key, v, parent, path) {
163
+ s.setprop(
164
+ log,
165
+ s.size(log),
166
+ 'k=' +
167
+ (key == null ? s.stringify() : s.stringify(key)) +
168
+ ', v=' +
169
+ s.stringify(v) +
170
+ ', p=' +
171
+ (parent == null ? s.stringify() : s.stringify(parent)) +
172
+ ', t=' +
173
+ s.pathify(path));
174
+ return v;
175
+ }
176
+
177
+ s.walk(vin, after: walklog);
178
+ return log;
179
+ }
180
+
181
+ // ---------------------------------------------------------------------------
182
+ // The suite
183
+ // ---------------------------------------------------------------------------
184
+
185
+ void tests() {
186
+ describe('struct', () {
187
+
188
+ test('exists', (t) {
189
+ final u = ProjectNameSDK.test().utility().struct;
190
+
191
+ const fns = [
192
+ 'clone', 'delprop', 'escre', 'escurl', 'filter',
193
+ 'flatten', 'getelem', 'getprop',
194
+ 'getpath', 'haskey', 'inject', 'isempty', 'isfunc',
195
+ 'iskey', 'islist', 'ismap', 'isnode', 'items',
196
+ 'join', 'jsonify', 'keysof', 'merge', 'pad', 'pathify',
197
+ 'select', 'setpath', 'size', 'slice', 'setprop',
198
+ 'strkey', 'stringify', 'transform', 'typify', 'typename',
199
+ 'validate', 'walk',
200
+ ];
201
+
202
+ for (final fn in fns) {
203
+ ok(null != u.byName(fn), fn + ' should be a function');
204
+ }
205
+ });
206
+
207
+ test('minor', (t) async {
208
+ await _sec('minor', 'isnode', true, (v) => s.isnode(v));
209
+ await _sec('minor', 'ismap', true, (v) => s.ismap(v));
210
+ await _sec('minor', 'islist', true, (v) => s.islist(v));
211
+ await _sec('minor', 'iskey', false, (v) => s.iskey(v));
212
+ await _sec('minor', 'strkey', false, (v) => s.strkey(v));
213
+ await _sec('minor', 'isempty', false, (v) => s.isempty(v));
214
+ await _sec('minor', 'isfunc', true, (v) => s.isfunc(v));
215
+ await _sec('minor', 'clone', false, (v) => s.clone(v));
216
+ await _sec('minor', 'escre', true, (v) => s.escre(v));
217
+ await _sec('minor', 'escurl', true, (v) => s.escurl(v));
218
+
219
+ await _sec('minor', 'stringify', false, (vin) => _vhas(vin, 'val')
220
+ ? s.stringify(_vget(vin, 'val'), _vget(vin, 'max'))
221
+ : s.stringify());
222
+
223
+ await _sec('minor', 'jsonify', false,
224
+ (vin) => s.jsonify(_vget(vin, 'val'), _vget(vin, 'flags')));
225
+
226
+ await _sec('minor', 'getelem', false, (vin) {
227
+ var alt = _vget(vin, 'alt');
228
+ return alt == null
229
+ ? s.getelem(_vget(vin, 'val'), _vget(vin, 'key'))
230
+ : s.getelem(_vget(vin, 'val'), _vget(vin, 'key'), alt);
231
+ });
232
+
233
+ await _sec('minor', 'delprop', true,
234
+ (vin) => s.delprop(_vget(vin, 'parent'), _vget(vin, 'key')));
235
+
236
+ await _sec('minor', 'size', false, (v) => s.size(v));
237
+
238
+ await _sec('minor', 'slice', false,
239
+ (vin) => s.slice(_vget(vin, 'val'), _vget(vin, 'start'),
240
+ _vget(vin, 'end')));
241
+
242
+ await _sec('minor', 'pad', false,
243
+ (vin) => s.pad(_vget(vin, 'val'), _vget(vin, 'pad'),
244
+ _vget(vin, 'char')));
245
+
246
+ await _sec('minor', 'pathify', false, (vin) => _vhas(vin, 'path')
247
+ ? s.pathify(_vget(vin, 'path'), _vget(vin, 'from'))
248
+ : s.pathify(s.pathifyNoArg, _vget(vin, 'from')));
249
+
250
+ await _sec('minor', 'items', true, (v) => s.items(v));
251
+
252
+ await _sec('minor', 'getprop', false, (vin) {
253
+ var alt = _vget(vin, 'alt');
254
+ return alt == null
255
+ ? s.getprop(_vget(vin, 'val'), _vget(vin, 'key'))
256
+ : s.getprop(_vget(vin, 'val'), _vget(vin, 'key'), alt);
257
+ });
258
+
259
+ await _sec('minor', 'setprop', true,
260
+ (vin) => s.setprop(_vget(vin, 'parent'), _vget(vin, 'key'),
261
+ _vget(vin, 'val')));
262
+
263
+ await _sec('minor', 'haskey', false,
264
+ (vin) => s.haskey(_vget(vin, 'src'), _vget(vin, 'key')));
265
+
266
+ await _sec('minor', 'keysof', true, (v) => s.keysof(v));
267
+
268
+ await _sec('minor', 'join', false,
269
+ (vin) => s.join(_vget(vin, 'val'), _vget(vin, 'sep'),
270
+ _vget(vin, 'url')));
271
+
272
+ // The one section that must see a zero-argument entry AS one: the
273
+ // corpus distinguishes `typify()` (T_noval) from `typify(null)`
274
+ // (T_null), so the port's no-value sentinel goes through unmapped.
275
+ await _sec('minor', 'typify', false, (v) => s.typify(v), noarg: true);
276
+
277
+ await _sec('minor', 'setpath', false,
278
+ (vin) => s.setpath(_vget(vin, 'store'), _vget(vin, 'path'),
279
+ _vget(vin, 'val')));
280
+
281
+ await _sec('minor', 'filter', true, (vin) {
282
+ bool Function(List<dynamic>) check;
283
+ var c = _vget(vin, 'check');
284
+ if (c == 'gt3') {
285
+ check = (n) => n[1] is num && n[1] > 3;
286
+ } else if (c == 'lt3') {
287
+ check = (n) => n[1] is num && n[1] < 3;
288
+ } else {
289
+ check = (n) => false;
290
+ }
291
+ return s.filter(_vget(vin, 'val'), check);
292
+ });
293
+
294
+ await _sec('minor', 'typename', true,
295
+ (v) => s.typename(v is num ? v.toInt() : 0));
296
+
297
+ await _sec('minor', 'flatten', true, (vin) {
298
+ var d = _vget(vin, 'depth');
299
+ return s.flatten(_vget(vin, 'val'), d is num ? d.toInt() : 1);
300
+ });
301
+ });
302
+
303
+ test('walk', (t) async {
304
+ // walk.log is one case whose `out` carries three logs; the corpus has
305
+ // always been driven on the `after` walk alone (before/both remain an
306
+ // open coverage gap, as they were under the retired runner).
307
+ final walks = s.getprop(_spec, 'walk');
308
+ ok(null != walks, 'struct corpus category missing: walk');
309
+ final log = s.getprop(walks, 'log');
310
+ ok(null != s.getpath(log, ['out', 'after']),
311
+ 'struct corpus section missing: walk.log.out.after');
312
+ await _run().runsetflags({
313
+ 'set': [
314
+ {'in': s.getprop(log, 'in'), 'out': s.getpath(log, ['out', 'after'])}
315
+ ]
316
+ }, Flags(name: 'walk.log'), (dynamic vin) => _walkLogSubject(vin));
317
+
318
+ await _sec('walk', 'basic', true, (vin) => s.walk(vin,
319
+ after: (k, v, p, path) {
320
+ if (v is String) {
321
+ return v + '~' + (path as List).map((e) => s.jsString(e)).join('.');
322
+ }
323
+ return v;
324
+ }));
325
+
326
+ await _sec('walk', 'copy', true, _walkCopySubject);
327
+ await _sec('walk', 'depth', false, _walkDepthSubject);
328
+ });
329
+
330
+ test('merge', (t) async {
331
+ await _one('merge', 'basic', (vin) => s.merge(s.clone(vin)));
332
+ await _sec('merge', 'cases', true, (v) => s.merge(v));
333
+ await _sec('merge', 'array', true, (v) => s.merge(v));
334
+ await _sec('merge', 'integrity', true, (v) => s.merge(v));
335
+ await _sec('merge', 'depth', true,
336
+ (vin) => s.merge(_vget(vin, 'val'), _vget(vin, 'depth')));
337
+ });
338
+
339
+ test('getpath', (t) async {
340
+ await _sec('getpath', 'basic', true,
341
+ (vin) => s.getpath(_vget(vin, 'store'), _vget(vin, 'path')));
342
+
343
+ await _sec('getpath', 'relative', true, (vin) {
344
+ var dp = _vget(vin, 'dpath');
345
+ var dpath = dp is String ? dp.split('.') : null;
346
+ var injdef = {'dparent': _vget(vin, 'dparent'), 'dpath': dpath};
347
+ return s.getpath(_vget(vin, 'store'), _vget(vin, 'path'), injdef);
348
+ });
349
+
350
+ await _sec('getpath', 'special', true,
351
+ (vin) => s.getpath(_vget(vin, 'store'), _vget(vin, 'path'),
352
+ _vget(vin, 'inj')));
353
+
354
+ await _sec('getpath', 'handler', true, (vin) {
355
+ var store = {'\$TOP': _vget(vin, 'store'), '\$FOO': () => 'foo'};
356
+ handler(inj, val, ref, st) => s.isfunc(val) ? val() : val;
357
+ return s.getpath(store, _vget(vin, 'path'), {'handler': handler});
358
+ });
359
+ });
360
+
361
+ test('inject', (t) async {
362
+ await _one(
363
+ 'inject',
364
+ 'basic',
365
+ (vin) => s.inject(s.clone(s.getprop(vin, 'val')),
366
+ s.clone(s.getprop(vin, 'store'))));
367
+
368
+ await _sec('inject', 'string', true,
369
+ (vin) => s.inject(_vget(vin, 'val'), _vget(vin, 'store'),
370
+ {'modify': nullModifier, 'extra': _vget(vin, 'current')}));
371
+
372
+ await _sec('inject', 'deep', true,
373
+ (vin) => s.inject(_vget(vin, 'val'), _vget(vin, 'store')));
374
+ });
375
+
376
+ test('transform', (t) async {
377
+ await _one('transform', 'basic',
378
+ (vin) => s.transform(s.getprop(vin, 'data'), s.getprop(vin, 'spec')));
379
+
380
+ for (var gn in ['paths', 'cmds', 'each', 'pack', 'ref']) {
381
+ await _sec('transform', gn, true,
382
+ (vin) => s.transform(_vget(vin, 'data'), _vget(vin, 'spec')));
383
+ }
384
+
385
+ await _sec('transform', 'modify', true, (vin) {
386
+ modifier(v, key, parent, inj) {
387
+ if (v is String && key != null && parent != null) {
388
+ s.setprop(parent, key, '@' + v);
389
+ }
390
+ }
391
+
392
+ return s.transform(_vget(vin, 'data'), _vget(vin, 'spec'),
393
+ {'modify': modifier, 'extra': _vget(vin, 'store')});
394
+ });
395
+
396
+ await _sec('transform', 'format', false,
397
+ (vin) => s.transform(_vget(vin, 'data'), _vget(vin, 'spec')));
398
+
399
+ await _sec('transform', 'apply', true,
400
+ (vin) => s.transform(_vget(vin, 'data'), _vget(vin, 'spec')));
401
+ });
402
+
403
+ test('validate', (t) async {
404
+ await _sec('validate', 'basic', false,
405
+ (vin) => s.validate(_vget(vin, 'data'), _vget(vin, 'spec')));
406
+
407
+ for (var gn in ['child', 'one', 'exact']) {
408
+ await _sec('validate', gn, true,
409
+ (vin) => s.validate(_vget(vin, 'data'), _vget(vin, 'spec')));
410
+ }
411
+
412
+ await _sec('validate', 'invalid', false,
413
+ (vin) => s.validate(_vget(vin, 'data'), _vget(vin, 'spec')));
414
+
415
+ await _sec('validate', 'special', true,
416
+ (vin) => s.validate(_vget(vin, 'data'), _vget(vin, 'spec'),
417
+ _vget(vin, 'inj')));
418
+ });
419
+
420
+ test('select', (t) async {
421
+ for (var gn in ['basic', 'operators', 'edge', 'alts']) {
422
+ await _sec('select', gn, true,
423
+ (vin) => s.select(_vget(vin, 'obj'), _vget(vin, 'query')));
424
+ }
425
+ });
426
+
427
+ // Does a PRESENT key holding a JSON null read as "no value"? Opt-in per
428
+ // project: create-sdkgen ships the section, an older project corpus may
429
+ // predate it — say so OUT LOUD as a skip rather than passing vacuously.
430
+ // Every lane runs {null: false}: without the flag the runner rewrites
431
+ // every null to '__NULL__' and the section asserts nothing about null.
432
+ test('nullsem', (t) async {
433
+ final nullsem = s.getprop(_spec, 'nullsem');
434
+ if (null == nullsem) {
435
+ t.skip('corpus predates struct.nullsem - refresh .sdk/test/struct '
436
+ 'from create-sdkgen');
437
+ return;
438
+ }
439
+
440
+ await _sec('nullsem', 'getprop', false, (vin) => _vhas(vin, 'alt')
441
+ ? s.getprop(_vget(vin, 'val'), _vget(vin, 'key'), _vget(vin, 'alt'))
442
+ : s.getprop(_vget(vin, 'val'), _vget(vin, 'key')));
443
+
444
+ await _sec('nullsem', 'getelem', false, (vin) => _vhas(vin, 'alt')
445
+ ? s.getelem(_vget(vin, 'val'), _vget(vin, 'key'), _vget(vin, 'alt'))
446
+ : s.getelem(_vget(vin, 'val'), _vget(vin, 'key')));
447
+
448
+ await _sec('nullsem', 'getpath', false,
449
+ (vin) => s.getpath(_vget(vin, 'store'), _vget(vin, 'path')));
450
+
451
+ await _sec('nullsem', 'haskey', false,
452
+ (vin) => s.haskey(_vget(vin, 'src'), _vget(vin, 'key')));
453
+
454
+ await _sec('nullsem', 'keysof', false, (v) => s.keysof(v));
455
+ });
456
+
457
+ // The vacuity guard the retired runner spelled as `0 < passCount`: a
458
+ // suite that stopped executing the corpus would otherwise stay green.
459
+ test('corpus-cases', (t) {
460
+ final cases = _run().caseCount;
461
+ print('struct corpus: cases ' + cases.toString());
462
+ ok(1000 < cases,
463
+ 'struct corpus drove only ' + cases.toString() +
464
+ ' cases - the corpus stopped running');
465
+ });
466
+
467
+ });
468
+ }
@@ -0,0 +1,198 @@
1
+ // Shared utility functions for unit tests.
2
+ //
3
+ // Provides the sdk-test-control.json loader (per-SDK skip control), the
4
+ // env-override helper for live-mode configuration, and test data path
5
+ // resolution. Port of the donor ts test/utility.ts.
6
+
7
+ import 'dart:convert';
8
+ import 'dart:io';
9
+
10
+ import 'harness.dart' show T;
11
+
12
+ // Resolve a path relative to the package root (CWD) or the test dir.
13
+ String resolveTestPath(String rel) {
14
+ if (File(rel).existsSync()) {
15
+ return rel;
16
+ }
17
+ try {
18
+ final scriptDir = File(Platform.script.toFilePath()).parent.path;
19
+ final alt = scriptDir + '/../' + rel;
20
+ if (File(alt).existsSync()) {
21
+ return alt;
22
+ }
23
+ final alt2 = scriptDir + '/' + rel;
24
+ if (File(alt2).existsSync()) {
25
+ return alt2;
26
+ }
27
+ } catch (_e) {
28
+ // Fall through to the raw path.
29
+ }
30
+ return rel;
31
+ }
32
+
33
+ // Overrides configuration values with environment variables if available.
34
+ Map<String, dynamic> envOverride(Map<String, dynamic> m) {
35
+ final env = Platform.environment;
36
+
37
+ if ('TRUE' == env['PROJECTENV_TEST_LIVE'] ||
38
+ 'TRUE' == env['PROJECTENV_TEST_OVERRIDE']) {
39
+ for (final k in m.keys.toList()) {
40
+ var envval = env[k];
41
+ if (null != envval) {
42
+ envval = envval.trim();
43
+ m[k] = envval.startsWith('{') ? jsonDecode(envval) : envval;
44
+ }
45
+ }
46
+ }
47
+
48
+ m['PROJECTENV_TEST_EXPLAIN'] =
49
+ env['PROJECTENV_TEST_EXPLAIN'] ?? m['PROJECTENV_TEST_EXPLAIN'];
50
+
51
+ return m;
52
+ }
53
+
54
+ // Loads sdk-test-control.json (cached). Returns an empty-skip object if
55
+ // the file is missing or unparsable so tests never crash on a bad config.
56
+ Map<String, dynamic>? _testControlCache;
57
+
58
+ Map<String, dynamic> loadTestControl() {
59
+ if (null != _testControlCache) {
60
+ return _testControlCache!;
61
+ }
62
+ try {
63
+ final path = resolveTestPath('test/sdk-test-control.json');
64
+ _testControlCache = Map<String, dynamic>.from(
65
+ jsonDecode(File(path).readAsStringSync()));
66
+ } catch (_e) {
67
+ _testControlCache = {
68
+ 'version': 1,
69
+ 'test': {
70
+ 'skip': {
71
+ 'live': {'direct': [], 'entityOp': []},
72
+ 'unit': {'direct': [], 'entityOp': []},
73
+ }
74
+ }
75
+ };
76
+ }
77
+ return _testControlCache!;
78
+ }
79
+
80
+ // Returns the skip decision for a given test name from sdk-test-control.json.
81
+ // `kind` is 'direct' (matches by `test` field) or 'entityOp' (matches by
82
+ // `entity` + `op`). `mode` is 'live' or 'unit'.
83
+ Map<String, dynamic> isControlSkipped(String kind, String name, String mode) {
84
+ final ctrl = loadTestControl();
85
+ dynamic list = [];
86
+ final t = ctrl['test'];
87
+ if (t is Map) {
88
+ final skip = t['skip'];
89
+ if (skip is Map) {
90
+ final m = skip[mode];
91
+ if (m is Map) {
92
+ list = m[kind] ?? [];
93
+ }
94
+ }
95
+ }
96
+ for (final e in (list as List)) {
97
+ if (e is! Map) {
98
+ continue;
99
+ }
100
+ if ('direct' == kind && e['test'] == name) {
101
+ return {'skip': true, 'reason': e['reason']};
102
+ }
103
+ if ('entityOp' == kind) {
104
+ final key = (e['entity'] ?? '').toString() + '.' + (e['op'] ?? '').toString();
105
+ if (key == name) {
106
+ return {'skip': true, 'reason': e['reason']};
107
+ }
108
+ }
109
+ }
110
+ return {'skip': false};
111
+ }
112
+
113
+ // Skips the current test if sdk-test-control.json lists it. Returns true
114
+ // when skipped (caller should `return` immediately).
115
+ bool maybeSkipControl(T t, String kind, String name, bool live) {
116
+ final decision = isControlSkipped(kind, name, live ? 'live' : 'unit');
117
+ if (true == decision['skip']) {
118
+ t.skip((decision['reason'] ?? 'skipped via sdk-test-control.json').toString());
119
+ return true;
120
+ }
121
+ return false;
122
+ }
123
+
124
+ // Skips the current live test when required idmap keys aren't supplied.
125
+ // Generated tests call this when they would otherwise pass null values
126
+ // into a path/query param and 4xx the request.
127
+ bool skipIfMissingIds(T t, Map setup, List<String> requiredKeys) {
128
+ if (true != setup['live']) {
129
+ return false;
130
+ }
131
+ final idmap = setup['idmap'];
132
+ final missing = requiredKeys
133
+ .where((k) => !(idmap is Map) || null == idmap[k])
134
+ .toList();
135
+ if (missing.isNotEmpty) {
136
+ t.skip('live test needs ' +
137
+ missing.join(', ') +
138
+ ' via *_ENTID env var (synthetic IDs only)');
139
+ return true;
140
+ }
141
+ return false;
142
+ }
143
+
144
+ // Per-test live pacing delay (ms). Read from sdk-test-control.json
145
+ // `test.live.delayMs`; defaults to 500ms if absent or invalid.
146
+ // Extra SDK options every LIVE client is constructed with, read from
147
+ // sdk-test-control.json `test.client.options`.
148
+ //
149
+ // The generated live client knows two things: the base URL (from the spec)
150
+ // and the credential (from the environment). Everything else about how a
151
+ // particular API wants to be talked to - which features to switch on, and
152
+ // with what settings - is a property of THAT API, known to the project and
153
+ // to nothing in the toolchain.
154
+ //
155
+ // Merged UNDER the generated fields, so the suite's own base/apikey/server
156
+ // values win: this ADDS to the live client, it does not redirect it.
157
+ //
158
+ // Reserved fields are stripped HERE rather than at each merge site: the
159
+ // generated map only names a field when the model calls for one, so a
160
+ // 'base' in this block would face no competing value and would silently
161
+ // redirect the whole suite - credential included - to another host.
162
+ const List<String> liveReserved = [
163
+ 'base', 'prefix', 'suffix', 'server', 'apikey', 'secret'
164
+ ];
165
+
166
+ Map<String, dynamic> liveClientOptions() {
167
+ final ctrl = loadTestControl();
168
+ final t = ctrl['test'];
169
+ if (t is! Map) return <String, dynamic>{};
170
+ final c = t['client'];
171
+ if (c is! Map) return <String, dynamic>{};
172
+ final opts = c['options'];
173
+ if (opts is! Map) return <String, dynamic>{};
174
+
175
+ final out = <String, dynamic>{};
176
+ opts.forEach((k, v) {
177
+ if (!liveReserved.contains(k)) {
178
+ out['$k'] = v;
179
+ }
180
+ });
181
+ return out;
182
+ }
183
+
184
+
185
+ int liveDelayMs() {
186
+ final ctrl = loadTestControl();
187
+ final t = ctrl['test'];
188
+ final v = t is Map ? (t['live'] is Map ? t['live']['delayMs'] : null) : null;
189
+ return (v is num && v >= 0) ? v.toInt() : 500;
190
+ }
191
+
192
+ // Live pacing helper. Generated tests await this after live calls; it
193
+ // sleeps liveDelayMs() only when the SDK's *_TEST_LIVE env var is set.
194
+ Future<void> liveDelay(String liveEnvVar) async {
195
+ if ('TRUE' == Platform.environment[liveEnvVar]) {
196
+ await Future.delayed(Duration(milliseconds: liveDelayMs()));
197
+ }
198
+ }
@@ -0,0 +1,7 @@
1
+ // VENDORED: @voxgig/omni sdk-20260908-1556-0 (dart/lib/omni.dart)
2
+ // Source: https://github.com/voxgig/omni @ 274708cc2d12b21707d975543953f845f8444be0 [tag: sdk-20260908-1556-0]
3
+ // License: MIT (c) voxgig - see repository LICENSE. Do not edit: resync from upstream.
4
+ // voxgig_omni - shared multi-language test runner.
5
+
6
+ export 'runner.dart';
7
+ export 'util.dart';