@testsmith/testblocks 0.9.4 → 0.9.7

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/dist/cli/index.js +4 -1
  2. package/dist/client/assets/index-B8OSvcUg.css +1 -0
  3. package/dist/client/assets/index-CMMJHs_d.js +2197 -0
  4. package/dist/client/assets/index-CMMJHs_d.js.map +1 -0
  5. package/dist/client/index.html +2 -2
  6. package/dist/core/blocks/api/ApiAssertBodyContainsBlock.d.ts +13 -0
  7. package/dist/core/blocks/api/ApiAssertBodyContainsBlock.js +40 -0
  8. package/dist/core/blocks/api/ApiAssertStatusBlock.d.ts +13 -0
  9. package/dist/core/blocks/api/ApiAssertStatusBlock.js +35 -0
  10. package/dist/core/blocks/api/ApiClearHeadersBlock.d.ts +13 -0
  11. package/dist/core/blocks/api/ApiClearHeadersBlock.js +25 -0
  12. package/dist/core/blocks/api/ApiDeleteBlock.d.ts +13 -0
  13. package/dist/core/blocks/api/ApiDeleteBlock.js +37 -0
  14. package/dist/core/blocks/api/ApiExtractBlock.d.ts +14 -0
  15. package/dist/core/blocks/api/ApiExtractBlock.js +40 -0
  16. package/dist/core/blocks/api/ApiExtractJsonPathBlock.d.ts +13 -0
  17. package/dist/core/blocks/api/ApiExtractJsonPathBlock.js +47 -0
  18. package/dist/core/blocks/api/ApiExtractXPathBlock.d.ts +13 -0
  19. package/dist/core/blocks/api/ApiExtractXPathBlock.js +70 -0
  20. package/dist/core/blocks/api/ApiGetBlock.d.ts +13 -0
  21. package/dist/core/blocks/api/ApiGetBlock.js +36 -0
  22. package/dist/core/blocks/api/ApiHeadersBlock.d.ts +14 -0
  23. package/dist/core/blocks/api/ApiHeadersBlock.js +44 -0
  24. package/dist/core/blocks/api/ApiJsonBodyBlock.d.ts +14 -0
  25. package/dist/core/blocks/api/ApiJsonBodyBlock.js +28 -0
  26. package/dist/core/blocks/api/ApiPatchBlock.d.ts +13 -0
  27. package/dist/core/blocks/api/ApiPatchBlock.js +47 -0
  28. package/dist/core/blocks/api/ApiPostBlock.d.ts +13 -0
  29. package/dist/core/blocks/api/ApiPostBlock.js +47 -0
  30. package/dist/core/blocks/api/ApiPutBlock.d.ts +13 -0
  31. package/dist/core/blocks/api/ApiPutBlock.js +47 -0
  32. package/dist/core/blocks/api/ApiSetHeaderBlock.d.ts +13 -0
  33. package/dist/core/blocks/api/ApiSetHeaderBlock.js +37 -0
  34. package/dist/core/blocks/api/ApiSetHeadersBlock.d.ts +13 -0
  35. package/dist/core/blocks/api/ApiSetHeadersBlock.js +41 -0
  36. package/dist/core/blocks/api/index.d.ts +25 -0
  37. package/dist/core/blocks/api/index.js +83 -0
  38. package/dist/core/blocks/base/Block.d.ts +59 -0
  39. package/dist/core/blocks/base/Block.js +151 -0
  40. package/dist/core/blocks/base/ContainerBlock.d.ts +14 -0
  41. package/dist/core/blocks/base/ContainerBlock.js +16 -0
  42. package/dist/core/blocks/base/ControlFlowBlock.d.ts +13 -0
  43. package/dist/core/blocks/base/ControlFlowBlock.js +17 -0
  44. package/dist/core/blocks/base/StatementBlock.d.ts +9 -0
  45. package/dist/core/blocks/base/StatementBlock.js +16 -0
  46. package/dist/core/blocks/base/ValueBlock.d.ts +12 -0
  47. package/dist/core/blocks/base/ValueBlock.js +16 -0
  48. package/dist/core/blocks/base/index.d.ts +5 -0
  49. package/dist/core/blocks/base/index.js +13 -0
  50. package/dist/core/blocks/data/DataCsvBlock.d.ts +14 -0
  51. package/dist/core/blocks/data/DataCsvBlock.js +51 -0
  52. package/dist/core/blocks/data/DataDefineBlock.d.ts +14 -0
  53. package/dist/core/blocks/data/DataDefineBlock.js +28 -0
  54. package/dist/core/blocks/data/DataForeachBlock.d.ts +13 -0
  55. package/dist/core/blocks/data/DataForeachBlock.js +37 -0
  56. package/dist/core/blocks/data/DataFromVariableBlock.d.ts +14 -0
  57. package/dist/core/blocks/data/DataFromVariableBlock.js +27 -0
  58. package/dist/core/blocks/data/DataGetCurrentBlock.d.ts +14 -0
  59. package/dist/core/blocks/data/DataGetCurrentBlock.js +34 -0
  60. package/dist/core/blocks/data/DataGetIndexBlock.d.ts +14 -0
  61. package/dist/core/blocks/data/DataGetIndexBlock.js +24 -0
  62. package/dist/core/blocks/data/DataGetNameBlock.d.ts +14 -0
  63. package/dist/core/blocks/data/DataGetNameBlock.js +24 -0
  64. package/dist/core/blocks/data/DataRangeBlock.d.ts +14 -0
  65. package/dist/core/blocks/data/DataRangeBlock.js +40 -0
  66. package/dist/core/blocks/data/DataRowBlock.d.ts +14 -0
  67. package/dist/core/blocks/data/DataRowBlock.js +33 -0
  68. package/dist/core/blocks/data/DataTableBlock.d.ts +14 -0
  69. package/dist/core/blocks/data/DataTableBlock.js +51 -0
  70. package/dist/core/blocks/data/index.d.ts +20 -0
  71. package/dist/core/blocks/data/index.js +57 -0
  72. package/dist/core/blocks/index.d.ts +66 -5
  73. package/dist/core/blocks/index.js +134 -35
  74. package/dist/core/blocks/lifecycle/LifecycleAfterAllBlock.d.ts +15 -0
  75. package/dist/core/blocks/lifecycle/LifecycleAfterAllBlock.js +27 -0
  76. package/dist/core/blocks/lifecycle/LifecycleAfterEachBlock.d.ts +15 -0
  77. package/dist/core/blocks/lifecycle/LifecycleAfterEachBlock.js +27 -0
  78. package/dist/core/blocks/lifecycle/LifecycleBeforeAllBlock.d.ts +15 -0
  79. package/dist/core/blocks/lifecycle/LifecycleBeforeAllBlock.js +28 -0
  80. package/dist/core/blocks/lifecycle/LifecycleBeforeEachBlock.d.ts +15 -0
  81. package/dist/core/blocks/lifecycle/LifecycleBeforeEachBlock.js +27 -0
  82. package/dist/core/blocks/lifecycle/LifecycleOnFailureBlock.d.ts +13 -0
  83. package/dist/core/blocks/lifecycle/LifecycleOnFailureBlock.js +25 -0
  84. package/dist/core/blocks/lifecycle/LifecycleRetryBlock.d.ts +13 -0
  85. package/dist/core/blocks/lifecycle/LifecycleRetryBlock.js +29 -0
  86. package/dist/core/blocks/lifecycle/LifecycleSetupBlock.d.ts +13 -0
  87. package/dist/core/blocks/lifecycle/LifecycleSetupBlock.js +27 -0
  88. package/dist/core/blocks/lifecycle/LifecycleSkipIfBlock.d.ts +13 -0
  89. package/dist/core/blocks/lifecycle/LifecycleSkipIfBlock.js +31 -0
  90. package/dist/core/blocks/lifecycle/LifecycleTeardownBlock.d.ts +13 -0
  91. package/dist/core/blocks/lifecycle/LifecycleTeardownBlock.js +27 -0
  92. package/dist/core/blocks/lifecycle/TestCaseBlock.d.ts +21 -0
  93. package/dist/core/blocks/lifecycle/TestCaseBlock.js +72 -0
  94. package/dist/core/blocks/lifecycle/TestCaseDataDrivenBlock.d.ts +21 -0
  95. package/dist/core/blocks/lifecycle/TestCaseDataDrivenBlock.js +102 -0
  96. package/dist/core/blocks/lifecycle/index.d.ts +21 -0
  97. package/dist/core/blocks/lifecycle/index.js +63 -0
  98. package/dist/core/blocks/logic/LogicArrayBlock.d.ts +14 -0
  99. package/dist/core/blocks/logic/LogicArrayBlock.js +28 -0
  100. package/dist/core/blocks/logic/LogicAssertBlock.d.ts +13 -0
  101. package/dist/core/blocks/logic/LogicAssertBlock.js +32 -0
  102. package/dist/core/blocks/logic/LogicBooleanBlock.d.ts +14 -0
  103. package/dist/core/blocks/logic/LogicBooleanBlock.js +26 -0
  104. package/dist/core/blocks/logic/LogicBooleanOpBlock.d.ts +14 -0
  105. package/dist/core/blocks/logic/LogicBooleanOpBlock.js +31 -0
  106. package/dist/core/blocks/logic/LogicCommentBlock.d.ts +13 -0
  107. package/dist/core/blocks/logic/LogicCommentBlock.js +26 -0
  108. package/dist/core/blocks/logic/LogicCompareBlock.d.ts +14 -0
  109. package/dist/core/blocks/logic/LogicCompareBlock.js +52 -0
  110. package/dist/core/blocks/logic/LogicFailBlock.d.ts +16 -0
  111. package/dist/core/blocks/logic/LogicFailBlock.js +30 -0
  112. package/dist/core/blocks/logic/LogicForeachBlock.d.ts +13 -0
  113. package/dist/core/blocks/logic/LogicForeachBlock.js +29 -0
  114. package/dist/core/blocks/logic/LogicGetVariableBlock.d.ts +14 -0
  115. package/dist/core/blocks/logic/LogicGetVariableBlock.js +27 -0
  116. package/dist/core/blocks/logic/LogicIfBlock.d.ts +13 -0
  117. package/dist/core/blocks/logic/LogicIfBlock.js +36 -0
  118. package/dist/core/blocks/logic/LogicLogBlock.d.ts +13 -0
  119. package/dist/core/blocks/logic/LogicLogBlock.js +30 -0
  120. package/dist/core/blocks/logic/LogicNotBlock.d.ts +14 -0
  121. package/dist/core/blocks/logic/LogicNotBlock.js +26 -0
  122. package/dist/core/blocks/logic/LogicNumberBlock.d.ts +14 -0
  123. package/dist/core/blocks/logic/LogicNumberBlock.js +26 -0
  124. package/dist/core/blocks/logic/LogicObjectBlock.d.ts +14 -0
  125. package/dist/core/blocks/logic/LogicObjectBlock.js +28 -0
  126. package/dist/core/blocks/logic/LogicRepeatBlock.d.ts +13 -0
  127. package/dist/core/blocks/logic/LogicRepeatBlock.js +27 -0
  128. package/dist/core/blocks/logic/LogicSetVariableBlock.d.ts +13 -0
  129. package/dist/core/blocks/logic/LogicSetVariableBlock.js +34 -0
  130. package/dist/core/blocks/logic/LogicTextBlock.d.ts +14 -0
  131. package/dist/core/blocks/logic/LogicTextBlock.js +27 -0
  132. package/dist/core/blocks/logic/LogicTryCatchBlock.d.ts +13 -0
  133. package/dist/core/blocks/logic/LogicTryCatchBlock.js +26 -0
  134. package/dist/core/blocks/logic/index.d.ts +28 -0
  135. package/dist/core/blocks/logic/index.js +95 -0
  136. package/dist/core/blocks/playwright/assertions/WebAssertAccessibleDescriptionBlock.d.ts +13 -0
  137. package/dist/core/blocks/playwright/assertions/WebAssertAccessibleDescriptionBlock.js +41 -0
  138. package/dist/core/blocks/playwright/assertions/WebAssertAccessibleNameBlock.d.ts +13 -0
  139. package/dist/core/blocks/playwright/assertions/WebAssertAccessibleNameBlock.js +41 -0
  140. package/dist/core/blocks/playwright/assertions/WebAssertAttachedBlock.d.ts +13 -0
  141. package/dist/core/blocks/playwright/assertions/WebAssertAttachedBlock.js +39 -0
  142. package/dist/core/blocks/playwright/assertions/WebAssertAttributeBlock.d.ts +13 -0
  143. package/dist/core/blocks/playwright/assertions/WebAssertAttributeBlock.js +44 -0
  144. package/dist/core/blocks/playwright/assertions/WebAssertCheckedBlock.d.ts +13 -0
  145. package/dist/core/blocks/playwright/assertions/WebAssertCheckedBlock.js +48 -0
  146. package/dist/core/blocks/playwright/assertions/WebAssertClassBlock.d.ts +13 -0
  147. package/dist/core/blocks/playwright/assertions/WebAssertClassBlock.js +43 -0
  148. package/dist/core/blocks/playwright/assertions/WebAssertCountBlock.d.ts +13 -0
  149. package/dist/core/blocks/playwright/assertions/WebAssertCountBlock.js +41 -0
  150. package/dist/core/blocks/playwright/assertions/WebAssertCssBlock.d.ts +13 -0
  151. package/dist/core/blocks/playwright/assertions/WebAssertCssBlock.js +44 -0
  152. package/dist/core/blocks/playwright/assertions/WebAssertDisabledBlock.d.ts +13 -0
  153. package/dist/core/blocks/playwright/assertions/WebAssertDisabledBlock.js +39 -0
  154. package/dist/core/blocks/playwright/assertions/WebAssertEditableBlock.d.ts +13 -0
  155. package/dist/core/blocks/playwright/assertions/WebAssertEditableBlock.js +39 -0
  156. package/dist/core/blocks/playwright/assertions/WebAssertEmptyBlock.d.ts +13 -0
  157. package/dist/core/blocks/playwright/assertions/WebAssertEmptyBlock.js +39 -0
  158. package/dist/core/blocks/playwright/assertions/WebAssertEnabledBlock.d.ts +13 -0
  159. package/dist/core/blocks/playwright/assertions/WebAssertEnabledBlock.js +39 -0
  160. package/dist/core/blocks/playwright/assertions/WebAssertFocusedBlock.d.ts +13 -0
  161. package/dist/core/blocks/playwright/assertions/WebAssertFocusedBlock.js +39 -0
  162. package/dist/core/blocks/playwright/assertions/WebAssertIdBlock.d.ts +13 -0
  163. package/dist/core/blocks/playwright/assertions/WebAssertIdBlock.js +41 -0
  164. package/dist/core/blocks/playwright/assertions/WebAssertInViewportBlock.d.ts +13 -0
  165. package/dist/core/blocks/playwright/assertions/WebAssertInViewportBlock.js +39 -0
  166. package/dist/core/blocks/playwright/assertions/WebAssertNotVisibleBlock.d.ts +13 -0
  167. package/dist/core/blocks/playwright/assertions/WebAssertNotVisibleBlock.js +39 -0
  168. package/dist/core/blocks/playwright/assertions/WebAssertRoleBlock.d.ts +13 -0
  169. package/dist/core/blocks/playwright/assertions/WebAssertRoleBlock.js +69 -0
  170. package/dist/core/blocks/playwright/assertions/WebAssertTextContainsBlock.d.ts +13 -0
  171. package/dist/core/blocks/playwright/assertions/WebAssertTextContainsBlock.js +41 -0
  172. package/dist/core/blocks/playwright/assertions/WebAssertTextEqualsBlock.d.ts +13 -0
  173. package/dist/core/blocks/playwright/assertions/WebAssertTextEqualsBlock.js +41 -0
  174. package/dist/core/blocks/playwright/assertions/WebAssertTitleContainsBlock.d.ts +13 -0
  175. package/dist/core/blocks/playwright/assertions/WebAssertTitleContainsBlock.js +39 -0
  176. package/dist/core/blocks/playwright/assertions/WebAssertTitleEqualsBlock.d.ts +13 -0
  177. package/dist/core/blocks/playwright/assertions/WebAssertTitleEqualsBlock.js +36 -0
  178. package/dist/core/blocks/playwright/assertions/WebAssertUrlContainsBlock.d.ts +13 -0
  179. package/dist/core/blocks/playwright/assertions/WebAssertUrlContainsBlock.js +40 -0
  180. package/dist/core/blocks/playwright/assertions/WebAssertUrlEqualsBlock.d.ts +13 -0
  181. package/dist/core/blocks/playwright/assertions/WebAssertUrlEqualsBlock.js +37 -0
  182. package/dist/core/blocks/playwright/assertions/WebAssertValueBlock.d.ts +13 -0
  183. package/dist/core/blocks/playwright/assertions/WebAssertValueBlock.js +43 -0
  184. package/dist/core/blocks/playwright/assertions/WebAssertValueContainsBlock.d.ts +13 -0
  185. package/dist/core/blocks/playwright/assertions/WebAssertValueContainsBlock.js +43 -0
  186. package/dist/core/blocks/playwright/assertions/WebAssertVisibleBlock.d.ts +13 -0
  187. package/dist/core/blocks/playwright/assertions/WebAssertVisibleBlock.js +39 -0
  188. package/dist/core/blocks/playwright/assertions/index.d.ts +36 -0
  189. package/dist/core/blocks/playwright/assertions/index.js +127 -0
  190. package/dist/core/blocks/playwright/index.d.ts +16 -0
  191. package/dist/core/blocks/playwright/index.js +28 -3
  192. package/dist/core/blocks/playwright/interactions/WebCheckboxBlock.d.ts +13 -0
  193. package/dist/core/blocks/playwright/interactions/WebCheckboxBlock.js +43 -0
  194. package/dist/core/blocks/playwright/interactions/WebClickBlock.d.ts +13 -0
  195. package/dist/core/blocks/playwright/interactions/WebClickBlock.js +34 -0
  196. package/dist/core/blocks/playwright/interactions/WebDragAndDropBlock.d.ts +13 -0
  197. package/dist/core/blocks/playwright/interactions/WebDragAndDropBlock.js +37 -0
  198. package/dist/core/blocks/playwright/interactions/WebFillBlock.d.ts +13 -0
  199. package/dist/core/blocks/playwright/interactions/WebFillBlock.js +38 -0
  200. package/dist/core/blocks/playwright/interactions/WebFocusBlock.d.ts +13 -0
  201. package/dist/core/blocks/playwright/interactions/WebFocusBlock.js +34 -0
  202. package/dist/core/blocks/playwright/interactions/WebHoverBlock.d.ts +13 -0
  203. package/dist/core/blocks/playwright/interactions/WebHoverBlock.js +34 -0
  204. package/dist/core/blocks/playwright/interactions/WebPressKeyBlock.d.ts +13 -0
  205. package/dist/core/blocks/playwright/interactions/WebPressKeyBlock.js +37 -0
  206. package/dist/core/blocks/playwright/interactions/WebScrollIntoViewBlock.d.ts +13 -0
  207. package/dist/core/blocks/playwright/interactions/WebScrollIntoViewBlock.js +34 -0
  208. package/dist/core/blocks/playwright/interactions/WebSelectBlock.d.ts +13 -0
  209. package/dist/core/blocks/playwright/interactions/WebSelectBlock.js +37 -0
  210. package/dist/core/blocks/playwright/interactions/WebTypeBlock.d.ts +13 -0
  211. package/dist/core/blocks/playwright/interactions/WebTypeBlock.js +41 -0
  212. package/dist/core/blocks/playwright/interactions/WebUploadFileBlock.d.ts +13 -0
  213. package/dist/core/blocks/playwright/interactions/WebUploadFileBlock.js +39 -0
  214. package/dist/core/blocks/playwright/interactions/index.d.ts +21 -0
  215. package/dist/core/blocks/playwright/interactions/index.js +56 -0
  216. package/dist/core/blocks/playwright/navigation/WebNavigateBlock.d.ts +13 -0
  217. package/dist/core/blocks/playwright/navigation/WebNavigateBlock.js +36 -0
  218. package/dist/core/blocks/playwright/navigation/WebScreenshotBlock.d.ts +13 -0
  219. package/dist/core/blocks/playwright/navigation/WebScreenshotBlock.js +36 -0
  220. package/dist/core/blocks/playwright/navigation/WebWaitBlock.d.ts +13 -0
  221. package/dist/core/blocks/playwright/navigation/WebWaitBlock.js +32 -0
  222. package/dist/core/blocks/playwright/navigation/WebWaitForElementBlock.d.ts +13 -0
  223. package/dist/core/blocks/playwright/navigation/WebWaitForElementBlock.js +37 -0
  224. package/dist/core/blocks/playwright/navigation/WebWaitForUrlBlock.d.ts +13 -0
  225. package/dist/core/blocks/playwright/navigation/WebWaitForUrlBlock.js +34 -0
  226. package/dist/core/blocks/playwright/navigation/index.d.ts +15 -0
  227. package/dist/core/blocks/playwright/navigation/index.js +32 -0
  228. package/dist/core/blocks/playwright/retrieval/WebCountElementsBlock.d.ts +16 -0
  229. package/dist/core/blocks/playwright/retrieval/WebCountElementsBlock.js +36 -0
  230. package/dist/core/blocks/playwright/retrieval/WebGetAttributeBlock.d.ts +16 -0
  231. package/dist/core/blocks/playwright/retrieval/WebGetAttributeBlock.js +42 -0
  232. package/dist/core/blocks/playwright/retrieval/WebGetInputValueBlock.d.ts +16 -0
  233. package/dist/core/blocks/playwright/retrieval/WebGetInputValueBlock.js +40 -0
  234. package/dist/core/blocks/playwright/retrieval/WebGetTextBlock.d.ts +16 -0
  235. package/dist/core/blocks/playwright/retrieval/WebGetTextBlock.js +40 -0
  236. package/dist/core/blocks/playwright/retrieval/WebGetTitleBlock.d.ts +16 -0
  237. package/dist/core/blocks/playwright/retrieval/WebGetTitleBlock.js +31 -0
  238. package/dist/core/blocks/playwright/retrieval/WebGetUrlBlock.d.ts +16 -0
  239. package/dist/core/blocks/playwright/retrieval/WebGetUrlBlock.js +31 -0
  240. package/dist/core/blocks/playwright/retrieval/index.d.ts +16 -0
  241. package/dist/core/blocks/playwright/retrieval/index.js +36 -0
  242. package/dist/core/blocks/playwright/types.d.ts +14 -0
  243. package/dist/core/blocks/procedures/ProcedureCallBlock.d.ts +13 -0
  244. package/dist/core/blocks/procedures/ProcedureCallBlock.js +66 -0
  245. package/dist/core/blocks/procedures/ProcedureCallWithReturnBlock.d.ts +14 -0
  246. package/dist/core/blocks/procedures/ProcedureCallWithReturnBlock.js +51 -0
  247. package/dist/core/blocks/procedures/ProcedureDefineBlock.d.ts +15 -0
  248. package/dist/core/blocks/procedures/ProcedureDefineBlock.js +59 -0
  249. package/dist/core/blocks/procedures/ProcedureFillFormBlock.d.ts +13 -0
  250. package/dist/core/blocks/procedures/ProcedureFillFormBlock.js +30 -0
  251. package/dist/core/blocks/procedures/ProcedureGetParamBlock.d.ts +14 -0
  252. package/dist/core/blocks/procedures/ProcedureGetParamBlock.js +33 -0
  253. package/dist/core/blocks/procedures/ProcedureInlineBlock.d.ts +14 -0
  254. package/dist/core/blocks/procedures/ProcedureInlineBlock.js +31 -0
  255. package/dist/core/blocks/procedures/ProcedureLoginBlock.d.ts +13 -0
  256. package/dist/core/blocks/procedures/ProcedureLoginBlock.js +37 -0
  257. package/dist/core/blocks/procedures/ProcedureMapBlock.d.ts +14 -0
  258. package/dist/core/blocks/procedures/ProcedureMapBlock.js +36 -0
  259. package/dist/core/blocks/procedures/ProcedureReturnBlock.d.ts +15 -0
  260. package/dist/core/blocks/procedures/ProcedureReturnBlock.js +28 -0
  261. package/dist/core/blocks/procedures/ProcedureWaitAndClickBlock.d.ts +13 -0
  262. package/dist/core/blocks/procedures/ProcedureWaitAndClickBlock.js +32 -0
  263. package/dist/core/blocks/procedures/index.d.ts +21 -0
  264. package/dist/core/blocks/procedures/index.js +62 -0
  265. package/dist/core/blocks/{procedures.d.ts → procedures/procedureRegistry.d.ts} +10 -2
  266. package/dist/core/blocks/procedures/procedureRegistry.js +27 -0
  267. package/dist/core/blocks/utils/apiUtils.d.ts +81 -0
  268. package/dist/core/blocks/utils/apiUtils.js +176 -0
  269. package/dist/core/blocks/utils/index.d.ts +2 -0
  270. package/dist/core/blocks/utils/index.js +16 -0
  271. package/dist/core/blocks/utils/variableUtils.d.ts +19 -0
  272. package/dist/core/blocks/utils/variableUtils.js +69 -0
  273. package/dist/server/index.js +117 -11
  274. package/dist/server/openApiParser.d.ts +82 -0
  275. package/dist/server/openApiParser.js +495 -0
  276. package/dist/server/startServer.d.ts +1 -0
  277. package/dist/server/startServer.js +164 -0
  278. package/package.json +4 -2
  279. package/dist/client/assets/index-BLBBQ6Rn.js +0 -2195
  280. package/dist/client/assets/index-BLBBQ6Rn.js.map +0 -1
  281. package/dist/client/assets/index-qjoPPl9y.css +0 -1
  282. package/dist/core/blocks/api.d.ts +0 -2
  283. package/dist/core/blocks/api.js +0 -607
  284. package/dist/core/blocks/data-driven.d.ts +0 -2
  285. package/dist/core/blocks/data-driven.js +0 -245
  286. package/dist/core/blocks/lifecycle.d.ts +0 -2
  287. package/dist/core/blocks/lifecycle.js +0 -201
  288. package/dist/core/blocks/logic.d.ts +0 -2
  289. package/dist/core/blocks/logic.js +0 -360
  290. package/dist/core/blocks/playwright/assertions.d.ts +0 -5
  291. package/dist/core/blocks/playwright/assertions.js +0 -311
  292. package/dist/core/blocks/playwright/interactions.d.ts +0 -5
  293. package/dist/core/blocks/playwright/interactions.js +0 -208
  294. package/dist/core/blocks/playwright/navigation.d.ts +0 -5
  295. package/dist/core/blocks/playwright/navigation.js +0 -131
  296. package/dist/core/blocks/playwright/retrieval.d.ts +0 -5
  297. package/dist/core/blocks/playwright/retrieval.js +0 -153
  298. package/dist/core/blocks/playwright.d.ts +0 -13
  299. package/dist/core/blocks/playwright.js +0 -17
  300. package/dist/core/blocks/procedures.js +0 -321
