@iota-uz/sdk 0.45.0 → 0.47.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (543) hide show
  1. package/README.md +5 -0
  2. package/dist/client-host/identity.d.ts +4 -4
  3. package/dist/client-host/identity.js +2 -2
  4. package/dist/lens/{CascadePanel-bXr7ekeZ.js → CascadePanel-BlYJd18G.js} +1 -1
  5. package/dist/lens/{ChartDataEquivalent-ZsncHfTF.js → ChartDataEquivalent-B6xSOdzC.js} +1 -1
  6. package/dist/lens/{ChartPanel-Cku9c87t.js → ChartPanel-BIJjrs5D.js} +159 -159
  7. package/dist/lens/{CoveragePanel-DE3fi5c7.js → CoveragePanel-CHtXDMtt.js} +1 -1
  8. package/dist/lens/{GaugePanel-DwR4zylR.js → GaugePanel-By0TOJPa.js} +1 -1
  9. package/dist/lens/LensDashboard.d.ts +13 -0
  10. package/dist/lens/LensDashboard.d.ts.map +1 -1
  11. package/dist/lens/{MapPanel-DJSiLZSz.js → MapPanel-Cw4ELCiM.js} +3 -3
  12. package/dist/lens/{MetricFlowPanel-Dsp_ntas.js → MetricFlowPanel-Gr5wi3nI.js} +2 -2
  13. package/dist/lens/{MetricHierarchyPanel-BYcy4FNw.js → MetricHierarchyPanel-VLA_5LXX.js} +2 -2
  14. package/dist/lens/{MetricRelationshipPanel-Gh5RKIu1.js → MetricRelationshipPanel-DFP566_c.js} +2 -2
  15. package/dist/lens/{PrintReport-RnKpLle9.js → PrintReport-C0OV1iHP.js} +5 -5
  16. package/dist/lens/{QualityChip-BxAn3wh6.js → QualityChip-DTi-0jdh.js} +1 -1
  17. package/dist/lens/SaveInvestigation-CX1Abyl8.js +309 -0
  18. package/dist/lens/TablePanel-BusKU7cU.js +994 -0
  19. package/dist/lens/{adapter-CZZIKpwb.js → adapter-CQg4-M7p.js} +7 -7
  20. package/dist/lens/contract/schemas.d.ts +2 -0
  21. package/dist/lens/contract/schemas.d.ts.map +1 -1
  22. package/dist/lens/contract/types.d.ts +14 -0
  23. package/dist/lens/contract/types.d.ts.map +1 -1
  24. package/dist/lens/{dashboardEdit-BLzL02OH.js → dashboardEdit-CJgCVfi_.js} +1 -1
  25. package/dist/lens/explore/DrillOverlay.d.ts +38 -0
  26. package/dist/lens/explore/DrillOverlay.d.ts.map +1 -1
  27. package/dist/lens/explore/ExplorePanel.d.ts.map +1 -1
  28. package/dist/lens/explore/SaveInvestigation.d.ts +21 -0
  29. package/dist/lens/explore/SaveInvestigation.d.ts.map +1 -0
  30. package/dist/lens/explore/drillHost.d.ts +25 -0
  31. package/dist/lens/explore/drillHost.d.ts.map +1 -0
  32. package/dist/lens/explore/investigation.d.ts +174 -0
  33. package/dist/lens/explore/investigation.d.ts.map +1 -0
  34. package/dist/lens/explore/provenanceLabels.d.ts +10 -0
  35. package/dist/lens/explore/provenanceLabels.d.ts.map +1 -0
  36. package/dist/lens/formula/FormulaTip.d.ts +5 -0
  37. package/dist/lens/formula/FormulaTip.d.ts.map +1 -1
  38. package/dist/lens/formula/FormulaView.d.ts.map +1 -1
  39. package/dist/lens/formula/PanelFormula.d.ts +2 -0
  40. package/dist/lens/formula/PanelFormula.d.ts.map +1 -1
  41. package/dist/lens/formula/element.d.ts.map +1 -1
  42. package/dist/lens/formula/values.d.ts +10 -1
  43. package/dist/lens/formula/values.d.ts.map +1 -1
  44. package/dist/lens/index-DR7Hf8Km.js +19805 -0
  45. package/dist/lens/{index-Dm3Y4NDq.js → index-DZFw4cqF.js} +1 -1
  46. package/dist/lens/index.d.ts +7 -1
  47. package/dist/lens/index.d.ts.map +1 -1
  48. package/dist/lens/index.js +67 -53
  49. package/dist/lens/{install-DCaRpfvv.js → install-B2lTK6uo.js} +1 -1
  50. package/dist/lens/{install-pvJpTP1f.js → install-BXr4Mnc0.js} +1 -1
  51. package/dist/lens/{install-C48hgC9S.js → install-CicNQ_ks.js} +1 -1
  52. package/dist/lens/{install-DB0eod1K.js → install-d8A0WPiw.js} +1 -1
  53. package/dist/lens/{keys-BAkGzg_y.js → keys-C-Akc9lZ.js} +2 -2
  54. package/dist/lens/panels/ChartPanel.d.ts.map +1 -1
  55. package/dist/lens/panels/TablePanel.d.ts.map +1 -1
  56. package/dist/lens/panels/actions.d.ts.map +1 -1
  57. package/dist/lens/panels/panelFailure.d.ts.map +1 -1
  58. package/dist/lens/{prefetch-j8VKR0tY.js → prefetch-C9kxuIs8.js} +2 -2
  59. package/dist/lens/{prefetchPanels-vwQqxrs4.js → prefetchPanels-gbY9RIqL.js} +1 -1
  60. package/dist/lens/{print-CuBcYmVF.js → print-CllsAP3d.js} +1 -1
  61. package/dist/lens/reports/ReportCompositionEditor.d.ts +8 -2
  62. package/dist/lens/reports/ReportCompositionEditor.d.ts.map +1 -1
  63. package/dist/lens/reports/ReportDefinitionEditor.d.ts +54 -0
  64. package/dist/lens/reports/ReportDefinitionEditor.d.ts.map +1 -0
  65. package/dist/lens/reports/ReportPicker.d.ts +6 -0
  66. package/dist/lens/reports/ReportPicker.d.ts.map +1 -1
  67. package/dist/lens/reports/dashboardEdit.d.ts +3 -0
  68. package/dist/lens/reports/dashboardEdit.d.ts.map +1 -1
  69. package/dist/lens/reports/editing.d.ts +35 -0
  70. package/dist/lens/reports/editing.d.ts.map +1 -1
  71. package/dist/lens/reports/picker.d.ts +4 -1
  72. package/dist/lens/reports/picker.d.ts.map +1 -1
  73. package/dist/lens/runtime/index.d.ts +0 -1
  74. package/dist/lens/runtime/index.d.ts.map +1 -1
  75. package/dist/lens/runtime/messages.d.ts +2 -2
  76. package/dist/lens/runtime/messages.d.ts.map +1 -1
  77. package/dist/lens/runtime/provider.d.ts +5 -1
  78. package/dist/lens/runtime/provider.d.ts.map +1 -1
  79. package/dist/lens/runtime/returnContext.d.ts +62 -0
  80. package/dist/lens/runtime/returnContext.d.ts.map +1 -0
  81. package/dist/lens/runtime/tableSummary.d.ts +9 -0
  82. package/dist/lens/runtime/tableSummary.d.ts.map +1 -0
  83. package/dist/lens/{scales-BSDq-uby.js → scales-CO6Q9RtG.js} +1 -1
  84. package/dist/lens/style.css +1 -1
  85. package/dist/runtime/README.md +24 -0
  86. package/dist/runtime/assert.d.ts +51 -0
  87. package/dist/runtime/assert.js +172 -0
  88. package/dist/runtime/build/README.txt +1 -0
  89. package/dist/runtime/build/extract.mjs +342 -0
  90. package/dist/runtime/build/shared-exports.json +388 -0
  91. package/dist/runtime/build/test-child.mjs +136 -0
  92. package/dist/runtime/build/theme/tailwind.config.js +121 -0
  93. package/dist/runtime/build/theme/theme.css +462 -0
  94. package/dist/runtime/build/theme/utilities.css +1 -0
  95. package/dist/runtime/build/vendor/lib/lib.d.ts +22 -0
  96. package/dist/runtime/build/vendor/lib/lib.decorators.d.ts +384 -0
  97. package/dist/runtime/build/vendor/lib/lib.decorators.legacy.d.ts +22 -0
  98. package/dist/runtime/build/vendor/lib/lib.dom.asynciterable.d.ts +41 -0
  99. package/dist/runtime/build/vendor/lib/lib.dom.d.ts +28983 -0
  100. package/dist/runtime/build/vendor/lib/lib.dom.iterable.d.ts +491 -0
  101. package/dist/runtime/build/vendor/lib/lib.es2015.collection.d.ts +147 -0
  102. package/dist/runtime/build/vendor/lib/lib.es2015.core.d.ts +597 -0
  103. package/dist/runtime/build/vendor/lib/lib.es2015.d.ts +28 -0
  104. package/dist/runtime/build/vendor/lib/lib.es2015.generator.d.ts +77 -0
  105. package/dist/runtime/build/vendor/lib/lib.es2015.iterable.d.ts +590 -0
  106. package/dist/runtime/build/vendor/lib/lib.es2015.promise.d.ts +81 -0
  107. package/dist/runtime/build/vendor/lib/lib.es2015.proxy.d.ts +128 -0
  108. package/dist/runtime/build/vendor/lib/lib.es2015.reflect.d.ts +144 -0
  109. package/dist/runtime/build/vendor/lib/lib.es2015.symbol.d.ts +46 -0
  110. package/dist/runtime/build/vendor/lib/lib.es2015.symbol.wellknown.d.ts +326 -0
  111. package/dist/runtime/build/vendor/lib/lib.es2016.array.include.d.ts +116 -0
  112. package/dist/runtime/build/vendor/lib/lib.es2016.d.ts +21 -0
  113. package/dist/runtime/build/vendor/lib/lib.es2016.full.d.ts +23 -0
  114. package/dist/runtime/build/vendor/lib/lib.es2016.intl.d.ts +31 -0
  115. package/dist/runtime/build/vendor/lib/lib.es2017.arraybuffer.d.ts +21 -0
  116. package/dist/runtime/build/vendor/lib/lib.es2017.d.ts +26 -0
  117. package/dist/runtime/build/vendor/lib/lib.es2017.date.d.ts +31 -0
  118. package/dist/runtime/build/vendor/lib/lib.es2017.full.d.ts +23 -0
  119. package/dist/runtime/build/vendor/lib/lib.es2017.intl.d.ts +44 -0
  120. package/dist/runtime/build/vendor/lib/lib.es2017.object.d.ts +49 -0
  121. package/dist/runtime/build/vendor/lib/lib.es2017.sharedmemory.d.ts +135 -0
  122. package/dist/runtime/build/vendor/lib/lib.es2017.string.d.ts +45 -0
  123. package/dist/runtime/build/vendor/lib/lib.es2017.typedarrays.d.ts +53 -0
  124. package/dist/runtime/build/vendor/lib/lib.es2018.asyncgenerator.d.ts +77 -0
  125. package/dist/runtime/build/vendor/lib/lib.es2018.asynciterable.d.ts +53 -0
  126. package/dist/runtime/build/vendor/lib/lib.es2018.d.ts +24 -0
  127. package/dist/runtime/build/vendor/lib/lib.es2018.full.d.ts +24 -0
  128. package/dist/runtime/build/vendor/lib/lib.es2018.intl.d.ts +83 -0
  129. package/dist/runtime/build/vendor/lib/lib.es2018.promise.d.ts +30 -0
  130. package/dist/runtime/build/vendor/lib/lib.es2018.regexp.d.ts +37 -0
  131. package/dist/runtime/build/vendor/lib/lib.es2019.array.d.ts +79 -0
  132. package/dist/runtime/build/vendor/lib/lib.es2019.d.ts +24 -0
  133. package/dist/runtime/build/vendor/lib/lib.es2019.full.d.ts +24 -0
  134. package/dist/runtime/build/vendor/lib/lib.es2019.intl.d.ts +23 -0
  135. package/dist/runtime/build/vendor/lib/lib.es2019.object.d.ts +33 -0
  136. package/dist/runtime/build/vendor/lib/lib.es2019.string.d.ts +37 -0
  137. package/dist/runtime/build/vendor/lib/lib.es2019.symbol.d.ts +24 -0
  138. package/dist/runtime/build/vendor/lib/lib.es2020.bigint.d.ts +731 -0
  139. package/dist/runtime/build/vendor/lib/lib.es2020.d.ts +27 -0
  140. package/dist/runtime/build/vendor/lib/lib.es2020.date.d.ts +42 -0
  141. package/dist/runtime/build/vendor/lib/lib.es2020.full.d.ts +24 -0
  142. package/dist/runtime/build/vendor/lib/lib.es2020.intl.d.ts +474 -0
  143. package/dist/runtime/build/vendor/lib/lib.es2020.number.d.ts +28 -0
  144. package/dist/runtime/build/vendor/lib/lib.es2020.promise.d.ts +47 -0
  145. package/dist/runtime/build/vendor/lib/lib.es2020.sharedmemory.d.ts +99 -0
  146. package/dist/runtime/build/vendor/lib/lib.es2020.string.d.ts +44 -0
  147. package/dist/runtime/build/vendor/lib/lib.es2020.symbol.wellknown.d.ts +41 -0
  148. package/dist/runtime/build/vendor/lib/lib.es2021.d.ts +23 -0
  149. package/dist/runtime/build/vendor/lib/lib.es2021.full.d.ts +24 -0
  150. package/dist/runtime/build/vendor/lib/lib.es2021.intl.d.ts +166 -0
  151. package/dist/runtime/build/vendor/lib/lib.es2021.promise.d.ts +48 -0
  152. package/dist/runtime/build/vendor/lib/lib.es2021.string.d.ts +33 -0
  153. package/dist/runtime/build/vendor/lib/lib.es2021.weakref.d.ts +78 -0
  154. package/dist/runtime/build/vendor/lib/lib.es2022.array.d.ts +121 -0
  155. package/dist/runtime/build/vendor/lib/lib.es2022.d.ts +25 -0
  156. package/dist/runtime/build/vendor/lib/lib.es2022.error.d.ts +75 -0
  157. package/dist/runtime/build/vendor/lib/lib.es2022.full.d.ts +24 -0
  158. package/dist/runtime/build/vendor/lib/lib.es2022.intl.d.ts +121 -0
  159. package/dist/runtime/build/vendor/lib/lib.es2022.object.d.ts +26 -0
  160. package/dist/runtime/build/vendor/lib/lib.es2022.regexp.d.ts +39 -0
  161. package/dist/runtime/build/vendor/lib/lib.es2022.string.d.ts +25 -0
  162. package/dist/runtime/build/vendor/lib/lib.es2023.array.d.ts +924 -0
  163. package/dist/runtime/build/vendor/lib/lib.es2023.collection.d.ts +21 -0
  164. package/dist/runtime/build/vendor/lib/lib.es2023.d.ts +22 -0
  165. package/dist/runtime/build/vendor/lib/lib.es2023.full.d.ts +24 -0
  166. package/dist/runtime/build/vendor/lib/lib.es2023.intl.d.ts +56 -0
  167. package/dist/runtime/build/vendor/lib/lib.es2024.arraybuffer.d.ts +65 -0
  168. package/dist/runtime/build/vendor/lib/lib.es2024.collection.d.ts +29 -0
  169. package/dist/runtime/build/vendor/lib/lib.es2024.d.ts +26 -0
  170. package/dist/runtime/build/vendor/lib/lib.es2024.full.d.ts +24 -0
  171. package/dist/runtime/build/vendor/lib/lib.es2024.object.d.ts +29 -0
  172. package/dist/runtime/build/vendor/lib/lib.es2024.promise.d.ts +35 -0
  173. package/dist/runtime/build/vendor/lib/lib.es2024.regexp.d.ts +25 -0
  174. package/dist/runtime/build/vendor/lib/lib.es2024.sharedmemory.d.ts +68 -0
  175. package/dist/runtime/build/vendor/lib/lib.es2024.string.d.ts +29 -0
  176. package/dist/runtime/build/vendor/lib/lib.es5.d.ts +4585 -0
  177. package/dist/runtime/build/vendor/lib/lib.es6.d.ts +23 -0
  178. package/dist/runtime/build/vendor/lib/lib.esnext.array.d.ts +35 -0
  179. package/dist/runtime/build/vendor/lib/lib.esnext.collection.d.ts +96 -0
  180. package/dist/runtime/build/vendor/lib/lib.esnext.d.ts +25 -0
  181. package/dist/runtime/build/vendor/lib/lib.esnext.decorators.d.ts +28 -0
  182. package/dist/runtime/build/vendor/lib/lib.esnext.disposable.d.ts +193 -0
  183. package/dist/runtime/build/vendor/lib/lib.esnext.full.d.ts +24 -0
  184. package/dist/runtime/build/vendor/lib/lib.esnext.intl.d.ts +21 -0
  185. package/dist/runtime/build/vendor/lib/lib.esnext.iterator.d.ts +148 -0
  186. package/dist/runtime/build/vendor/node-types/assert/strict.d.ts +111 -0
  187. package/dist/runtime/build/vendor/node-types/assert.d.ts +1115 -0
  188. package/dist/runtime/build/vendor/node-types/async_hooks.d.ts +619 -0
  189. package/dist/runtime/build/vendor/node-types/buffer.buffer.d.ts +477 -0
  190. package/dist/runtime/build/vendor/node-types/buffer.d.ts +1941 -0
  191. package/dist/runtime/build/vendor/node-types/child_process.d.ts +1480 -0
  192. package/dist/runtime/build/vendor/node-types/cluster.d.ts +578 -0
  193. package/dist/runtime/build/vendor/node-types/compatibility/iterators.d.ts +21 -0
  194. package/dist/runtime/build/vendor/node-types/console.d.ts +453 -0
  195. package/dist/runtime/build/vendor/node-types/constants.d.ts +21 -0
  196. package/dist/runtime/build/vendor/node-types/crypto.d.ts +5484 -0
  197. package/dist/runtime/build/vendor/node-types/dgram.d.ts +715 -0
  198. package/dist/runtime/build/vendor/node-types/diagnostics_channel.d.ts +576 -0
  199. package/dist/runtime/build/vendor/node-types/dns/promises.d.ts +503 -0
  200. package/dist/runtime/build/vendor/node-types/dns.d.ts +923 -0
  201. package/dist/runtime/build/vendor/node-types/domain.d.ts +166 -0
  202. package/dist/runtime/build/vendor/node-types/events.d.ts +967 -0
  203. package/dist/runtime/build/vendor/node-types/fs/promises.d.ts +1354 -0
  204. package/dist/runtime/build/vendor/node-types/fs.d.ts +4777 -0
  205. package/dist/runtime/build/vendor/node-types/globals.d.ts +170 -0
  206. package/dist/runtime/build/vendor/node-types/globals.typedarray.d.ts +41 -0
  207. package/dist/runtime/build/vendor/node-types/http.d.ts +2246 -0
  208. package/dist/runtime/build/vendor/node-types/http2.d.ts +2882 -0
  209. package/dist/runtime/build/vendor/node-types/https.d.ts +585 -0
  210. package/dist/runtime/build/vendor/node-types/index.d.ts +101 -0
  211. package/dist/runtime/build/vendor/node-types/inspector.d.ts +323 -0
  212. package/dist/runtime/build/vendor/node-types/inspector.generated.d.ts +4406 -0
  213. package/dist/runtime/build/vendor/node-types/module.d.ts +844 -0
  214. package/dist/runtime/build/vendor/node-types/net.d.ts +1197 -0
  215. package/dist/runtime/build/vendor/node-types/os.d.ts +507 -0
  216. package/dist/runtime/build/vendor/node-types/package.json +140 -0
  217. package/dist/runtime/build/vendor/node-types/path.d.ts +200 -0
  218. package/dist/runtime/build/vendor/node-types/perf_hooks.d.ts +1054 -0
  219. package/dist/runtime/build/vendor/node-types/process.d.ts +2101 -0
  220. package/dist/runtime/build/vendor/node-types/punycode.d.ts +117 -0
  221. package/dist/runtime/build/vendor/node-types/querystring.d.ts +152 -0
  222. package/dist/runtime/build/vendor/node-types/readline/promises.d.ts +161 -0
  223. package/dist/runtime/build/vendor/node-types/readline.d.ts +600 -0
  224. package/dist/runtime/build/vendor/node-types/repl.d.ts +438 -0
  225. package/dist/runtime/build/vendor/node-types/sea.d.ts +162 -0
  226. package/dist/runtime/build/vendor/node-types/sqlite.d.ts +1182 -0
  227. package/dist/runtime/build/vendor/node-types/stream/consumers.d.ts +45 -0
  228. package/dist/runtime/build/vendor/node-types/stream/promises.d.ts +90 -0
  229. package/dist/runtime/build/vendor/node-types/stream/web.d.ts +596 -0
  230. package/dist/runtime/build/vendor/node-types/stream.d.ts +1707 -0
  231. package/dist/runtime/build/vendor/node-types/string_decoder.d.ts +67 -0
  232. package/dist/runtime/build/vendor/node-types/test.d.ts +2656 -0
  233. package/dist/runtime/build/vendor/node-types/timers/promises.d.ts +108 -0
  234. package/dist/runtime/build/vendor/node-types/timers.d.ts +285 -0
  235. package/dist/runtime/build/vendor/node-types/tls.d.ts +1314 -0
  236. package/dist/runtime/build/vendor/node-types/trace_events.d.ts +197 -0
  237. package/dist/runtime/build/vendor/node-types/ts5.6/buffer.buffer.d.ts +473 -0
  238. package/dist/runtime/build/vendor/node-types/ts5.6/compatibility/float16array.d.ts +71 -0
  239. package/dist/runtime/build/vendor/node-types/ts5.6/globals.typedarray.d.ts +36 -0
  240. package/dist/runtime/build/vendor/node-types/ts5.6/index.d.ts +103 -0
  241. package/dist/runtime/build/vendor/node-types/ts5.7/compatibility/float16array.d.ts +72 -0
  242. package/dist/runtime/build/vendor/node-types/ts5.7/index.d.ts +103 -0
  243. package/dist/runtime/build/vendor/node-types/tty.d.ts +209 -0
  244. package/dist/runtime/build/vendor/node-types/url.d.ts +1103 -0
  245. package/dist/runtime/build/vendor/node-types/util.d.ts +2379 -0
  246. package/dist/runtime/build/vendor/node-types/v8.d.ts +1010 -0
  247. package/dist/runtime/build/vendor/node-types/vm.d.ts +1160 -0
  248. package/dist/runtime/build/vendor/node-types/wasi.d.ts +202 -0
  249. package/dist/runtime/build/vendor/node-types/web-globals/abortcontroller.d.ts +34 -0
  250. package/dist/runtime/build/vendor/node-types/web-globals/crypto.d.ts +32 -0
  251. package/dist/runtime/build/vendor/node-types/web-globals/domexception.d.ts +68 -0
  252. package/dist/runtime/build/vendor/node-types/web-globals/events.d.ts +97 -0
  253. package/dist/runtime/build/vendor/node-types/web-globals/fetch.d.ts +62 -0
  254. package/dist/runtime/build/vendor/node-types/web-globals/navigator.d.ts +25 -0
  255. package/dist/runtime/build/vendor/node-types/web-globals/storage.d.ts +24 -0
  256. package/dist/runtime/build/vendor/node-types/web-globals/streams.d.ts +22 -0
  257. package/dist/runtime/build/vendor/node-types/worker_threads.d.ts +894 -0
  258. package/dist/runtime/build/vendor/node-types/zlib.d.ts +768 -0
  259. package/dist/runtime/build/vendor/node_modules/csstype/LICENSE +19 -0
  260. package/dist/runtime/build/vendor/node_modules/csstype/index.d.ts +22569 -0
  261. package/dist/runtime/build/vendor/node_modules/csstype/index.js.flow +6863 -0
  262. package/dist/runtime/build/vendor/node_modules/csstype/package.json +70 -0
  263. package/dist/runtime/build/vendor/node_modules/seroval/LICENSE +7 -0
  264. package/dist/runtime/build/vendor/node_modules/seroval/dist/cjs/development/index.cjs +4232 -0
  265. package/dist/runtime/build/vendor/node_modules/seroval/dist/cjs/production/index.cjs +3 -0
  266. package/dist/runtime/build/vendor/node_modules/seroval/dist/esm/development/index.mjs +4209 -0
  267. package/dist/runtime/build/vendor/node_modules/seroval/dist/esm/production/index.mjs +3 -0
  268. package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/Serializer.d.ts +28 -0
  269. package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/base-primitives.d.ts +28 -0
  270. package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/compat.d.ts +15 -0
  271. package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/constants.d.ts +105 -0
  272. package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/constructors.d.ts +50 -0
  273. package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/context/async-parser.d.ts +20 -0
  274. package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/context/deserializer.d.ts +52 -0
  275. package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/context/parser.d.ts +62 -0
  276. package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/context/serializer.d.ts +103 -0
  277. package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/context/sync-parser.d.ts +61 -0
  278. package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/cross/index.d.ts +24 -0
  279. package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/errors.d.ts +47 -0
  280. package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/function-string.d.ts +3 -0
  281. package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/keys.d.ts +4 -0
  282. package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/literals.d.ts +10 -0
  283. package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/node.d.ts +8 -0
  284. package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/opaque-reference.d.ts +9 -0
  285. package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/plugin.d.ts +52 -0
  286. package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/reference.d.ts +6 -0
  287. package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/sequence.d.ts +11 -0
  288. package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/special-reference.d.ts +16 -0
  289. package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/stream.d.ts +17 -0
  290. package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/string.d.ts +4 -0
  291. package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/symbols.d.ts +14 -0
  292. package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/tree/index.d.ts +21 -0
  293. package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/types.d.ts +233 -0
  294. package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/utils/error.d.ts +6 -0
  295. package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/utils/get-identifier.d.ts +2 -0
  296. package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/utils/get-object-flag.d.ts +3 -0
  297. package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/utils/is-valid-identifier.d.ts +2 -0
  298. package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/utils/promise-to-result.d.ts +2 -0
  299. package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/utils/typed-array.d.ts +6 -0
  300. package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/utils/valid-properties.d.ts +3 -0
  301. package/dist/runtime/build/vendor/node_modules/seroval/dist/types/index.d.ts +18 -0
  302. package/dist/runtime/build/vendor/node_modules/seroval/package.json +67 -0
  303. package/dist/runtime/build/vendor/node_modules/seroval/src/core/Serializer.ts +119 -0
  304. package/dist/runtime/build/vendor/node_modules/seroval/src/core/base-primitives.ts +537 -0
  305. package/dist/runtime/build/vendor/node_modules/seroval/src/core/compat.ts +23 -0
  306. package/dist/runtime/build/vendor/node_modules/seroval/src/core/constants.ts +202 -0
  307. package/dist/runtime/build/vendor/node_modules/seroval/src/core/constructors.ts +265 -0
  308. package/dist/runtime/build/vendor/node_modules/seroval/src/core/context/async-parser.ts +666 -0
  309. package/dist/runtime/build/vendor/node_modules/seroval/src/core/context/deserializer.ts +832 -0
  310. package/dist/runtime/build/vendor/node_modules/seroval/src/core/context/parser.ts +335 -0
  311. package/dist/runtime/build/vendor/node_modules/seroval/src/core/context/serializer.ts +1524 -0
  312. package/dist/runtime/build/vendor/node_modules/seroval/src/core/context/sync-parser.ts +943 -0
  313. package/dist/runtime/build/vendor/node_modules/seroval/src/core/cross/index.ts +190 -0
  314. package/dist/runtime/build/vendor/node_modules/seroval/src/core/errors.ts +196 -0
  315. package/dist/runtime/build/vendor/node_modules/seroval/src/core/function-string.ts +31 -0
  316. package/dist/runtime/build/vendor/node_modules/seroval/src/core/keys.ts +17 -0
  317. package/dist/runtime/build/vendor/node_modules/seroval/src/core/literals.ts +43 -0
  318. package/dist/runtime/build/vendor/node_modules/seroval/src/core/node.ts +40 -0
  319. package/dist/runtime/build/vendor/node_modules/seroval/src/core/opaque-reference.ts +9 -0
  320. package/dist/runtime/build/vendor/node_modules/seroval/src/core/plugin.ts +105 -0
  321. package/dist/runtime/build/vendor/node_modules/seroval/src/core/reference.ts +66 -0
  322. package/dist/runtime/build/vendor/node_modules/seroval/src/core/sequence.ts +59 -0
  323. package/dist/runtime/build/vendor/node_modules/seroval/src/core/special-reference.ts +42 -0
  324. package/dist/runtime/build/vendor/node_modules/seroval/src/core/stream.ts +71 -0
  325. package/dist/runtime/build/vendor/node_modules/seroval/src/core/string.ts +86 -0
  326. package/dist/runtime/build/vendor/node_modules/seroval/src/core/symbols.ts +20 -0
  327. package/dist/runtime/build/vendor/node_modules/seroval/src/core/tree/index.ts +134 -0
  328. package/dist/runtime/build/vendor/node_modules/seroval/src/core/types.ts +377 -0
  329. package/dist/runtime/build/vendor/node_modules/seroval/src/core/utils/error.ts +73 -0
  330. package/dist/runtime/build/vendor/node_modules/seroval/src/core/utils/get-identifier.ts +18 -0
  331. package/dist/runtime/build/vendor/node_modules/seroval/src/core/utils/get-object-flag.ts +14 -0
  332. package/dist/runtime/build/vendor/node_modules/seroval/src/core/utils/is-valid-identifier.ts +12 -0
  333. package/dist/runtime/build/vendor/node_modules/seroval/src/core/utils/promise-to-result.ts +9 -0
  334. package/dist/runtime/build/vendor/node_modules/seroval/src/core/utils/typed-array.ts +56 -0
  335. package/dist/runtime/build/vendor/node_modules/seroval/src/core/utils/valid-properties.ts +34 -0
  336. package/dist/runtime/build/vendor/node_modules/seroval/src/index.ts +36 -0
  337. package/dist/runtime/build/vendor/node_modules/seroval-plugins/LICENSE +7 -0
  338. package/dist/runtime/build/vendor/node_modules/seroval-plugins/dist/cjs/development/web.cjs +826 -0
  339. package/dist/runtime/build/vendor/node_modules/seroval-plugins/dist/cjs/production/web.cjs +1 -0
  340. package/dist/runtime/build/vendor/node_modules/seroval-plugins/dist/esm/development/web.mjs +803 -0
  341. package/dist/runtime/build/vendor/node_modules/seroval-plugins/dist/esm/production/web.mjs +1 -0
  342. package/dist/runtime/build/vendor/node_modules/seroval-plugins/dist/types/web/abort-signal.d.ts +3 -0
  343. package/dist/runtime/build/vendor/node_modules/seroval-plugins/dist/types/web/blob.d.ts +3 -0
  344. package/dist/runtime/build/vendor/node_modules/seroval-plugins/dist/types/web/custom-event.d.ts +3 -0
  345. package/dist/runtime/build/vendor/node_modules/seroval-plugins/dist/types/web/dom-exception.d.ts +3 -0
  346. package/dist/runtime/build/vendor/node_modules/seroval-plugins/dist/types/web/event.d.ts +3 -0
  347. package/dist/runtime/build/vendor/node_modules/seroval-plugins/dist/types/web/file.d.ts +3 -0
  348. package/dist/runtime/build/vendor/node_modules/seroval-plugins/dist/types/web/form-data.d.ts +3 -0
  349. package/dist/runtime/build/vendor/node_modules/seroval-plugins/dist/types/web/headers.d.ts +3 -0
  350. package/dist/runtime/build/vendor/node_modules/seroval-plugins/dist/types/web/image-data.d.ts +3 -0
  351. package/dist/runtime/build/vendor/node_modules/seroval-plugins/dist/types/web/index.d.ts +15 -0
  352. package/dist/runtime/build/vendor/node_modules/seroval-plugins/dist/types/web/readable-stream.d.ts +3 -0
  353. package/dist/runtime/build/vendor/node_modules/seroval-plugins/dist/types/web/request.d.ts +3 -0
  354. package/dist/runtime/build/vendor/node_modules/seroval-plugins/dist/types/web/response.d.ts +3 -0
  355. package/dist/runtime/build/vendor/node_modules/seroval-plugins/dist/types/web/url-search-params.d.ts +3 -0
  356. package/dist/runtime/build/vendor/node_modules/seroval-plugins/dist/types/web/url.d.ts +3 -0
  357. package/dist/runtime/build/vendor/node_modules/seroval-plugins/package.json +70 -0
  358. package/dist/runtime/build/vendor/node_modules/seroval-plugins/web/abort-signal.ts +131 -0
  359. package/dist/runtime/build/vendor/node_modules/seroval-plugins/web/blob.ts +41 -0
  360. package/dist/runtime/build/vendor/node_modules/seroval-plugins/web/custom-event.ts +66 -0
  361. package/dist/runtime/build/vendor/node_modules/seroval-plugins/web/dom-exception.ts +57 -0
  362. package/dist/runtime/build/vendor/node_modules/seroval-plugins/web/event.ts +62 -0
  363. package/dist/runtime/build/vendor/node_modules/seroval-plugins/web/file.ts +50 -0
  364. package/dist/runtime/build/vendor/node_modules/seroval-plugins/web/form-data.ts +105 -0
  365. package/dist/runtime/build/vendor/node_modules/seroval-plugins/web/headers.ts +49 -0
  366. package/dist/runtime/build/vendor/node_modules/seroval-plugins/web/image-data.ts +74 -0
  367. package/dist/runtime/build/vendor/node_modules/seroval-plugins/web/index.ts +14 -0
  368. package/dist/runtime/build/vendor/node_modules/seroval-plugins/web/readable-stream.ts +148 -0
  369. package/dist/runtime/build/vendor/node_modules/seroval-plugins/web/request.ts +82 -0
  370. package/dist/runtime/build/vendor/node_modules/seroval-plugins/web/response.ts +65 -0
  371. package/dist/runtime/build/vendor/node_modules/seroval-plugins/web/url-search-params.ts +40 -0
  372. package/dist/runtime/build/vendor/node_modules/seroval-plugins/web/url.ts +37 -0
  373. package/dist/runtime/build/vendor/node_modules/solid-js/dist/server.cjs +824 -0
  374. package/dist/runtime/build/vendor/node_modules/solid-js/dist/server.js +770 -0
  375. package/dist/runtime/build/vendor/node_modules/solid-js/dist/solid.cjs +1808 -0
  376. package/dist/runtime/build/vendor/node_modules/solid-js/dist/solid.js +1753 -0
  377. package/dist/runtime/build/vendor/node_modules/solid-js/jsx-runtime.d.ts +1 -0
  378. package/dist/runtime/build/vendor/node_modules/solid-js/package.json +243 -0
  379. package/dist/runtime/build/vendor/node_modules/solid-js/store/dist/server.cjs +133 -0
  380. package/dist/runtime/build/vendor/node_modules/solid-js/store/dist/server.js +121 -0
  381. package/dist/runtime/build/vendor/node_modules/solid-js/store/dist/store.cjs +463 -0
  382. package/dist/runtime/build/vendor/node_modules/solid-js/store/dist/store.js +454 -0
  383. package/dist/runtime/build/vendor/node_modules/solid-js/store/package.json +46 -0
  384. package/dist/runtime/build/vendor/node_modules/solid-js/store/types/index.d.ts +12 -0
  385. package/dist/runtime/build/vendor/node_modules/solid-js/store/types/modifiers.d.ts +6 -0
  386. package/dist/runtime/build/vendor/node_modules/solid-js/store/types/mutable.d.ts +5 -0
  387. package/dist/runtime/build/vendor/node_modules/solid-js/store/types/server.d.ts +17 -0
  388. package/dist/runtime/build/vendor/node_modules/solid-js/store/types/store.d.ts +108 -0
  389. package/dist/runtime/build/vendor/node_modules/solid-js/types/index.d.ts +23 -0
  390. package/dist/runtime/build/vendor/node_modules/solid-js/types/jsx.d.ts +4253 -0
  391. package/dist/runtime/build/vendor/node_modules/solid-js/types/reactive/array.d.ts +44 -0
  392. package/dist/runtime/build/vendor/node_modules/solid-js/types/reactive/observable.d.ts +36 -0
  393. package/dist/runtime/build/vendor/node_modules/solid-js/types/reactive/scheduler.d.ts +10 -0
  394. package/dist/runtime/build/vendor/node_modules/solid-js/types/reactive/signal.d.ts +581 -0
  395. package/dist/runtime/build/vendor/node_modules/solid-js/types/render/Suspense.d.ts +26 -0
  396. package/dist/runtime/build/vendor/node_modules/solid-js/types/render/component.d.ts +111 -0
  397. package/dist/runtime/build/vendor/node_modules/solid-js/types/render/flow.d.ts +118 -0
  398. package/dist/runtime/build/vendor/node_modules/solid-js/types/render/hydration.d.ts +24 -0
  399. package/dist/runtime/build/vendor/node_modules/solid-js/types/render/index.d.ts +4 -0
  400. package/dist/runtime/build/vendor/node_modules/solid-js/types/server/index.d.ts +3 -0
  401. package/dist/runtime/build/vendor/node_modules/solid-js/types/server/reactive.d.ts +98 -0
  402. package/dist/runtime/build/vendor/node_modules/solid-js/types/server/rendering.d.ts +160 -0
  403. package/dist/runtime/build/vendor/node_modules/solid-js/web/dist/server.cjs +900 -0
  404. package/dist/runtime/build/vendor/node_modules/solid-js/web/dist/server.js +786 -0
  405. package/dist/runtime/build/vendor/node_modules/solid-js/web/dist/web.cjs +884 -0
  406. package/dist/runtime/build/vendor/node_modules/solid-js/web/dist/web.js +772 -0
  407. package/dist/runtime/build/vendor/node_modules/solid-js/web/package.json +46 -0
  408. package/dist/runtime/build/vendor/node_modules/solid-js/web/storage/dist/storage.cjs +12 -0
  409. package/dist/runtime/build/vendor/node_modules/solid-js/web/storage/dist/storage.js +10 -0
  410. package/dist/runtime/build/vendor/node_modules/solid-js/web/storage/package.json +15 -0
  411. package/dist/runtime/build/vendor/node_modules/solid-js/web/storage/types/index.d.ts +2 -0
  412. package/dist/runtime/build/vendor/node_modules/solid-js/web/types/client.d.ts +93 -0
  413. package/dist/runtime/build/vendor/node_modules/solid-js/web/types/core.d.ts +2 -0
  414. package/dist/runtime/build/vendor/node_modules/solid-js/web/types/index.d.ts +50 -0
  415. package/dist/runtime/build/vendor/node_modules/solid-js/web/types/jsx.d.ts +1 -0
  416. package/dist/runtime/build/vendor/node_modules/solid-js/web/types/server-mock.d.ts +65 -0
  417. package/dist/runtime/build/vendor/node_modules/solid-js/web/types/server.d.ts +187 -0
  418. package/dist/runtime/build/worker.mjs +293415 -0
  419. package/dist/runtime/catalog/sdk-natives.json +655 -0
  420. package/dist/runtime/cli/iota-ext.mjs +1028 -0
  421. package/dist/runtime/client-host/entry.d.ts +10 -0
  422. package/dist/runtime/client-host/entry.js +124 -0
  423. package/dist/runtime/client-host/hooks.d.ts +43 -0
  424. package/dist/runtime/client-host/hooks.js +94 -0
  425. package/dist/runtime/client-host/index.d.ts +9 -0
  426. package/dist/runtime/client-host/index.js +9 -0
  427. package/dist/runtime/client-host/islands.d.ts +44 -0
  428. package/dist/runtime/client-host/islands.js +165 -0
  429. package/dist/runtime/client-host/kit.d.ts +10 -0
  430. package/dist/runtime/client-host/kit.js +37 -0
  431. package/dist/runtime/client-host/page.d.ts +53 -0
  432. package/dist/runtime/client-host/page.js +217 -0
  433. package/dist/runtime/client-host/params.d.ts +8 -0
  434. package/dist/runtime/client-host/params.js +36 -0
  435. package/dist/runtime/client-host/protocol.d.ts +78 -0
  436. package/dist/runtime/client-host/protocol.js +26 -0
  437. package/dist/runtime/client-host/shared.d.ts +12 -0
  438. package/dist/runtime/client-host/shared.js +49 -0
  439. package/dist/runtime/client-host/shell.d.ts +88 -0
  440. package/dist/runtime/client-host/shell.js +195 -0
  441. package/dist/runtime/client-host/slots.d.ts +54 -0
  442. package/dist/runtime/client-host/slots.js +90 -0
  443. package/dist/runtime/client-host/styles.d.ts +7 -0
  444. package/dist/runtime/client-host/styles.js +61 -0
  445. package/dist/runtime/client-host/transport.d.ts +45 -0
  446. package/dist/runtime/client-host/transport.js +115 -0
  447. package/dist/runtime/client.d.ts +226 -0
  448. package/dist/runtime/client.js +121 -0
  449. package/dist/runtime/contracts.d.ts +204 -0
  450. package/dist/runtime/contracts.js +195 -0
  451. package/dist/runtime/docs/authoring.md +1609 -0
  452. package/dist/runtime/docs/example/docs/en/admin/limits.md +10 -0
  453. package/dist/runtime/docs/example/docs/en/getting-started.md +13 -0
  454. package/dist/runtime/docs/example/docs/en/points.md +9 -0
  455. package/dist/runtime/docs/example/docs/ru/getting-started.md +12 -0
  456. package/dist/runtime/docs/example/package.json +27 -0
  457. package/dist/runtime/docs/example/src/ClientScreen.tsx +10 -0
  458. package/dist/runtime/docs/example/src/RedemptionScreen.tsx +7 -0
  459. package/dist/runtime/docs/example/src/RewardsScreen.module.css +13 -0
  460. package/dist/runtime/docs/example/src/RewardsScreen.tsx +51 -0
  461. package/dist/runtime/docs/example/src/client.tsx +40 -0
  462. package/dist/runtime/docs/example/src/contracts.ts +132 -0
  463. package/dist/runtime/docs/example/src/css-modules.d.ts +5 -0
  464. package/dist/runtime/docs/example/src/server.test.ts +156 -0
  465. package/dist/runtime/docs/example/src/server.ts +188 -0
  466. package/dist/runtime/docs/example/tsconfig.json +16 -0
  467. package/dist/runtime/entity.d.ts +237 -0
  468. package/dist/runtime/entity.js +201 -0
  469. package/dist/runtime/fakes.d.ts +80 -0
  470. package/dist/runtime/fakes.js +88 -0
  471. package/dist/runtime/fixtures.d.ts +34 -0
  472. package/dist/runtime/fixtures.js +60 -0
  473. package/dist/runtime/help.d.ts +22 -0
  474. package/dist/runtime/help.js +51 -0
  475. package/dist/runtime/host/context.mjs +392 -0
  476. package/dist/runtime/host/errors.mjs +64 -0
  477. package/dist/runtime/host/loader.mjs +28 -0
  478. package/dist/runtime/host/protocol.mjs +4 -0
  479. package/dist/runtime/host/register.mjs +8 -0
  480. package/dist/runtime/host/sdk/assert.mjs +153 -0
  481. package/dist/runtime/host/sdk/client-host/hooks.mjs +86 -0
  482. package/dist/runtime/host/sdk/client-host/protocol.mjs +30 -0
  483. package/dist/runtime/host/sdk/client-host/slots.mjs +82 -0
  484. package/dist/runtime/host/sdk/client-host/styles.mjs +45 -0
  485. package/dist/runtime/host/sdk/client-host/transport.mjs +102 -0
  486. package/dist/runtime/host/sdk/client.mjs +115 -0
  487. package/dist/runtime/host/sdk/contracts.mjs +185 -0
  488. package/dist/runtime/host/sdk/entity.mjs +183 -0
  489. package/dist/runtime/host/sdk/fakes.mjs +88 -0
  490. package/dist/runtime/host/sdk/fixtures.mjs +56 -0
  491. package/dist/runtime/host/sdk/help.mjs +37 -0
  492. package/dist/runtime/host/sdk/index.mjs +83 -0
  493. package/dist/runtime/host/sdk/kit.mjs +11 -0
  494. package/dist/runtime/host/sdk/manifest.mjs +276 -0
  495. package/dist/runtime/host/sdk/model.mjs +4 -0
  496. package/dist/runtime/host/sdk/resource.mjs +34 -0
  497. package/dist/runtime/host/sdk/schema.mjs +75 -0
  498. package/dist/runtime/host/sdk/server.mjs +43 -0
  499. package/dist/runtime/host/sdk/testhost.mjs +992 -0
  500. package/dist/runtime/host/sdk/testing.mjs +21 -0
  501. package/dist/runtime/host/sdk/wire.mjs +207 -0
  502. package/dist/runtime/host/worker.mjs +252 -0
  503. package/dist/runtime/index.d.ts +10 -0
  504. package/dist/runtime/index.js +5 -0
  505. package/dist/runtime/kit.d.ts +5 -0
  506. package/dist/runtime/kit.js +14 -0
  507. package/dist/runtime/manifest.d.ts +17 -0
  508. package/dist/runtime/manifest.js +323 -0
  509. package/dist/runtime/model.d.ts +224 -0
  510. package/dist/runtime/model.js +3 -0
  511. package/dist/runtime/resource.d.ts +31 -0
  512. package/dist/runtime/resource.js +35 -0
  513. package/dist/runtime/schema.d.ts +97 -0
  514. package/dist/runtime/schema.js +73 -0
  515. package/dist/runtime/server.d.ts +445 -0
  516. package/dist/runtime/server.js +41 -0
  517. package/dist/runtime/testhost.d.ts +216 -0
  518. package/dist/runtime/testhost.js +1146 -0
  519. package/dist/runtime/testing.d.ts +10 -0
  520. package/dist/runtime/testing.js +7 -0
  521. package/dist/runtime/wire.d.ts +26 -0
  522. package/dist/runtime/wire.js +236 -0
  523. package/dist/sdk-identity.cjs +3 -3
  524. package/dist/sdk-identity.js +3 -3
  525. package/dist/sdk-identity.json +2 -2
  526. package/dist/solid-ui/embedded-css.d.ts +2 -0
  527. package/dist/solid-ui/embedded-css.js +1 -0
  528. package/dist/solid-ui/embedded.css +2 -0
  529. package/dist/testing/components.d.ts +73 -0
  530. package/dist/testing/components.js +96 -0
  531. package/dist/testing/htmx.d.ts +44 -0
  532. package/dist/testing/htmx.js +284 -0
  533. package/dist/testing/index.d.ts +4 -41
  534. package/dist/testing/index.js +3 -206
  535. package/dist/testing/scenarios.d.ts +83 -0
  536. package/dist/testing/scenarios.js +74 -0
  537. package/dist/testing/wait.d.ts +7 -0
  538. package/dist/testing/wait.js +19 -0
  539. package/package.json +33 -2
  540. package/dist/lens/TablePanel-DU_ydQ1x.js +0 -980
  541. package/dist/lens/index-BJIuggdQ.js +0 -18403
  542. package/dist/lens/runtime/recovery.d.ts +0 -26
  543. package/dist/lens/runtime/recovery.d.ts.map +0 -1
