@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,177 @@
1
+
2
+ import { cmp, each, Content, canonToType, canonKey, canonScalarKey, entityIdField, opRequestShape, safeVarName, exampleVarName, matchArg, idLiteral } from '@voxgig/sdkgen'
3
+
4
+ import {
5
+ KIT,
6
+ getModelPath,
7
+ } from '@voxgig/apidef'
8
+
9
+
10
+ // Type names come from the shared canonToType 'dart' column (single source of truth).
11
+
12
+ // A type-correct Dart literal for a field's canonical type. Strings render
13
+ // the quoted placeholder (single-quoted, matching the generated Dart style).
14
+ function dartLit(type: any, placeholder: string = 'example'): string {
15
+ const k = canonScalarKey(type)
16
+ if ('INTEGER' === k || 'NUMBER' === k) return '1'
17
+ if ('BOOLEAN' === k) return 'true'
18
+ if ('ARRAY' === k) return '<dynamic>[]'
19
+ if ('OBJECT' === k) return '<String, dynamic>{}'
20
+ return `'${placeholder}'`
21
+ }
22
+
23
+
24
+ // Op method spellings + descriptions (language-agnostic wording).
25
+ // A `list()` on a NESTED entity needs its parent path params. The
26
+ // quickstart used to emit `client.Moon().list()` for an entity at
27
+ // `/planet/{planet_id}/moon`, which 404s against a live server from a
28
+ // half-built URL — indistinguishable from "no such record". The model
29
+ // already marks those params `reqd: true`; matchArg renders exactly them.
30
+ function listMatchArg(ent: any): string {
31
+ const idF = entityIdField(ent)
32
+ return matchArg('ts', ent, 'list', idF, idLiteral(ent, 'list', idF))
33
+ }
34
+
35
+
36
+ const OP_DESC: Record<string, { method: string, desc: string }> = {
37
+ load: { method: 'load(match)', desc: 'Load a single entity by match criteria.' },
38
+ list: { method: 'list()', desc: 'List entities, optionally matching the given criteria.' },
39
+ create: { method: 'create(data)', desc: 'Create a new entity with the given data.' },
40
+ update: { method: 'update(data)', desc: 'Update an existing entity.' },
41
+ remove: { method: 'remove(match)', desc: 'Remove the matching entity.' },
42
+ }
43
+
44
+
45
+ const ReadmeEntity = cmp(function ReadmeEntity(props: any) {
46
+ const { target } = props
47
+ const { model } = props.ctx$
48
+
49
+ const entity = getModelPath(model, `main.${KIT}.entity`)
50
+
51
+ const publishedEntities = each(entity)
52
+ .filter((entity: any) => entity.active !== false)
53
+
54
+ if (0 === publishedEntities.length) {
55
+ return
56
+ }
57
+
58
+ Content(`
59
+
60
+ ## Entities
61
+
62
+ `)
63
+
64
+ publishedEntities.map((entity: any) => {
65
+ const opnames = Object.keys(entity.op || {})
66
+ const fields = entity.fields || []
67
+ // Model-driven id key: null when this entity has no id-like field.
68
+ const idF = entityIdField(entity)
69
+ const eVar = exampleVarName(entity.name, 'dart')
70
+
71
+ Content(`
72
+ ### ${entity.Name}
73
+
74
+ `)
75
+
76
+ if (entity.short) {
77
+ Content(`${entity.short}
78
+
79
+ `)
80
+ }
81
+
82
+ Content(`Create an instance: \`final ${eVar} = client.${entity.Name}();\`
83
+
84
+ `)
85
+
86
+ if (opnames.length > 0) {
87
+ Content(`#### Operations
88
+
89
+ | Method | Description |
90
+ | --- | --- |
91
+ `)
92
+ opnames.map((opname: string) => {
93
+ const info = OP_DESC[opname]
94
+ if (info) {
95
+ Content(`| \`${info.method}\` | ${info.desc} |
96
+ `)
97
+ }
98
+ })
99
+
100
+ Content(`
101
+ `)
102
+ }
103
+
104
+ if (fields.length > 0) {
105
+ Content(`#### Fields
106
+
107
+ | Field | Type | Description |
108
+ | --- | --- | --- |
109
+ `)
110
+
111
+ each(fields, (field: any) => {
112
+ const desc = field.short || ''
113
+ Content(`| \`${field.name}\` | \`${canonToType(field.type, target.name)}\` | ${desc} |
114
+ `)
115
+ })
116
+
117
+ Content(`
118
+ `)
119
+ }
120
+
121
+ if (opnames.includes('load')) {
122
+ // The id key plus every REQUIRED match key (parent path params like
123
+ // page_id) — the same shape the runtime resolves path params from.
124
+ const loadItems = opRequestShape(entity, 'load').items
125
+ .filter((it: any) => !it.optional || it.name === idF)
126
+ .sort((a: any, b: any) =>
127
+ (a.name === idF ? 0 : 1) - (b.name === idF ? 0 : 1))
128
+ const loadArg = 0 < loadItems.length
129
+ ? `{${loadItems.map((it: any) =>
130
+ `'${it.name}': ${dartLit(it.type,
131
+ it.name === idF ? entity.name + '_id' : it.name)}`).join(', ')}}`
132
+ : ''
133
+ Content(`#### Example: Load
134
+
135
+ \`\`\`dart
136
+ final ${eVar} = await client.${entity.Name}().load(${loadArg});
137
+ \`\`\`
138
+
139
+ `)
140
+ }
141
+
142
+ if (opnames.includes('list')) {
143
+ Content(`#### Example: List
144
+
145
+ \`\`\`dart
146
+ final ${eVar}s = await client.${entity.Name}().list(${listMatchArg(entity)});
147
+ \`\`\`
148
+
149
+ `)
150
+ }
151
+
152
+ if (opnames.includes('create')) {
153
+ // Members come from the SAME shape the runtime validates
154
+ // (opRequestShape): every required member must appear.
155
+ const createItems = opRequestShape(entity, 'create').items
156
+ .filter((it: any) => !it.optional)
157
+ Content(`#### Example: Create
158
+
159
+ \`\`\`dart
160
+ final ${eVar} = await client.${entity.Name}().create({
161
+ `)
162
+ createItems.map((it: any) => {
163
+ Content(` '${it.name}': ${dartLit(it.type, 'example_' + it.name)}, // ${canonToType(it.type, target.name)}
164
+ `)
165
+ })
166
+ Content(`});
167
+ \`\`\`
168
+
169
+ `)
170
+ }
171
+ })
172
+ })
173
+
174
+
175
+ export {
176
+ ReadmeEntity
177
+ }
@@ -0,0 +1,238 @@
1
+
2
+ import { cmp, Content, File } from '@voxgig/sdkgen'
3
+
4
+ import {
5
+ KIT,
6
+ getModelPath,
7
+ nom,
8
+ } from '@voxgig/apidef'
9
+
10
+
11
+ // Emits dart/test/readme_examples_test.dart — a COMPLETENESS + PRESENCE gate
12
+ // over every ```dart fenced block in the three documents that ship dart
13
+ // examples:
14
+ // - the repository ROOT README.md (one directory above the dart/ package),
15
+ // - the per-language dart/README.md,
16
+ // - the per-language dart/REFERENCE.md.
17
+ //
18
+ // Unlike the interpreted-language gates (py/rb), which EXECUTE every runnable
19
+ // block in a subprocess, and the go gate, which COMPILES every block, this
20
+ // gate is a dependency-free STRUCTURAL gate that runs inside the dependency-
21
+ // free dart test harness (no `dart analyze`/`dart run` subprocess, so it never
22
+ // depends on a resolvable package_config at test time). Per document it:
23
+ // 1. extracts every ```dart fenced block (tagged by source doc + index);
24
+ // 2. classifies each block into exactly one of
25
+ // {runnable, illustration, compiled-nonrunnable} and asserts the
26
+ // partition is complete (total == runnable + illustration + compiled);
27
+ // 3. asserts PRESENCE: every available doc carries at least one dart block,
28
+ // and at least one RUNNABLE block (one that constructs the SDK or drives
29
+ // a `client`), so no doc silently ships zero exercised dart examples.
30
+ //
31
+ // A missing doc is SKIPPED (not failed) — the root README is optional in a
32
+ // single-language checkout. The dart source is written with the fence marker
33
+ // and newline built from escapes (` = backtick) so this template literal
34
+ // stays clean.
35
+ const ReadmeExamplesTest = cmp(function ReadmeExamplesTest(props: any) {
36
+ const { target, ctx$: { model } } = props
37
+
38
+ const Name = model.const.Name
39
+ const sdkClass = Name + 'SDK'
40
+
41
+ // The API's capitalised semantic entities — used to detect entity-factory
42
+ // references (client.<Entity>() ) inside a block.
43
+ const entities = Object.values(getModelPath(model, `main.${KIT}.entity`) || {})
44
+ .filter((e: any) => e && e.active !== false)
45
+ .map((e: any) => nom(e, 'Name'))
46
+ const entitiesLiteral = 0 === entities.length
47
+ ? '<String>[]'
48
+ : "<String>['" + entities.join("', '") + "']"
49
+
50
+ File({ name: 'readme_examples_test.' + target.ext }, () => {
51
+ Content(`// ${Name} SDK — documentation dart-examples presence & completeness gate.
52
+ // GENERATED — do not edit.
53
+ //
54
+ // A structural completeness gate over every dart fenced code block in three
55
+ // documents:
56
+ // - the repository ROOT README.md (one directory above the dart/ package),
57
+ // - the per-language dart/README.md,
58
+ // - the per-language dart/REFERENCE.md.
59
+ //
60
+ // For each available document it partitions every block into exactly one of
61
+ // {runnable, illustration, compiled-nonrunnable}, asserts the partition adds
62
+ // up, and asserts the doc carries at least one runnable dart example. A
63
+ // missing document is skipped, not failed.
64
+
65
+ import 'dart:io';
66
+
67
+ import 'harness.dart';
68
+ import 'utility.dart';
69
+
70
+ // The triple-backtick markdown code fence (\\u0060 == backtick) and newline,
71
+ // built from escapes so the generator template literal stays clean.
72
+ const String _fence = '\\u0060\\u0060\\u0060';
73
+ const String _nl = '\\n';
74
+
75
+ const String _sdkClass = '${sdkClass}';
76
+
77
+ // The API's capitalised semantic entities, used to spot a client.<Entity>()
78
+ // factory call inside a block.
79
+ const List<String> _entities = ${entitiesLiteral};
80
+
81
+ // The three documents held to the gate, tagged by human label and path
82
+ // (relative to the package root, which is the CWD for 'dart run test/...').
83
+ final List<List<String>> _docs = [
84
+ ['root README', '../README.md'],
85
+ ['dart README.md', 'README.md'],
86
+ ['dart REFERENCE.md', 'REFERENCE.md'],
87
+ ];
88
+
89
+ // Split the doc on the code fence: odd-indexed segments are the inside of a
90
+ // fenced block (an info string on the first line, then the code). Only fences
91
+ // whose info string is exactly 'dart' are returned, so signature/markdown
92
+ // tables and other-language fences are skipped.
93
+ List<String> _blocksIn(String text) {
94
+ final parts = text.split(_fence);
95
+ final blocks = <String>[];
96
+ for (var i = 1; i < parts.length; i += 2) {
97
+ final seg = parts[i];
98
+ final lines = seg.split(_nl);
99
+ final info = lines[0].trim();
100
+ if ('dart' == info) {
101
+ blocks.add(lines.sublist(1).join(_nl));
102
+ }
103
+ }
104
+ return blocks;
105
+ }
106
+
107
+ // A block is RUNNABLE — and therefore MUST be exercised — when it constructs
108
+ // the SDK (mentions the class) or drives a client the narrative built.
109
+ bool _isRunnable(String block) {
110
+ if (block.contains(_sdkClass)) {
111
+ return true;
112
+ }
113
+ if (block.contains('client.')) {
114
+ return true;
115
+ }
116
+ for (final ent in _entities) {
117
+ if (block.contains('.' + ent + '(')) {
118
+ return true;
119
+ }
120
+ }
121
+ return false;
122
+ }
123
+
124
+ // A NARROW illustration: a non-runnable block whose every non-blank line is a
125
+ // comment or an import — a pure signature/structure snippet with nothing to
126
+ // run. Anything with real statements falls to the compiled-nonrunnable bucket.
127
+ bool _isIllustration(String block) {
128
+ if (_isRunnable(block)) {
129
+ return false;
130
+ }
131
+ var sawLine = false;
132
+ for (final raw in block.split(_nl)) {
133
+ final line = raw.trim();
134
+ if ('' == line) {
135
+ continue;
136
+ }
137
+ sawLine = true;
138
+ if (line.startsWith('//')) {
139
+ continue;
140
+ }
141
+ if (line.startsWith('import ') || line.startsWith('export ')) {
142
+ continue;
143
+ }
144
+ return false;
145
+ }
146
+ return sawLine;
147
+ }
148
+
149
+ String _classify(String block) {
150
+ if (_isRunnable(block)) {
151
+ return 'runnable';
152
+ }
153
+ if (_isIllustration(block)) {
154
+ return 'illustration';
155
+ }
156
+ return 'compiled';
157
+ }
158
+
159
+ Map<String, int> _gate(String label, List<String> blocks) {
160
+ var runnable = 0;
161
+ var illustration = 0;
162
+ var compiled = 0;
163
+ for (final block in blocks) {
164
+ final kind = _classify(block);
165
+ if ('runnable' == kind) {
166
+ runnable++;
167
+ } else if ('illustration' == kind) {
168
+ illustration++;
169
+ } else {
170
+ compiled++;
171
+ }
172
+ }
173
+ final total = blocks.length;
174
+ print(_nl +
175
+ '[readme-examples] ' +
176
+ label +
177
+ ' dart blocks: total=' +
178
+ total.toString() +
179
+ ' runnable=' +
180
+ runnable.toString() +
181
+ ' compiled=' +
182
+ compiled.toString() +
183
+ ' illustration=' +
184
+ illustration.toString());
185
+
186
+ // Every block is accounted for by exactly one bucket.
187
+ ok(total == runnable + illustration + compiled,
188
+ label +
189
+ ': dart-block accounting does not add up — total=' +
190
+ total.toString() +
191
+ ' but runnable+compiled+illustration=' +
192
+ (runnable + illustration + compiled).toString());
193
+
194
+ return {
195
+ 'total': total,
196
+ 'runnable': runnable,
197
+ 'compiled': compiled,
198
+ 'illustration': illustration,
199
+ };
200
+ }
201
+
202
+ void tests() {
203
+ describe('ReadmeExamples', () {
204
+ for (final doc in _docs) {
205
+ final label = doc[0];
206
+ final rel = doc[1];
207
+
208
+ test('dart-examples: ' + label, (t) async {
209
+ final path = resolveTestPath(rel);
210
+ if (!File(path).existsSync()) {
211
+ t.skip(label + ' not found: ' + path);
212
+ return;
213
+ }
214
+
215
+ final text = File(path).readAsStringSync();
216
+ final blocks = _blocksIn(text);
217
+
218
+ ok(0 < blocks.length,
219
+ 'expected at least one dart block in ' + label);
220
+
221
+ final stats = _gate(label, blocks);
222
+
223
+ ok(0 < (stats['runnable'] ?? 0),
224
+ 'expected at least one runnable dart block in ' +
225
+ label +
226
+ ' (a block that constructs the SDK or drives a client)');
227
+ });
228
+ }
229
+ });
230
+ }
231
+ `)
232
+ })
233
+ })
234
+
235
+
236
+ export {
237
+ ReadmeExamplesTest
238
+ }
@@ -0,0 +1,53 @@
1
+
2
+ import { cmp, Content } from '@voxgig/sdkgen'
3
+
4
+ import { dartPackageName } from './Package_dart'
5
+
6
+
7
+ const ReadmeExplanation = cmp(function ReadmeExplanation(props: any) {
8
+ const { target, ctx$: { model } } = props
9
+
10
+ const Name = model.const.Name
11
+ const pkg = dartPackageName(model)
12
+
13
+ Content(`### Maps in, typed models alongside
14
+
15
+ The Dart SDK passes plain \`Map<String, dynamic>\` values through the
16
+ operation pipeline rather than requiring typed objects at every call. This
17
+ mirrors the dynamic nature of the API and keeps calls terse — a create is
18
+ just \`create({'name': 'example'})\`.
19
+
20
+ For a typed, documented view of each entity and operation, the generated
21
+ \`${Name}Types.dart\` provides a class per entity plus per-op request/match
22
+ classes (e.g. \`${Name}.fromMap(entity.data())\` and \`model.toMap()\`), so you
23
+ can convert to and from those maps wherever you want compile-time structure.
24
+
25
+ ### Package structure
26
+
27
+ \`\`\`
28
+ ${target.name}/
29
+ ├── lib/
30
+ │ ├── ${Name}SDK.dart -- Main SDK library (exported entry point)
31
+ │ ├── ${Name}Types.dart -- Typed entity + request/match models
32
+ │ ├── ${Name}EntityBase.dart -- Base class for entities
33
+ │ ├── ${Name}Error.dart -- SDK error type
34
+ │ ├── Config.dart -- Configuration
35
+ │ ├── entity/ -- Entity implementations
36
+ │ ├── feature/ -- Built-in features (base, test, log, ...)
37
+ │ └── utility/ -- Utility functions and vendored struct library
38
+ └── test/ -- Test suites (dart run test/main.dart)
39
+ \`\`\`
40
+
41
+ The main library (\`${Name}SDK.dart\`) re-exports the SDK class, the typed
42
+ models, and every entity class, so a single
43
+ \`import 'package:${pkg}/${Name}SDK.dart';\`
44
+ brings in everything you need.
45
+
46
+ `)
47
+
48
+ })
49
+
50
+
51
+ export {
52
+ ReadmeExplanation
53
+ }
@@ -0,0 +1,152 @@
1
+
2
+ import { cmp, Content, isAuthActive, envName, canonKey, canonScalarKey, entityIdField, pickExampleEntity, opRequestShape, safeVarName, exampleVarName } from '@voxgig/sdkgen'
3
+
4
+ import {
5
+ KIT,
6
+ getModelPath,
7
+ nom,
8
+ } from '@voxgig/apidef'
9
+
10
+
11
+ // A type-correct Dart literal for a field's canonical type.
12
+ function dartLit(type: any): string {
13
+ const k = canonScalarKey(type)
14
+ if ('INTEGER' === k || 'NUMBER' === k) return '1'
15
+ if ('BOOLEAN' === k) return 'true'
16
+ if ('ARRAY' === k) return '<dynamic>[]'
17
+ if ('OBJECT' === k) return '<String, dynamic>{}'
18
+ return "'example'"
19
+ }
20
+
21
+
22
+ const ReadmeHowto = cmp(function ReadmeHowto(props: any) {
23
+ const { target, ctx$: { model } } = props
24
+
25
+ const entity = getModelPath(model, `main.${KIT}.entity`)
26
+ // Pick an entity with a real op (prefer a read op) — never fabricate a
27
+ // `load` on an op-less entity. primaryOp is null only when NO entity
28
+ // exposes any op (a direct()-only SDK).
29
+ const { entity: exampleEntity, primaryOp } = pickExampleEntity(entity)
30
+ const eName = exampleEntity ? nom(exampleEntity, 'Name') : 'Entity'
31
+ const eVar = exampleVarName(eName.toLowerCase(), 'dart')
32
+ // Model-driven id key: null when the entity has no id-like field.
33
+ const idF = exampleEntity ? entityIdField(exampleEntity) : null
34
+ const isMatchOp = 'load' === primaryOp || 'remove' === primaryOp
35
+ let testArg = ''
36
+ if (exampleEntity && isMatchOp) {
37
+ testArg = idF ? `{'${idF}': 'test01'}` : ''
38
+ } else if (exampleEntity && ('create' === primaryOp || 'update' === primaryOp)) {
39
+ const items = opRequestShape(exampleEntity, primaryOp).items
40
+ .filter((it: any) => it.name !== idF && it.name !== 'id')
41
+ const required = items.filter((it: any) => !it.optional)
42
+ const chosen = required.length ? required : items.slice(0, 3)
43
+ testArg = `{${chosen.map((it: any) => `'${it.name}': ${dartLit(it.type)}`).join(', ')}}`
44
+ }
45
+
46
+ // The op-driven test-mode line, shown only when the SDK has an entity op.
47
+ // A direct()-only SDK (no ops anywhere) shows a direct() call instead.
48
+ const testModeExample = primaryOp
49
+ ? `// Entity ops return the ENTITY and throws on error;
50
+ // call data() for the record.
51
+ final ${eVar} = await client.${eName}().${primaryOp}(${testArg});
52
+ // ${eVar} contains the mock response record
53
+ print(${eVar});`
54
+ : `final result = await client.direct({'path': '/api/resource', 'method': 'GET'});
55
+ print(result);`
56
+
57
+ const apikeyEnvLine = isAuthActive(model)
58
+ ? `\nexport ${envName(model)}_APIKEY=<your-key>`
59
+ : ''
60
+
61
+ Content(`### Make a direct HTTP request
62
+
63
+ For endpoints not covered by entity methods:
64
+
65
+ \`\`\`dart
66
+ final result = await client.direct({
67
+ 'path': '/api/resource/{id}',
68
+ 'method': 'GET',
69
+ 'params': {'id': 'example'},
70
+ });
71
+
72
+ if (true == result['ok']) {
73
+ print(result['status']); // 200
74
+ print(result['data']); // response body
75
+ } else {
76
+ // A non-2xx response carries status + data (the error body); a
77
+ // transport-level failure carries err instead. direct() never throws —
78
+ // branch on result['ok'].
79
+ print(result['status']);
80
+ print(result['err']);
81
+ }
82
+ \`\`\`
83
+
84
+ ### Prepare a request without sending it
85
+
86
+ \`\`\`dart
87
+ // prepare() returns the fetch definition (or an error value on failure).
88
+ final fetchdef = await client.prepare({
89
+ 'path': '/api/resource/{id}',
90
+ 'method': 'DELETE',
91
+ 'params': {'id': 'example'},
92
+ });
93
+
94
+ print(fetchdef['url']);
95
+ print(fetchdef['method']);
96
+ print(fetchdef['headers']);
97
+ \`\`\`
98
+
99
+ ### Use test mode
100
+
101
+ Create a mock client for unit testing — no server required:
102
+
103
+ \`\`\`dart
104
+ final client = ${model.const.Name}SDK.test();
105
+
106
+ ${testModeExample}
107
+ \`\`\`
108
+
109
+ ### Use a custom fetch function
110
+
111
+ Replace the HTTP transport with your own function:
112
+
113
+ \`\`\`dart
114
+ Future<dynamic> mockFetch(dynamic url, dynamic init) async {
115
+ return {
116
+ 'status': 200,
117
+ 'statusText': 'OK',
118
+ 'headers': <String, dynamic>{},
119
+ 'json': () => {'id': 'mock01'},
120
+ };
121
+ }
122
+
123
+ final client = ${model.const.Name}SDK({
124
+ 'base': 'http://localhost:8080',
125
+ 'system': {
126
+ 'fetch': mockFetch,
127
+ },
128
+ });
129
+ \`\`\`
130
+
131
+ ### Run live tests
132
+
133
+ Set the live-mode environment variables:
134
+
135
+ \`\`\`bash
136
+ export ${envName(model)}_TEST_LIVE=TRUE${apikeyEnvLine}
137
+ \`\`\`
138
+
139
+ Then run:
140
+
141
+ \`\`\`bash
142
+ cd ${target.name} && dart run test/main.dart
143
+ \`\`\`
144
+
145
+ `)
146
+
147
+ })
148
+
149
+
150
+ export {
151
+ ReadmeHowto
152
+ }
@@ -0,0 +1,59 @@
1
+
2
+ import { cmp, Content, isPublished, repoInfo, packageVersion } from '@voxgig/sdkgen'
3
+
4
+ import { dartPackageName } from './Package_dart'
5
+
6
+
7
+ const ReadmeInstall = cmp(function ReadmeInstall(props: any) {
8
+ const { target, ctx$ } = props
9
+ const { model } = ctx$
10
+
11
+ const pkg = dartPackageName(model)
12
+
13
+ if (isPublished(model, target.name)) {
14
+ Content(`\`\`\`bash
15
+ dart pub add ${pkg}
16
+ \`\`\`
17
+
18
+ Or add it to your \`pubspec.yaml\`:
19
+
20
+ \`\`\`yaml
21
+ dependencies:
22
+ ${pkg}: ^${packageVersion(model, target.name)}
23
+ \`\`\`
24
+
25
+ `)
26
+ return
27
+ }
28
+
29
+ // Publish pending: not yet on pub.dev. Depend on it via the git release
30
+ // tag, or from a local path checkout.
31
+ const { repoUrl, releasesUrl } = repoInfo(model)
32
+ Content(`This package is not yet published to pub.dev. Add it as a git
33
+ dependency (pinned to a release tag \`${target.name}/vX.Y.Z\`, see
34
+ [Releases](${releasesUrl})) in your \`pubspec.yaml\`:
35
+
36
+ \`\`\`yaml
37
+ dependencies:
38
+ ${pkg}:
39
+ git:
40
+ url: ${repoUrl}
41
+ path: ${target.name}
42
+ ref: ${target.name}/v${packageVersion(model, target.name)}
43
+ \`\`\`
44
+
45
+ Or depend on a local source checkout:
46
+
47
+ \`\`\`yaml
48
+ dependencies:
49
+ ${pkg}:
50
+ path: ../${target.name}
51
+ \`\`\`
52
+
53
+ `)
54
+ })
55
+
56
+
57
+ export {
58
+ ReadmeInstall
59
+ }