@@ -1,607 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.apiBlocks = void 0;
7
- const jsonpath_plus_1 = require("jsonpath-plus");
8
- const xpath_1 = __importDefault(require("xpath"));
9
- const xmldom_1 = require("xmldom");
10
- const assertions_1 = require("./assertions");
11
- // API Testing Blocks
12
- exports.apiBlocks = [
13
- // ============================================
14
- // HEADER MANAGEMENT BLOCKS
15
- // ============================================
16
- // Set a single header
17
- {
18
- type: 'api_set_header',
19
- category: 'API',
20
- color: '#7B1FA2',
21
- tooltip: 'Set a request header (applies to subsequent requests)',
22
- inputs: [
23
- { name: 'NAME', type: 'field', fieldType: 'text', required: true, default: 'Authorization' },
24
- { name: 'VALUE', type: 'field', fieldType: 'text', required: true, default: 'Bearer token' },
25
- ],
26
- previousStatement: true,
27
- nextStatement: true,
28
- execute: async (params, context) => {
29
- const name = params.NAME;
30
- const value = resolveVariables(params.VALUE, context);
31
- // Get or create headers map
32
- let headers = context.variables.get('__requestHeaders');
33
- if (!headers) {
34
- headers = {};
35
- }
36
- headers[name] = value;
37
- context.variables.set('__requestHeaders', headers);
38
- context.logger.info(`Set header: ${name}: ${value.substring(0, 30)}${value.length > 30 ? '...' : ''}`);
39
- return {
40
- _summary: `${name}: ${value.substring(0, 30)}${value.length > 30 ? '...' : ''}`,
41
- name,
42
- value,
43
- };
44
- },
45
- },
46
- // Set multiple headers at once
47
- {
48
- type: 'api_set_headers',
49
- category: 'API',
50
- color: '#7B1FA2',
51
- tooltip: 'Set multiple request headers from JSON object',
52
- inputs: [
53
- { name: 'HEADERS', type: 'field', fieldType: 'text', required: true, default: '{"Content-Type": "application/json"}' },
54
- ],
55
- previousStatement: true,
56
- nextStatement: true,
57
- execute: async (params, context) => {
58
- const headersStr = resolveVariables(params.HEADERS, context);
59
- try {
60
- const newHeaders = JSON.parse(headersStr);
61
- // Get or create headers map
62
- let headers = context.variables.get('__requestHeaders');
63
- if (!headers) {
64
- headers = {};
65
- }
66
- // Merge new headers
67
- Object.assign(headers, newHeaders);
68
- context.variables.set('__requestHeaders', headers);
69
- const headerNames = Object.keys(newHeaders).join(', ');
70
- context.logger.info(`Set headers: ${headerNames}`);
71
- return {
72
- _summary: `Set ${Object.keys(newHeaders).length} headers`,
73
- headers: newHeaders,
74
- };
75
- }
76
- catch {
77
- throw new Error(`Invalid JSON for headers: ${headersStr}`);
78
- }
79
- },
80
- },
81
- // Clear all headers
82
- {
83
- type: 'api_clear_headers',
84
- category: 'API',
85
- color: '#7B1FA2',
86
- tooltip: 'Clear all request headers',
87
- inputs: [],
88
- previousStatement: true,
89
- nextStatement: true,
90
- execute: async (params, context) => {
91
- context.variables.delete('__requestHeaders');
92
- context.logger.info('Cleared all request headers');
93
- return { _summary: 'Headers cleared' };
94
- },
95
- },
96
- // ============================================
97
- // STATEMENT BLOCKS - Chain together visually
98
- // ============================================
99
- // HTTP GET Request (Statement - stores response)
100
- {
101
- type: 'api_get',
102
- category: 'API',
103
- color: '#4CAF50',
104
- tooltip: 'Perform HTTP GET request and store response',
105
- inputs: [
106
- { name: 'URL', type: 'field', fieldType: 'text', required: true },
107
- { name: 'HEADERS', type: 'field', fieldType: 'text', default: '' },
108
- ],
109
- previousStatement: true,
110
- nextStatement: true,
111
- execute: async (params, context) => {
112
- const url = resolveVariables(params.URL, context);
113
- const contextHeaders = context.variables.get('__requestHeaders') || {};
114
- const inlineHeaders = parseHeaders(params.HEADERS, context);
115
- const headers = { ...contextHeaders, ...inlineHeaders };
116
- context.logger.info(`GET ${url}`);
117
- const response = await fetch(url, {
118
- headers,
119
- signal: context.abortSignal,
120
- });
121
- const parsed = await parseResponse(response);
122
- context.variables.set('__lastResponse', parsed);
123
- return parsed;
124
- },
125
- },
126
- // HTTP POST Request (Statement)
127
- {
128
- type: 'api_post',
129
- category: 'API',
130
- color: '#4CAF50',
131
- tooltip: 'Perform HTTP POST request and store response',
132
- inputs: [
133
- { name: 'URL', type: 'field', fieldType: 'text', required: true },
134
- { name: 'BODY', type: 'field', fieldType: 'text', default: '{}' },
135
- { name: 'HEADERS', type: 'field', fieldType: 'text', default: '' },
136
- ],
137
- previousStatement: true,
138
- nextStatement: true,
139
- execute: async (params, context) => {
140
- const url = resolveVariables(params.URL, context);
141
- const bodyStr = resolveVariables(params.BODY || '{}', context);
142
- const contextHeaders = context.variables.get('__requestHeaders') || {};
143
- const inlineHeaders = parseHeaders(params.HEADERS, context);
144
- let body;
145
- try {
146
- body = JSON.parse(bodyStr);
147
- }
148
- catch {
149
- body = bodyStr;
150
- }
151
- context.logger.info(`POST ${url}`);
152
- const response = await fetch(url, {
153
- method: 'POST',
154
- headers: { 'Content-Type': 'application/json', ...contextHeaders, ...inlineHeaders },
155
- body: typeof body === 'string' ? body : JSON.stringify(body),
156
- signal: context.abortSignal,
157
- });
158
- const parsed = await parseResponse(response);
159
- context.variables.set('__lastResponse', parsed);
160
- return parsed;
161
- },
162
- },
163
- // HTTP PUT Request (Statement)
164
- {
165
- type: 'api_put',
166
- category: 'API',
167
- color: '#4CAF50',
168
- tooltip: 'Perform HTTP PUT request and store response',
169
- inputs: [
170
- { name: 'URL', type: 'field', fieldType: 'text', required: true },
171
- { name: 'BODY', type: 'field', fieldType: 'text', default: '{}' },
172
- { name: 'HEADERS', type: 'field', fieldType: 'text', default: '' },
173
- ],
174
- previousStatement: true,
175
- nextStatement: true,
176
- execute: async (params, context) => {
177
- const url = resolveVariables(params.URL, context);
178
- const bodyStr = resolveVariables(params.BODY || '{}', context);
179
- const contextHeaders = context.variables.get('__requestHeaders') || {};
180
- const inlineHeaders = parseHeaders(params.HEADERS, context);
181
- let body;
182
- try {
183
- body = JSON.parse(bodyStr);
184
- }
185
- catch {
186
- body = bodyStr;
187
- }
188
- context.logger.info(`PUT ${url}`);
189
- const response = await fetch(url, {
190
- method: 'PUT',
191
- headers: { 'Content-Type': 'application/json', ...contextHeaders, ...inlineHeaders },
192
- body: typeof body === 'string' ? body : JSON.stringify(body),
193
- signal: context.abortSignal,
194
- });
195
- const parsed = await parseResponse(response);
196
- context.variables.set('__lastResponse', parsed);
197
- return parsed;
198
- },
199
- },
200
- // HTTP PATCH Request (Statement)
201
- {
202
- type: 'api_patch',
203
- category: 'API',
204
- color: '#4CAF50',
205
- tooltip: 'Perform HTTP PATCH request and store response',
206
- inputs: [
207
- { name: 'URL', type: 'field', fieldType: 'text', required: true },
208
- { name: 'BODY', type: 'field', fieldType: 'text', default: '{}' },
209
- { name: 'HEADERS', type: 'field', fieldType: 'text', default: '' },
210
- ],
211
- previousStatement: true,
212
- nextStatement: true,
213
- execute: async (params, context) => {
214
- const url = resolveVariables(params.URL, context);
215
- const bodyStr = resolveVariables(params.BODY || '{}', context);
216
- const contextHeaders = context.variables.get('__requestHeaders') || {};
217
- const inlineHeaders = parseHeaders(params.HEADERS, context);
218
- let body;
219
- try {
220
- body = JSON.parse(bodyStr);
221
- }
222
- catch {
223
- body = bodyStr;
224
- }
225
- context.logger.info(`PATCH ${url}`);
226
- const response = await fetch(url, {
227
- method: 'PATCH',
228
- headers: { 'Content-Type': 'application/json', ...contextHeaders, ...inlineHeaders },
229
- body: typeof body === 'string' ? body : JSON.stringify(body),
230
- signal: context.abortSignal,
231
- });
232
- const parsed = await parseResponse(response);
233
- context.variables.set('__lastResponse', parsed);
234
- return parsed;
235
- },
236
- },
237
- // HTTP DELETE Request (Statement)
238
- {
239
- type: 'api_delete',
240
- category: 'API',
241
- color: '#4CAF50',
242
- tooltip: 'Perform HTTP DELETE request and store response',
243
- inputs: [
244
- { name: 'URL', type: 'field', fieldType: 'text', required: true },
245
- { name: 'HEADERS', type: 'field', fieldType: 'text', default: '' },
246
- ],
247
- previousStatement: true,
248
- nextStatement: true,
249
- execute: async (params, context) => {
250
- const url = resolveVariables(params.URL, context);
251
- const contextHeaders = context.variables.get('__requestHeaders') || {};
252
- const inlineHeaders = parseHeaders(params.HEADERS, context);
253
- const headers = { ...contextHeaders, ...inlineHeaders };
254
- context.logger.info(`DELETE ${url}`);
255
- const response = await fetch(url, {
256
- method: 'DELETE',
257
- headers,
258
- signal: context.abortSignal,
259
- });
260
- const parsed = await parseResponse(response);
261
- context.variables.set('__lastResponse', parsed);
262
- return parsed;
263
- },
264
- },
265
- // Assert Status Code (uses last response if not provided)
266
- {
267
- type: 'api_assert_status',
268
- category: 'API',
269
- color: '#FF9800',
270
- tooltip: 'Assert that response has expected status code',
271
- inputs: [
272
- { name: 'STATUS', type: 'field', fieldType: 'number', default: 200, required: true },
273
- ],
274
- previousStatement: true,
275
- nextStatement: true,
276
- execute: async (params, context) => {
277
- const response = context.variables.get('__lastResponse');
278
- if (!response) {
279
- throw new Error('No response available. Make sure to call an API request first.');
280
- }
281
- const expectedStatus = params.STATUS;
282
- (0, assertions_1.handleAssertion)(context, response.status === expectedStatus, `Expected status ${expectedStatus} but got ${response.status}`, { stepType: 'api_assert_status', expected: expectedStatus, actual: response.status });
283
- context.logger.info(`✓ Status is ${expectedStatus}`);
284
- return {
285
- _summary: `✓ Status ${response.status} === ${expectedStatus}`,
286
- expected: expectedStatus,
287
- actual: response.status,
288
- };
289
- },
290
- },
291
- // Assert Response Body Contains
292
- {
293
- type: 'api_assert_body_contains',
294
- category: 'API',
295
- color: '#FF9800',
296
- tooltip: 'Assert that response body contains expected value',
297
- inputs: [
298
- { name: 'PATH', type: 'field', fieldType: 'text', default: '' },
299
- { name: 'VALUE', type: 'field', fieldType: 'text', required: true },
300
- ],
301
- previousStatement: true,
302
- nextStatement: true,
303
- execute: async (params, context) => {
304
- const response = context.variables.get('__lastResponse');
305
- if (!response) {
306
- throw new Error('No response available. Make sure to call an API request first.');
307
- }
308
- const path = params.PATH;
309
- const expectedValue = resolveVariables(params.VALUE, context);
310
- const actualValue = path ? getValueByPath(response.body, path) : response.body;
311
- const actualStr = typeof actualValue === 'string' ? actualValue : JSON.stringify(actualValue);
312
- (0, assertions_1.handleAssertion)(context, actualStr.includes(expectedValue), `Expected ${path || 'body'} to contain "${expectedValue}" but got "${actualStr}"`, { stepType: 'api_assert_body_contains', expected: expectedValue, actual: actualStr });
313
- context.logger.info(`✓ ${path || 'body'} contains "${expectedValue}"`);
314
- return {
315
- _summary: `✓ ${path || 'body'} contains "${expectedValue}"`,
316
- path: path || 'body',
317
- expected: expectedValue,
318
- actual: actualStr.substring(0, 100) + (actualStr.length > 100 ? '...' : ''),
319
- };
320
- },
321
- },
322
- // Extract Value using JSONPath
323
- {
324
- type: 'api_extract_jsonpath',
325
- category: 'API',
326
- color: '#2196F3',
327
- tooltip: 'Extract a value from JSON response using JSONPath expression',
328
- inputs: [
329
- { name: 'JSONPATH', type: 'field', fieldType: 'text', required: true, default: '$.data.id' },
330
- { name: 'VARIABLE', type: 'field', fieldType: 'text', required: true },
331
- ],
332
- previousStatement: true,
333
- nextStatement: true,
334
- execute: async (params, context) => {
335
- const response = context.variables.get('__lastResponse');
336
- if (!response) {
337
- throw new Error('No response available. Make sure to call an API request first.');
338
- }
339
- const jsonPath = params.JSONPATH;
340
- const varName = params.VARIABLE;
341
- try {
342
- const results = (0, jsonpath_plus_1.JSONPath)({ path: jsonPath, json: response.body });
343
- // If single result, unwrap from array
344
- const value = results.length === 1 ? results[0] : results;
345
- context.variables.set(varName, value);
346
- const valueStr = JSON.stringify(value);
347
- context.logger.info(`Extracted (JSONPath) ${jsonPath} → ${varName} = ${valueStr}`);
348
- return {
349
- _summary: `${varName} = ${valueStr.substring(0, 50)}${valueStr.length > 50 ? '...' : ''}`,
350
- variable: varName,
351
- jsonPath,
352
- value,
353
- };
354
- }
355
- catch (e) {
356
- throw new Error(`Invalid JSONPath expression: ${jsonPath}. Error: ${e.message}`);
357
- }
358
- },
359
- },
360
- // Extract Value using XPath (for XML/HTML responses)
361
- {
362
- type: 'api_extract_xpath',
363
- category: 'API',
364
- color: '#2196F3',
365
- tooltip: 'Extract a value from XML/HTML response using XPath expression',
366
- inputs: [
367
- { name: 'XPATH', type: 'field', fieldType: 'text', required: true, default: '//title/text()' },
368
- { name: 'VARIABLE', type: 'field', fieldType: 'text', required: true },
369
- ],
370
- previousStatement: true,
371
- nextStatement: true,
372
- execute: async (params, context) => {
373
- const response = context.variables.get('__lastResponse');
374
- if (!response) {
375
- throw new Error('No response available. Make sure to call an API request first.');
376
- }
377
- const xpathExpr = params.XPATH;
378
- const varName = params.VARIABLE;
379
- try {
380
- // Ensure body is a string for XML parsing
381
- const xmlString = typeof response.body === 'string'
382
- ? response.body
383
- : JSON.stringify(response.body);
384
- const doc = new xmldom_1.DOMParser().parseFromString(xmlString, 'text/xml');
385
- const nodes = xpath_1.default.select(xpathExpr, doc);
386
- // Convert nodes to values
387
- let value;
388
- if (Array.isArray(nodes)) {
389
- if (nodes.length === 0) {
390
- value = null;
391
- }
392
- else if (nodes.length === 1) {
393
- value = getNodeValue(nodes[0]);
394
- }
395
- else {
396
- value = nodes.map(getNodeValue);
397
- }
398
- }
399
- else {
400
- value = nodes;
401
- }
402
- context.variables.set(varName, value);
403
- const valueStr = JSON.stringify(value);
404
- context.logger.info(`Extracted (XPath) ${xpathExpr} → ${varName} = ${valueStr}`);
405
- return {
406
- _summary: `${varName} = ${valueStr.substring(0, 50)}${valueStr.length > 50 ? '...' : ''}`,
407
- variable: varName,
408
- xpath: xpathExpr,
409
- value,
410
- };
411
- }
412
- catch (e) {
413
- throw new Error(`XPath extraction failed: ${xpathExpr}. Error: ${e.message}`);
414
- }
415
- },
416
- },
417
- // Legacy extract (simple dot notation) - kept for backwards compatibility
418
- {
419
- type: 'api_extract',
420
- category: 'API',
421
- color: '#2196F3',
422
- tooltip: 'Extract a value from response using dot notation (e.g., data.user.name)',
423
- inputs: [
424
- { name: 'PATH', type: 'field', fieldType: 'text', required: true },
425
- { name: 'VARIABLE', type: 'field', fieldType: 'text', required: true },
426
- ],
427
- previousStatement: true,
428
- nextStatement: true,
429
- execute: async (params, context) => {
430
- const response = context.variables.get('__lastResponse');
431
- if (!response) {
432
- throw new Error('No response available. Make sure to call an API request first.');
433
- }
434
- const path = params.PATH;
435
- const varName = params.VARIABLE;
436
- const value = getValueByPath(response.body, path);
437
- context.variables.set(varName, value);
438
- const valueStr = JSON.stringify(value);
439
- context.logger.info(`Extracted ${path} → ${varName} = ${valueStr}`);
440
- return {
441
- _summary: `${varName} = ${valueStr.substring(0, 50)}${valueStr.length > 50 ? '...' : ''}`,
442
- variable: varName,
443
- path,
444
- value,
445
- };
446
- },
447
- },
448
- // ============================================
449
- // VALUE BLOCKS - For advanced compositions
450
- // ============================================
451
- // Create Headers Object
452
- {
453
- type: 'api_headers',
454
- category: 'API',
455
- color: '#9C27B0',
456
- tooltip: 'Create a headers object',
457
- inputs: [
458
- { name: 'AUTH_TYPE', type: 'field', fieldType: 'dropdown', options: [['None', 'none'], ['Bearer Token', 'bearer'], ['Basic Auth', 'basic'], ['API Key', 'apikey']] },
459
- { name: 'AUTH_VALUE', type: 'field', fieldType: 'text' },
460
- { name: 'CUSTOM', type: 'value', check: 'Object' },
461
- ],
462
- output: { type: 'Object' },
463
- execute: async (params, context) => {
464
- const authType = params.AUTH_TYPE;
465
- const authValue = resolveVariables(params.AUTH_VALUE || '', context);
466
- const custom = params.CUSTOM || {};
467
- const headers = { ...custom };
468
- switch (authType) {
469
- case 'bearer':
470
- headers['Authorization'] = `Bearer ${authValue}`;
471
- break;
472
- case 'basic':
473
- headers['Authorization'] = `Basic ${Buffer.from(authValue).toString('base64')}`;
474
- break;
475
- case 'apikey':
476
- headers['X-API-Key'] = authValue;
477
- break;
478
- }
479
- return headers;
480
- },
481
- },
482
- // Create JSON Body
483
- {
484
- type: 'api_json_body',
485
- category: 'API',
486
- color: '#9C27B0',
487
- tooltip: 'Create a JSON body from key-value pairs or raw JSON',
488
- inputs: [
489
- { name: 'JSON', type: 'field', fieldType: 'text', default: '{}' },
490
- ],
491
- output: { type: 'Object' },
492
- execute: async (params, context) => {
493
- const json = resolveVariables(params.JSON, context);
494
- return JSON.parse(json);
495
- },
496
- },
497
- ];
498
- // Helper functions
499
- function resolveVariables(text, context) {
500
- // Match ${varName} or ${varName.property.path}
501
- return text.replace(/\$\{([\w.]+)\}/g, (match, path) => {
502
- const parts = path.split('.');
503
- const varName = parts[0];
504
- let value = context.variables.get(varName);
505
- // Navigate through object properties if path has dots
506
- if (parts.length > 1 && value !== undefined && value !== null) {
507
- for (let i = 1; i < parts.length; i++) {
508
- if (value === undefined || value === null)
509
- break;
510
- value = value[parts[i]];
511
- }
512
- }
513
- if (value === undefined || value === null) {
514
- return match; // Keep original if not found
515
- }
516
- // Return stringified value
517
- if (typeof value === 'object') {
518
- return JSON.stringify(value);
519
- }
520
- return String(value);
521
- });
522
- }
523
- function parseHeaders(headersStr, context) {
524
- if (!headersStr || !headersStr.trim())
525
- return {};
526
- const resolved = resolveVariables(headersStr, context);
527
- // Try JSON format first: {"Authorization": "Bearer token"}
528
- try {
529
- const parsed = JSON.parse(resolved);
530
- if (typeof parsed === 'object' && parsed !== null) {
531
- return parsed;
532
- }
533
- }
534
- catch {
535
- // Not JSON, try key:value format
536
- }
537
- // Try key:value format (one per line or semicolon-separated)
538
- // Example: "Authorization: Bearer token; Content-Type: application/json"
539
- const headers = {};
540
- const pairs = resolved.split(/[;\n]/).map(s => s.trim()).filter(s => s);
541
- for (const pair of pairs) {
542
- const colonIndex = pair.indexOf(':');
543
- if (colonIndex > 0) {
544
- const key = pair.slice(0, colonIndex).trim();
545
- const value = pair.slice(colonIndex + 1).trim();
546
- headers[key] = value;
547
- }
548
- }
549
- return headers;
550
- }
551
- async function parseResponse(response) {
552
- const headers = {};
553
- response.headers.forEach((value, key) => {
554
- headers[key] = value;
555
- });
556
- let body;
557
- const contentType = response.headers.get('content-type') || '';
558
- if (contentType.includes('application/json')) {
559
- body = await response.json();
560
- }
561
- else {
562
- body = await response.text();
563
- }
564
- return { status: response.status, headers, body };
565
- }
566
- function getValueByPath(obj, path) {
567
- if (!path)
568
- return obj;
569
- const parts = path.split('.');
570
- let current = obj;
571
- for (const part of parts) {
572
- if (current === null || current === undefined)
573
- return undefined;
574
- // Handle array indexing like "items[0]"
575
- const arrayMatch = part.match(/^(\w+)\[(\d+)\]$/);
576
- if (arrayMatch) {
577
- const [, key, index] = arrayMatch;
578
- current = current[key];
579
- if (Array.isArray(current)) {
580
- current = current[parseInt(index, 10)];
581
- }
582
- }
583
- else {
584
- current = current[part];
585
- }
586
- }
587
- return current;
588
- }
589
- // Helper to extract value from XPath node
590
- function getNodeValue(node) {
591
- if (!node)
592
- return null;
593
- const n = node;
594
- // Text node or attribute
595
- if (n.nodeValue !== undefined) {
596
- return n.nodeValue;
597
- }
598
- // Element node - get text content
599
- if (n.textContent !== undefined) {
600
- return n.textContent;
601
- }
602
- // Fallback to string representation
603
- if (n.toString) {
604
- return n.toString();
605
- }
606
- return null;
607
- }
@@ -1,2 +0,0 @@
1
- import { BlockDefinition } from '../types';
2
- export declare const dataDrivenBlocks: BlockDefinition[];