@@ -0,0 +1,392 @@
1
+ import { createHash } from "node:crypto";
2
+ import { compileFilter } from "./sdk/entity.mjs";
3
+ import { CODE, fromWire, internal, toWire } from "./errors.mjs";
4
+ function normalizeResult(value) {
5
+ let text;
6
+ try {
7
+ text = JSON.stringify(value);
8
+ } catch (err) {
9
+ throw internal(CODE.resultNotJson, `result is not JSON: ${err.message}`);
10
+ }
11
+ return text === void 0 ? null : JSON.parse(text);
12
+ }
13
+ const intentInTransaction = (what) => internal(
14
+ CODE.intentInTransaction,
15
+ `${what} is not allowed while a transaction is open; finish the transaction first (use tx.signal / tx.start inside it)`
16
+ );
17
+ const idOf = (resource) => typeof resource === "string" ? resource : resource.id;
18
+ const keyOf = (ref) => typeof ref === "string" ? ref : ref.key;
19
+ function formatLog(message, fields) {
20
+ return fields === void 0 ? message : `${message} ${JSON.stringify(fields)}`;
21
+ }
22
+ function logger(deps) {
23
+ const at = (level) => (message, fields) => deps.log(level, formatLog(message, fields));
24
+ return { debug: at("debug"), info: at("info"), warn: at("warn"), error: at("error") };
25
+ }
26
+ function principal(ctx) {
27
+ const granted = new Set(ctx.user.permissions);
28
+ return {
29
+ tenantId: ctx.tenant,
30
+ userId: ctx.user.id,
31
+ kind: ctx.user.kind,
32
+ ...ctx.user.locale === void 0 ? {} : { locale: ctx.user.locale },
33
+ has: (permission) => {
34
+ const id = typeof permission === "string" ? permission : permission.id;
35
+ return id === "" || granted.has(id);
36
+ }
37
+ };
38
+ }
39
+ function invocationInfo(deps) {
40
+ const { ctx } = deps;
41
+ return {
42
+ id: deps.invocation,
43
+ trigger: ctx.trigger,
44
+ ...ctx.parent === void 0 ? {} : { parentId: ctx.parent }
45
+ };
46
+ }
47
+ function findQuery(query) {
48
+ if (query === void 0) return {};
49
+ const { where, ...rest } = query;
50
+ return where === void 0 ? rest : { ...rest, where: compileFilter(where) };
51
+ }
52
+ function withRef(entity, row) {
53
+ if (row === null || typeof row !== "object") return row;
54
+ const record = row;
55
+ return typeof record.key === "string" && !("baseKey" in record) ? { ...record, ref: { entity, key: record.key } } : row;
56
+ }
57
+ function withRefs(entity, value) {
58
+ return Array.isArray(value) ? value.map((row) => withRef(entity, row)) : withRef(entity, value);
59
+ }
60
+ function reader(call) {
61
+ return {
62
+ get: async (entity, ref) => withRefs(idOf(entity), await call("get", { entity: idOf(entity), key: keyOf(ref) })),
63
+ find: async (entity, query) => withRefs(idOf(entity), await call("find", { entity: idOf(entity), query: findQuery(query) })),
64
+ count: (entity, where) => call("count", { entity: idOf(entity), where: where === void 0 ? null : compileFilter(where) }),
65
+ /** Runs another query in the same snapshot (or transaction) with the caller's rights. */
66
+ query: (query, input) => call("query", { query: idOf(query), input })
67
+ };
68
+ }
69
+ const signalArgs = (instance, name, payload) => ({
70
+ workflow: instance.workflow,
71
+ instance: instance.instance,
72
+ name,
73
+ payload
74
+ });
75
+ function txCaller(deps, handle, scope) {
76
+ return (method, args) => {
77
+ if (!scope.open) {
78
+ return Promise.reject(internal(CODE.txClosed, "transaction is closed"));
79
+ }
80
+ return deps.call(method, { tx: handle, ...args });
81
+ };
82
+ }
83
+ function createTx(deps, handle, scope) {
84
+ const call = txCaller(deps, handle, scope);
85
+ return {
86
+ user: principal(deps.ctx),
87
+ invocation: invocationInfo(deps),
88
+ log: logger(deps),
89
+ ...reader((op, args) => call(`tx.${op}`, args)),
90
+ insert: async (entity, values) => withRefs(idOf(entity), await call("tx.insert", { entity: idOf(entity), values })),
91
+ update: async (entity, ref, patch, options) => withRefs(
92
+ idOf(entity),
93
+ await call("tx.update", {
94
+ entity: idOf(entity),
95
+ key: keyOf(ref),
96
+ patch: options?.rowVersion === void 0 ? patch : { ...patch, rowVersion: options.rowVersion }
97
+ })
98
+ ),
99
+ delete: async (entity, ref) => {
100
+ await call("tx.delete", { entity: idOf(entity), key: keyOf(ref) });
101
+ },
102
+ put: (overlay, base, values) => call("tx.putOverlay", { overlay: idOf(overlay), baseKey: keyOf(base), values }),
103
+ call: (callable, input) => call("tx.call", { contract: idOf(callable), input }),
104
+ emit: async (event, args) => {
105
+ await call("tx.emit", { event: idOf(event), ...args });
106
+ },
107
+ notify: async (notice, args) => {
108
+ await call("tx.notify", { notice: idOf(notice), ...args });
109
+ },
110
+ start: async (workflow, input, options) => {
111
+ const started = await call("tx.start", {
112
+ workflow: idOf(workflow),
113
+ input,
114
+ ...options?.key === void 0 ? {} : { key: options.key }
115
+ });
116
+ return { workflow: idOf(workflow), instance: started.instance };
117
+ },
118
+ signal: async (instance, name, payload) => {
119
+ await call("tx.signal", signalArgs(instance, name, payload));
120
+ }
121
+ };
122
+ }
123
+ function createGuardContext(deps, handle, scope) {
124
+ const call = txCaller(deps, handle, scope);
125
+ return {
126
+ user: principal(deps.ctx),
127
+ invocation: invocationInfo(deps),
128
+ log: logger(deps),
129
+ ...reader((op, args) => call(`tx.${op}`, args))
130
+ };
131
+ }
132
+ function createEndpointRequest(input) {
133
+ const raw = input ?? {};
134
+ const bytes = raw.rawBody !== void 0 ? new Uint8Array(Buffer.from(raw.rawBody, "base64")) : raw.body === void 0 ? new Uint8Array() : new Uint8Array(Buffer.from(JSON.stringify(raw.body), "utf8"));
135
+ const text = new TextDecoder().decode(bytes);
136
+ return {
137
+ method: raw.method ?? "",
138
+ path: raw.path ?? "",
139
+ headers: raw.headers ?? {},
140
+ query: raw.query ?? {},
141
+ body: raw.body,
142
+ rawBody: bytes,
143
+ text: () => text
144
+ };
145
+ }
146
+ function createQuery(deps) {
147
+ return {
148
+ user: principal(deps.ctx),
149
+ invocation: invocationInfo(deps),
150
+ log: logger(deps),
151
+ ...reader((op, args) => deps.call(`q.${op}`, args))
152
+ };
153
+ }
154
+ async function inTransaction(deps, open, close, cb) {
155
+ const handle = await open();
156
+ const scope = { open: true };
157
+ let result;
158
+ try {
159
+ result = await cb(createTx(deps, handle, scope));
160
+ } catch (err) {
161
+ scope.open = false;
162
+ await close(handle, "rollback").catch(() => void 0);
163
+ throw err;
164
+ }
165
+ scope.open = false;
166
+ await close(handle, "commit", result);
167
+ return result;
168
+ }
169
+ function createCommandContext(deps) {
170
+ let inTx = false;
171
+ const snapshot = createQuery(deps);
172
+ return {
173
+ user: principal(deps.ctx),
174
+ invocation: invocationInfo(deps),
175
+ log: logger(deps),
176
+ /** `ctx.query` is the read-only snapshot context and callable: `ctx.query(Q, input)` runs a query. */
177
+ query: Object.assign((query, input) => snapshot.query(query, input), snapshot),
178
+ signal: async (instance, name, payload) => {
179
+ if (inTx) throw intentInTransaction("ctx.signal");
180
+ await deps.call("invoke.signal", signalArgs(instance, name, payload));
181
+ },
182
+ secrets: { get: (name) => deps.call("secrets.get", { name }) },
183
+ call: async (command, input) => {
184
+ if (inTx) throw intentInTransaction("ctx.call");
185
+ return deps.call("invoke.command", { command: idOf(command), input });
186
+ },
187
+ async transaction(cb) {
188
+ if (inTx) {
189
+ throw internal(CODE.nestedTransaction, "ctx.transaction cannot be nested");
190
+ }
191
+ inTx = true;
192
+ try {
193
+ return await inTransaction(
194
+ deps,
195
+ async () => (await deps.call("tx.begin", {})).tx,
196
+ (tx, outcome) => deps.call("tx.end", { tx, outcome }),
197
+ cb
198
+ );
199
+ } finally {
200
+ inTx = false;
201
+ }
202
+ }
203
+ };
204
+ }
205
+ function canonical(value) {
206
+ if (Array.isArray(value)) return `[${value.map(canonical).join(",")}]`;
207
+ if (value !== null && typeof value === "object") {
208
+ const record = value;
209
+ const keys = Object.keys(record).filter((k) => record[k] !== void 0).sort();
210
+ return `{${keys.map((k) => `${JSON.stringify(k)}:${canonical(record[k])}`).join(",")}}`;
211
+ }
212
+ return JSON.stringify(value) ?? "null";
213
+ }
214
+ const hashOf = (value) => createHash("sha256").update(canonical(value)).digest("hex");
215
+ const replayKey = (name, n) => `${n}\0${name}`;
216
+ function unwrap(begun) {
217
+ if (!begun.ok) throw fromWire(begun.error ?? { kind: "internal", code: CODE.hostCall, message: "recorded failure" });
218
+ return begun.value;
219
+ }
220
+ function createWorkflowContext(deps) {
221
+ const assignee = (value) => {
222
+ if (typeof value !== "object" || value === null) return value;
223
+ if ("userId" in value) return { entity: "core.user", key: String(value.userId) };
224
+ const permission = value.permission;
225
+ return permission !== void 0 && typeof permission.id === "string" ? { permission: permission.id } : value;
226
+ };
227
+ const journal = /* @__PURE__ */ new Map();
228
+ for (const entry of deps.ctx.occurrence?.journal ?? []) {
229
+ journal.set(replayKey(entry.name, entry.n), entry);
230
+ }
231
+ const counters = /* @__PURE__ */ new Map();
232
+ const next = (name) => {
233
+ const n = counters.get(name) ?? 0;
234
+ counters.set(name, n + 1);
235
+ return n;
236
+ };
237
+ const replayed = (name, n, kind, hash) => {
238
+ const entry = journal.get(replayKey(name, n));
239
+ if (entry === void 0 || entry.kind !== kind) return void 0;
240
+ if (hash !== void 0 && entry.inputHash !== void 0 && entry.inputHash !== "" && entry.inputHash !== hash) return void 0;
241
+ return entry;
242
+ };
243
+ const answer = (entry) => {
244
+ if (entry.status === "failed") throw fromWire(entry.error ?? { kind: "internal", code: CODE.hostCall, message: "recorded failure" });
245
+ return entry.result ?? null;
246
+ };
247
+ let transactions = 0;
248
+ const withTransactionInFlight = async (run) => {
249
+ transactions++;
250
+ try {
251
+ return await run();
252
+ } finally {
253
+ transactions--;
254
+ }
255
+ };
256
+ const inFlight = /* @__PURE__ */ new Set();
257
+ const track = (promise) => {
258
+ inFlight.add(promise);
259
+ const settled = () => inFlight.delete(promise);
260
+ promise.then(settled, settled);
261
+ return promise;
262
+ };
263
+ const quiesce = async () => {
264
+ for (; ; ) {
265
+ await new Promise((resolve) => setImmediate(resolve));
266
+ if (inFlight.size === 0) return;
267
+ await Promise.allSettled([...inFlight]);
268
+ }
269
+ };
270
+ const call = (method, name, n, extra = {}) => deps.call(method, { name, n, ...extra });
271
+ return {
272
+ user: principal(deps.ctx),
273
+ instance: { id: deps.ctx.instance ?? "" },
274
+ log: logger(deps),
275
+ secrets: { get: (name) => deps.call("secrets.get", { name }) },
276
+ async transaction(name, body, input) {
277
+ const n = next(name);
278
+ if (typeof body !== "function") {
279
+ const inputHash = hashOf({ callable: idOf(body), input: input ?? null });
280
+ const hit2 = replayed(name, n, "transaction", inputHash);
281
+ if (hit2 !== void 0) return answer(hit2);
282
+ return track(withTransactionInFlight(() => call("wf.transaction.call", name, n, { callable: idOf(body), input, inputHash })));
283
+ }
284
+ const hit = replayed(name, n, "transaction");
285
+ if (hit !== void 0) return answer(hit);
286
+ return track(
287
+ withTransactionInFlight(async () => {
288
+ const begun = await call("wf.transaction.begin", name, n);
289
+ if (begun.replay) return unwrap(begun);
290
+ return inTransaction(
291
+ deps,
292
+ async () => begun.tx,
293
+ (tx, outcome, value) => call("wf.transaction.end", name, n, { tx, outcome, value: value ?? null }),
294
+ // The recorded result and the returned one are the same normalized value.
295
+ async (tx) => normalizeResult(await body(tx))
296
+ );
297
+ })
298
+ );
299
+ },
300
+ async step(name, first, second) {
301
+ const n = next(name);
302
+ const hit = replayed(name, n, "step");
303
+ if (hit !== void 0) return answer(hit);
304
+ const effect = typeof first === "function" ? first : second;
305
+ return track(
306
+ (async () => {
307
+ const begun = await call("wf.step.begin", name, n);
308
+ if (begun.replay) return unwrap(begun);
309
+ let value;
310
+ try {
311
+ value = normalizeResult(await effect({ idempotencyKey: begun.idempotencyKey }));
312
+ } catch (err) {
313
+ await call("wf.step.end", name, n, { ok: false, error: toWire(err) }).catch(() => void 0);
314
+ throw err;
315
+ }
316
+ await call("wf.step.end", name, n, { ok: true, value });
317
+ return value;
318
+ })()
319
+ );
320
+ },
321
+ sleep: async (name, duration) => {
322
+ const n = next(name);
323
+ const hit = replayed(name, n, "sleep");
324
+ if (hit !== void 0) {
325
+ answer(hit);
326
+ return;
327
+ }
328
+ await quiesce();
329
+ await call("wf.sleep", name, n, { duration });
330
+ },
331
+ async waitFor(name, signal, options) {
332
+ const n = next(name);
333
+ const shape = (result2) => options === void 0 ? result2.payload : result2;
334
+ const hit = replayed(name, n, "waitFor");
335
+ if (hit !== void 0) return shape(answer(hit));
336
+ await quiesce();
337
+ const result = await call("wf.waitFor", name, n, {
338
+ workflow: signal.workflow,
339
+ signal: signal.name,
340
+ ...options === void 0 ? {} : { timeout: options.timeout }
341
+ });
342
+ return shape(result);
343
+ },
344
+ async task(name, spec) {
345
+ const n = next(name);
346
+ const hit = replayed(name, n, "task");
347
+ if (hit !== void 0) return answer(hit);
348
+ await quiesce();
349
+ return call("wf.task", name, n, {
350
+ subject: spec.subject,
351
+ assignee: assignee(spec.assignee),
352
+ decision: spec.decision.type,
353
+ ...spec.timeout === void 0 ? {} : { timeout: spec.timeout }
354
+ });
355
+ },
356
+ async call(name, command, input) {
357
+ if (transactions > 0) throw intentInTransaction("wf.call");
358
+ const n = next(name);
359
+ const inputHash = hashOf({ command: idOf(command), input: input ?? null });
360
+ const hit = replayed(name, n, "call", inputHash);
361
+ if (hit !== void 0) return answer(hit);
362
+ return track(call("wf.call", name, n, { command: idOf(command), input, inputHash }));
363
+ },
364
+ async start(name, workflow, input) {
365
+ const n = next(name);
366
+ const inputHash = hashOf({ workflow: idOf(workflow), input: input ?? null });
367
+ const hit = replayed(name, n, "start", inputHash);
368
+ const started = hit !== void 0 ? answer(hit) : await track(call("wf.start", name, n, { workflow: idOf(workflow), input, inputHash }));
369
+ return { workflow: idOf(workflow), instance: started.instance };
370
+ },
371
+ async now(name) {
372
+ const n = next(name);
373
+ const hit = replayed(name, n, "now");
374
+ if (hit !== void 0) return answer(hit);
375
+ return await track(call("wf.now", name, n));
376
+ },
377
+ async uuid(name) {
378
+ const n = next(name);
379
+ const hit = replayed(name, n, "uuid");
380
+ if (hit !== void 0) return answer(hit);
381
+ return await track(call("wf.uuid", name, n));
382
+ }
383
+ };
384
+ }
385
+ export {
386
+ createCommandContext,
387
+ createEndpointRequest,
388
+ createGuardContext,
389
+ createQuery,
390
+ createTx,
391
+ createWorkflowContext
392
+ };
@@ -0,0 +1,64 @@
1
+ const KINDS = /* @__PURE__ */ new Set(["domain", "validation", "denied", "internal", "suspend"]);
2
+ const CODE = {
3
+ artifactMissing: "runtime.artifactMissing",
4
+ exportMissing: "runtime.exportMissing",
5
+ protocol: "runtime.protocol",
6
+ hostCall: "runtime.hostCall",
7
+ suspended: "runtime.suspended",
8
+ canceled: "runtime.canceled",
9
+ nestedTransaction: "runtime.nestedTransaction",
10
+ txClosed: "runtime.txClosed",
11
+ badInvocation: "runtime.badInvocation",
12
+ intentInTransaction: "runtime.intentInTransaction",
13
+ resultNotJson: "runtime.resultNotJson"
14
+ };
15
+ class RuntimeError extends Error {
16
+ kind;
17
+ code;
18
+ params;
19
+ issues;
20
+ suspend;
21
+ constructor(wire) {
22
+ super(wire.message ?? wire.code ?? wire.kind);
23
+ this.name = "RuntimeError";
24
+ this.kind = wire.kind;
25
+ this.code = wire.code;
26
+ this.params = wire.params;
27
+ this.issues = wire.issues;
28
+ this.suspend = wire.suspend;
29
+ }
30
+ }
31
+ function internal(code, message) {
32
+ return new RuntimeError({ kind: "internal", code, message });
33
+ }
34
+ function fromWire(wire) {
35
+ return new RuntimeError(KINDS.has(wire.kind) ? wire : { ...wire, kind: "internal" });
36
+ }
37
+ function toWire(err) {
38
+ if (err !== null && typeof err === "object") {
39
+ const e = err;
40
+ const wireOf = typeof e.toWire === "function" ? e.toWire.call(err) : void 0;
41
+ const source = wireOf !== null && typeof wireOf === "object" ? wireOf : e;
42
+ if (typeof source.kind === "string" && KINDS.has(source.kind)) {
43
+ const wire = { kind: source.kind };
44
+ if (typeof source.code === "string") wire.code = source.code;
45
+ const message = typeof source.message === "string" ? source.message : void 0;
46
+ if (message !== void 0) wire.message = message;
47
+ if (source.params !== void 0) wire.params = source.params;
48
+ if (Array.isArray(source.issues)) wire.issues = source.issues;
49
+ if (source.suspend !== void 0) wire.suspend = source.suspend;
50
+ return wire;
51
+ }
52
+ if (err instanceof Error) {
53
+ return { kind: "internal", code: "runtime.unhandled", message: err.message, stack: err.stack };
54
+ }
55
+ }
56
+ return { kind: "internal", code: "runtime.unhandled", message: String(err) };
57
+ }
58
+ export {
59
+ CODE,
60
+ RuntimeError,
61
+ fromWire,
62
+ internal,
63
+ toWire
64
+ };
@@ -0,0 +1,28 @@
1
+ let specifiers = {};
2
+ let sdkDir = "";
3
+ let vendorDir = "";
4
+ const SOLID = /^solid-js(?:\/|$)/;
5
+ const initialize = (data) => {
6
+ sdkDir = data.sdkDir;
7
+ vendorDir = data.vendorDir ?? "";
8
+ const at = (file) => new URL(file, data.sdkDir).href;
9
+ specifiers = {
10
+ "@iota-uz/sdk/runtime": at("index.mjs"),
11
+ "@iota-uz/sdk/runtime/server": at("server.mjs"),
12
+ "@iota-uz/sdk/runtime/client": at("client.mjs"),
13
+ "@iota-uz/sdk/runtime/kit": at("kit.mjs"),
14
+ "@iota-uz/sdk/runtime/testing": at("testing.mjs")
15
+ };
16
+ };
17
+ const resolve = (specifier, context, next) => {
18
+ const url = specifiers[specifier];
19
+ if (url !== void 0) return { url, shortCircuit: true };
20
+ if (vendorDir !== "" && SOLID.test(specifier) && context.parentURL?.startsWith(sdkDir) === true) {
21
+ return next(specifier, { ...context, parentURL: new URL("resolve.mjs", vendorDir).href });
22
+ }
23
+ return next(specifier, context);
24
+ };
25
+ export {
26
+ initialize,
27
+ resolve
28
+ };
@@ -0,0 +1,4 @@
1
+ const PROTOCOL = "iota.runtime/1";
2
+ export {
3
+ PROTOCOL
4
+ };
@@ -0,0 +1,8 @@
1
+ import { register } from "node:module";
2
+ register("./loader.mjs", import.meta.url, {
3
+ data: {
4
+ sdkDir: new URL("./sdk/", import.meta.url).href,
5
+ // The build worker's vendored node_modules (absent in a plain host install).
6
+ vendorDir: new URL("../build/vendor/", import.meta.url).href
7
+ }
8
+ });
@@ -0,0 +1,153 @@
1
+ class AssertionError extends Error {
2
+ actual;
3
+ expected;
4
+ operator;
5
+ constructor(message, details) {
6
+ super(message);
7
+ this.name = "AssertionError";
8
+ this.actual = details.actual;
9
+ this.expected = details.expected;
10
+ this.operator = details.operator;
11
+ }
12
+ }
13
+ function show(value) {
14
+ const seen = /* @__PURE__ */ new WeakSet();
15
+ const text = JSON.stringify(
16
+ value,
17
+ (_key, v) => {
18
+ if (typeof v === "bigint") return `${v}n`;
19
+ if (v === void 0) return "[undefined]";
20
+ if (typeof v === "function") return `[function ${v.name}]`;
21
+ if (typeof v === "object" && v !== null) {
22
+ if (seen.has(v)) return "[circular]";
23
+ seen.add(v);
24
+ if (v instanceof Error) return { name: v.name, message: v.message };
25
+ }
26
+ return v;
27
+ },
28
+ 2
29
+ );
30
+ return text === void 0 ? String(value) : text;
31
+ }
32
+ const isObject = (v) => typeof v === "object" && v !== null;
33
+ function firstDifference(a, b, path) {
34
+ if (Object.is(a, b)) return void 0;
35
+ if (!isObject(a) || !isObject(b)) return path === "" ? "(value)" : path;
36
+ if (Array.isArray(a) !== Array.isArray(b)) return path === "" ? "(value)" : path;
37
+ if (a instanceof Date && b instanceof Date) return a.getTime() === b.getTime() ? void 0 : path;
38
+ const keys = /* @__PURE__ */ new Set([...Object.keys(a), ...Object.keys(b)]);
39
+ for (const key of [...keys].sort()) {
40
+ const next = Array.isArray(a) ? `${path}[${key}]` : path === "" ? key : `${path}.${key}`;
41
+ if (!(key in a) || !(key in b)) return next;
42
+ const d = firstDifference(a[key], b[key], next);
43
+ if (d !== void 0) return d;
44
+ }
45
+ return void 0;
46
+ }
47
+ function fail(operator, message, fallback, actual, expected) {
48
+ throw new AssertionError(message ?? fallback, { actual, expected, operator });
49
+ }
50
+ function describeError(err) {
51
+ if (err instanceof Error) {
52
+ const code = err.code;
53
+ return `${err.name}${typeof code === "string" ? ` [${code}]` : ""}: ${err.message}`;
54
+ }
55
+ return String(err);
56
+ }
57
+ function matches(err, expected) {
58
+ if (typeof expected === "string") return err instanceof Error && err.message.includes(expected);
59
+ if (expected instanceof RegExp) return err instanceof Error && expected.test(err.message);
60
+ if (typeof expected === "function") return err instanceof expected;
61
+ if ("of" in expected && "id" in expected) return isObject(err) && err.code === expected.id;
62
+ const o = expected;
63
+ const e = err;
64
+ if (!isObject(err)) return false;
65
+ if (o.code !== void 0 && e.code !== o.code) return false;
66
+ if (o.kind !== void 0 && e.kind !== o.kind) return false;
67
+ if (o.issue !== void 0 && !(e.issues ?? []).some((i) => i.code === o.issue?.id)) return false;
68
+ if (o.message !== void 0) {
69
+ const text = String(e.message ?? "");
70
+ if (typeof o.message === "string" ? !text.includes(o.message) : !o.message.test(text)) return false;
71
+ }
72
+ return true;
73
+ }
74
+ function describeMatcher(expected) {
75
+ if (typeof expected === "string" || expected instanceof RegExp) return `message ${String(expected)}`;
76
+ if (typeof expected === "function") return `instance of ${expected.name}`;
77
+ if ("of" in expected && "id" in expected) return `domain error ${expected.id}`;
78
+ return show(expected);
79
+ }
80
+ const assert = {
81
+ ok(value, message) {
82
+ if (!value) fail("ok", message, `expected a truthy value, got ${show(value)}`, value, true);
83
+ },
84
+ equal(actual, expected, message) {
85
+ if (!Object.is(actual, expected)) {
86
+ fail("equal", message, `expected ${show(expected)}
87
+ got ${show(actual)}`, actual, expected);
88
+ }
89
+ },
90
+ notEqual(actual, expected, message) {
91
+ if (Object.is(actual, expected)) fail("notEqual", message, `expected a value other than ${show(expected)}`, actual, expected);
92
+ },
93
+ deepEqual(actual, expected, message) {
94
+ const at = firstDifference(actual, expected, "");
95
+ if (at !== void 0) {
96
+ fail("deepEqual", message, `values differ at ${at}
97
+ expected ${show(expected)}
98
+ got ${show(actual)}`, actual, expected);
99
+ }
100
+ },
101
+ partial(actual, expected, message) {
102
+ const visit = (a, e, path) => {
103
+ if (isObject(e) && !Array.isArray(e)) {
104
+ if (!isObject(a)) return path === "" ? "(value)" : path;
105
+ for (const [k, v] of Object.entries(e)) {
106
+ const d = visit(a[k], v, path === "" ? k : `${path}.${k}`);
107
+ if (d !== void 0) return d;
108
+ }
109
+ return void 0;
110
+ }
111
+ return firstDifference(a, e, path);
112
+ };
113
+ const at = visit(actual, expected, "");
114
+ if (at !== void 0) {
115
+ fail("partial", message, `value does not contain the expected properties (first difference at ${at})
116
+ expected ${show(expected)}
117
+ got ${show(actual)}`, actual, expected);
118
+ }
119
+ },
120
+ match(text, pattern, message) {
121
+ const ok = typeof pattern === "string" ? text.includes(pattern) : pattern.test(text);
122
+ if (!ok) fail("match", message, `expected ${show(text)} to match ${String(pattern)}`, text, pattern);
123
+ },
124
+ throws(fn, expected, message) {
125
+ try {
126
+ fn();
127
+ } catch (err) {
128
+ if (expected !== void 0 && !matches(err, expected)) {
129
+ fail("throws", message, `threw ${describeError(err)}, expected ${describeMatcher(expected)}`, err, expected);
130
+ }
131
+ return;
132
+ }
133
+ fail("throws", message, "expected the function to throw");
134
+ },
135
+ async rejects(promiseOrFn, expected, message) {
136
+ try {
137
+ await (typeof promiseOrFn === "function" ? promiseOrFn() : promiseOrFn);
138
+ } catch (err) {
139
+ if (expected !== void 0 && !matches(err, expected)) {
140
+ fail("rejects", message, `rejected with ${describeError(err)}, expected ${describeMatcher(expected)}`, err, expected);
141
+ }
142
+ return;
143
+ }
144
+ fail("rejects", message, "expected the promise to reject");
145
+ },
146
+ fail(message) {
147
+ throw new AssertionError(message, { operator: "fail" });
148
+ }
149
+ };
150
+ export {
151
+ AssertionError,
152
+ assert
153
+ };