@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,252 @@
1
+ -- The corpus test runner: vendored @voxgig/omni driven through its NATIVE
2
+ -- API (`makeRunnerSpec` / `runsetFlagsArgs`), presented to the corpus suites
3
+ -- in the shape they use (`spec`, `getset`, `runsetArgs`, `report`). No compat
4
+ -- shim is vendored: the adapter below IS the whole bridge, per language, per
5
+ -- the vendor-tag rollout. It is the Haskell peer of
6
+ -- tm/ocaml/test/omni_resolver.ml, tm/rust/tests/omni_resolver/mod.rs and
7
+ -- tm/java/test/OmniResolver.java: the portable answer for a statically typed
8
+ -- port with no reflection — omni's `Provider` is closure-based, so nothing in
9
+ -- omni ever has to name this SDK's types.
10
+ --
11
+ -- Haskell-specific decisions, each load-bearing:
12
+ --
13
+ -- 1. TWO VALUE MODELS, ONE CONVERSION PAIR. `Omni.Json` is an immutable
14
+ -- variant; the SDK's `VoxgigStruct.Value` carries its maps and lists in
15
+ -- IORefs. Every crossing is an explicit `tostruct` / `toomni`.
16
+ -- `Omni.Absent` <-> `VNoval` and `Omni.Null` <-> `VNull` keep the two
17
+ -- no-value states the corpus distinguishes apart — which is why this port
18
+ -- needs neither go's `novalargs` spec rewrite nor lua/php's compat shim
19
+ -- for the corpus's ZERO-ARGUMENT entries. An entry with no `in`/`args`/
20
+ -- `ctx` reaches the subject as one `Absent`, which becomes this port's own
21
+ -- `VNoval`, so the arity correction is structural rather than a special
22
+ -- case.
23
+ --
24
+ -- 2. ARGUMENTS ARE WRITTEN BACK. `Omni.SubjectArgs`
25
+ -- (`[Json] -> IO ([Json], Json)`) is the channel omni provides for a
26
+ -- subject that MUTATES its arguments, which `match: {args: ...}` then
27
+ -- asserts on. Decision 1 hands the subject a CONVERTED COPY — a fresh
28
+ -- IORef tree, not omni's value — so every subject here runs through
29
+ -- `runsetFlagsArgs` and the wrapper converts the (mutated) Values back
30
+ -- into omni's array after the call.
31
+ --
32
+ -- THE IOREFS DO NOT MAKE THIS FREE. A dynamic port gets the write-back
33
+ -- from shared object identity: omni's stored argument and the subject's
34
+ -- argument are one object. Here the mutation is visible in the `Value`
35
+ -- the wrapper built and nowhere else, because omni holds `Json`. The
36
+ -- mutability buys the SDK utilities their in-place writes; it does not
37
+ -- bridge the models.
38
+ --
39
+ -- 3. `match: {ctx: ...}` IS RETARGETED ONTO `match: {args: {"0": ...}}`.
40
+ -- A value-semantics consequence, not a choice, and the same one rust,
41
+ -- swift and ocaml hit. omni's `drive` stores the contextified first
42
+ -- argument as `entry.ctx` AND as `args[0]` — two copies of an immutable
43
+ -- value — and reads `entry.ctx` for the ctx base when checking. A
44
+ -- subject's post-call writes (decision 2) can never reach that copy, and
45
+ -- the `primary` entries that assert POST-call state would all read stale.
46
+ -- `args[0]` IS the ctx of a ctx entry (omni itself sets
47
+ -- `args = [entry.ctx]`), and the runner reads that array back after an
48
+ -- args-subject call — so moving the assertion from `ctx` to `args.0`
49
+ -- reads the SAME map, post-call, and preserves every leaf: nothing is
50
+ -- dropped, weakened or skipped. `retargetctx` does that rewrite on the
51
+ -- spec handed to the engine.
52
+ --
53
+ -- 4. KEY ORDER AND NUMBERS NEED NOTHING. omni's Haskell port models a map as
54
+ -- an ordered assoc list in document order and compares maps
55
+ -- order-independently (`deepequal`); this SDK's map is also
56
+ -- insertion-ordered. Both read every JSON number as `Double`. The round
57
+ -- trip is lossless in both directions — unlike rust (BTreeMap) or
58
+ -- go/csharp/java (integral doubles).
59
+ --
60
+ -- 5. SUBJECT FAILURES ARRIVE AS `ErrorCall`. omni's `errmessage` renders an
61
+ -- unknown exception through `displayException`, which would turn this
62
+ -- SDK's branded error into its `Show` form and break every entry that
63
+ -- matches on the message. So the wrapper translates a caught exception to
64
+ -- `ErrorCall` carrying just the message. `OmniError` is deliberately NOT
65
+ -- used: omni re-raises that as a runner error rather than treating it as
66
+ -- a candidate for an `err` expectation.
67
+ --
68
+ -- 6. FAILURES ARE ACCUMULATED, NOT RAISED. omni stops a group at its first
69
+ -- bad entry and raises; the corpus suites report the whole corpus in one
70
+ -- run. `runsetArgs` records the message and carries on, so one run still
71
+ -- names every section that regressed rather than only the first.
72
+
73
+ {-# LANGUAGE LambdaCase #-}
74
+ {-# LANGUAGE ScopedTypeVariables #-}
75
+
76
+ module OmniResolver
77
+ ( Runner
78
+ , newRunner
79
+ , getset
80
+ , runnerSpec
81
+ , runsetArgs
82
+ , tostruct
83
+ , toomni
84
+ , runnerPass
85
+ , runnerFail
86
+ , runnerFailures
87
+ ) where
88
+
89
+ import Control.Exception (SomeException, ErrorCall (..), displayException, throwIO, try)
90
+ import Control.Monad (foldM, forM, forM_)
91
+ import Data.IORef
92
+
93
+ import qualified Omni as O
94
+ import VoxgigStruct
95
+ ( Value (..)
96
+ , emptyList
97
+ , emptyMap
98
+ , keysof
99
+ , getprop
100
+ , mkList
101
+ , setprop
102
+ )
103
+
104
+
105
+ -- The corpus runner: omni's pack plus this run's accumulated outcome.
106
+ data Runner = Runner
107
+ { rnPack :: O.RunPack
108
+ , rnPass :: IORef Int
109
+ , rnFail :: IORef Int
110
+ , rnMsgs :: IORef [String]
111
+ }
112
+
113
+
114
+ runnerPass :: Runner -> IO Int
115
+ runnerPass = readIORef . rnPass
116
+
117
+ runnerFail :: Runner -> IO Int
118
+ runnerFail = readIORef . rnFail
119
+
120
+ runnerFailures :: Runner -> IO [String]
121
+ runnerFailures = readIORef . rnMsgs
122
+
123
+
124
+ -- ---- the conversion pair (decision 1) --------------------------------
125
+
126
+ -- omni's immutable Json -> this SDK's mutable Value.
127
+ tostruct :: O.Json -> IO Value
128
+ tostruct = \case
129
+ O.Absent -> pure VNoval
130
+ O.Null -> pure VNull
131
+ O.Bool b -> pure (VBool b)
132
+ O.Num n -> pure (VNum n)
133
+ O.Str s -> pure (VStr s)
134
+ O.JList xs -> mapM tostruct xs >>= mkList
135
+ O.JMap es -> do
136
+ m <- emptyMap
137
+ forM_ es $ \(k, v) -> do
138
+ sv <- tostruct v
139
+ _ <- setprop m (VStr k) sv
140
+ pure ()
141
+ pure m
142
+
143
+
144
+ -- This SDK's Value -> omni's Json. A VFunc has no corpus representation and
145
+ -- becomes Absent: the corpus never asserts on one, and rendering it as a
146
+ -- string would make a match read a function where it expects no value.
147
+ toomni :: Value -> IO O.Json
148
+ toomni = \case
149
+ VNoval -> pure O.Absent
150
+ VNull -> pure O.Null
151
+ VBool b -> pure (O.Bool b)
152
+ VNum n -> pure (O.Num n)
153
+ VStr s -> pure (O.Str s)
154
+ VSentinel t -> pure (O.Str t)
155
+ VFunc _ -> pure O.Absent
156
+ VList r -> do
157
+ xs <- readIORef r
158
+ O.JList <$> mapM toomni xs
159
+ VMap r -> do
160
+ es <- readIORef r
161
+ O.JMap <$> forM es (\(k, v) -> (,) k <$> toomni v)
162
+
163
+
164
+ -- ---- the spec rewrite (decision 3) -----------------------------------
165
+
166
+ -- Move every entry's `match.ctx` to `match.args.0`, everywhere in the spec.
167
+ -- Applied once, to the whole spec, before the engine sees it: an entry is
168
+ -- reached by walking maps and lists rather than by knowing the corpus's
169
+ -- shape, so a section that nests its entries differently is still covered.
170
+ retargetctx :: O.Json -> O.Json
171
+ retargetctx node = case node of
172
+ O.JMap es -> O.JMap (map (\(k, v) -> (k, retargetctx v)) (rewrite es))
173
+ O.JList xs -> O.JList (map retargetctx xs)
174
+ _ -> node
175
+ where
176
+ rewrite es = case lookup "match" es of
177
+ Just m@(O.JMap mes) | not (O.isabsent (O.jget m "ctx")) ->
178
+ let rest = filter ((/= "ctx") . fst) mes
179
+ args = O.JMap [("0", O.jget m "ctx")]
180
+ merged = case lookup "args" mes of
181
+ Just (O.JMap ames) ->
182
+ O.JMap (("0", O.jget m "ctx") : filter ((/= "0") . fst) ames)
183
+ _ -> args
184
+ in map (\(k, v) -> if k == "match"
185
+ then (k, O.JMap (("args", merged) : filter ((/= "args") . fst) rest))
186
+ else (k, v)) es
187
+ _ -> es
188
+
189
+
190
+ -- ---- construction ----------------------------------------------------
191
+
192
+ -- A runner over the whole corpus, rooted at `name` (the corpus subtree the
193
+ -- suite drives, e.g. "primary").
194
+ newRunner :: O.Json -> String -> IO Runner
195
+ newRunner alltests name = do
196
+ pack <- O.makeRunnerSpec (retargetctx alltests) O.emptyProvider name
197
+ Runner pack <$> newIORef 0 <*> newIORef 0 <*> newIORef []
198
+
199
+
200
+ -- The set for a section, by name. The corpus nests a section's entries one
201
+ -- level down (`<section>.basic.set`), and omni's `packSet` is a single-level
202
+ -- lookup on the spec it was rooted at — so the path is walked here, as the
203
+ -- ocaml peer's `getset r [name; "basic"]` does.
204
+ getset :: Runner -> String -> O.Json
205
+ getset r name = O.getpath (O.packSpec (rnPack r)) [name, "basic"]
206
+
207
+
208
+ -- The spec the engine holds, for a section that reads its own DEF block.
209
+ runnerSpec :: Runner -> O.Json
210
+ runnerSpec = O.packSpec . rnPack
211
+
212
+
213
+ -- ---- driving (decisions 2, 5, 6) -------------------------------------
214
+
215
+ -- Run one section through a subject that takes the corpus's arguments as
216
+ -- Values and may mutate them in place.
217
+ --
218
+ -- The subject's own failure is a candidate for an `err` expectation, so it is
219
+ -- translated to `ErrorCall` (decision 5) and left to omni. A failure of the
220
+ -- SET is this run's to record (decision 6), never to raise.
221
+ runsetArgs :: Runner -> String -> ([Value] -> IO Value) -> IO ()
222
+ runsetArgs r name subject = do
223
+ let pack = rnPack r
224
+ outcome <- try (O.runsetFlagsArgs pack (getset r name) O.defaultFlags wrapped)
225
+ case outcome of
226
+ Right () -> modifyIORef' (rnPass r) (+ 1)
227
+ Left (e :: SomeException) -> do
228
+ modifyIORef' (rnFail r) (+ 1)
229
+ modifyIORef' (rnMsgs r) (++ ["primary." ++ name ++ ": " ++ O.errmessage e])
230
+ where
231
+ wrapped :: O.SubjectArgs
232
+ wrapped jargs = do
233
+ vargs <- mapM tostruct jargs
234
+ res <- try (subject vargs)
235
+ -- The arguments are converted back WHETHER OR NOT the subject failed:
236
+ -- an `err` entry can still assert on the state the call left behind,
237
+ -- and omni reads the array either way.
238
+ jargs' <- mapM toomni vargs
239
+ case res of
240
+ Right v -> do
241
+ jv <- toomni v
242
+ pure (jargs', jv)
243
+ Left (e :: SomeException) -> throwIO (ErrorCall (plainmessage e))
244
+
245
+
246
+ -- The message a corpus `err` entry matches on, stripped of the exception's
247
+ -- own rendering. `displayException` on this SDK's branded error yields its
248
+ -- Show form; the first line of it is the message the corpus wrote.
249
+ plainmessage :: SomeException -> String
250
+ plainmessage e = case lines (displayException e) of
251
+ (l : _) -> l
252
+ [] -> displayException e
@@ -0,0 +1,49 @@
1
+ -- ProjectName SDK test runner. Drives the SDK template test suites (pipeline,
2
+ -- feature, netsim, custom-utility, primary-utility), the generated per-entity
3
+ -- tests, and the vendored struct corpus (the `struct` subtree of the shared
4
+ -- ../.sdk/test/test.json). Exits non-zero on any failure.
5
+
6
+ module Main where
7
+
8
+ import Control.Monad (forM_)
9
+ import Data.IORef
10
+ import System.Exit (exitFailure)
11
+
12
+ import Testutil
13
+ import SdkJson (jsonRead)
14
+ import StructCorpus (runStructCorpus)
15
+ import qualified TPipeline
16
+ import qualified TFeature
17
+ import qualified TNetsim
18
+ import qualified TCustomUtility
19
+ import qualified TPrimaryUtility
20
+ import qualified TPrimaryCorpus
21
+ import qualified SdkGenTests
22
+
23
+ main :: IO ()
24
+ main = do
25
+ c <- newCounters
26
+
27
+ raw <- readFile "../.sdk/test/test.json"
28
+ alltests <- jsonRead raw
29
+
30
+ TPipeline.tests c
31
+ TFeature.tests c
32
+ TNetsim.tests c
33
+ TCustomUtility.tests c
34
+ TPrimaryUtility.tests c alltests
35
+ TPrimaryCorpus.tests c alltests
36
+ SdkGenTests.genTests c
37
+
38
+ fs <- readIORef (failures c)
39
+ forM_ fs putStrLn
40
+ p <- readIORef (npass c)
41
+ f <- readIORef (nfail c)
42
+
43
+ (sp, sf) <- runStructCorpus alltests
44
+
45
+ putStrLn ("\nSDK PASS " ++ show p ++ " FAIL " ++ show f)
46
+ putStrLn ("STRUCT PASS " ++ show sp ++ " FAIL " ++ show sf)
47
+ putStrLn ("TOTAL PASS " ++ show (p + sp) ++ " FAIL " ++ show (f + sf))
48
+
49
+ if f + sf > 0 then exitFailure else pure ()