@budibase/server 1.0.105-alpha.20 → 1.0.105-alpha.21

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 (193) hide show
  1. package/builder/assets/{index.6dc91e94.js → index.8d922c8c.js} +197 -197
  2. package/builder/assets/{index.9e33e753.css → index.b7e0672d.css} +1 -1
  3. package/builder/index.html +2 -2
  4. package/coverage/clover.xml +174 -101
  5. package/coverage/coverage-final.json +6 -5
  6. package/coverage/lcov-report/api/controllers/analytics.js.html +1 -1
  7. package/coverage/lcov-report/api/controllers/apikeys.js.html +1 -1
  8. package/coverage/lcov-report/api/controllers/application.js.html +1 -1
  9. package/coverage/lcov-report/api/controllers/auth.js.html +1 -1
  10. package/coverage/lcov-report/api/controllers/automation.js.html +1 -1
  11. package/coverage/lcov-report/api/controllers/backup.js.html +1 -1
  12. package/coverage/lcov-report/api/controllers/cloud.js.html +1 -1
  13. package/coverage/lcov-report/api/controllers/component.js.html +1 -1
  14. package/coverage/lcov-report/api/controllers/datasource.js.html +1 -1
  15. package/coverage/lcov-report/api/controllers/dev.js.html +1 -1
  16. package/coverage/lcov-report/api/controllers/index.html +1 -1
  17. package/coverage/lcov-report/api/controllers/integration.js.html +1 -1
  18. package/coverage/lcov-report/api/controllers/layout.js.html +1 -1
  19. package/coverage/lcov-report/api/controllers/metadata.js.html +1 -1
  20. package/coverage/lcov-report/api/controllers/migrations.js.html +1 -1
  21. package/coverage/lcov-report/api/controllers/permission.js.html +1 -1
  22. package/coverage/lcov-report/api/controllers/query/index.html +1 -1
  23. package/coverage/lcov-report/api/controllers/query/index.js.html +1 -1
  24. package/coverage/lcov-report/api/controllers/query/validation.js.html +1 -1
  25. package/coverage/lcov-report/api/controllers/role.js.html +1 -1
  26. package/coverage/lcov-report/api/controllers/routing.js.html +1 -1
  27. package/coverage/lcov-report/api/controllers/row/external.js.html +1 -1
  28. package/coverage/lcov-report/api/controllers/row/index.html +1 -1
  29. package/coverage/lcov-report/api/controllers/row/index.js.html +1 -1
  30. package/coverage/lcov-report/api/controllers/row/internal.js.html +1 -1
  31. package/coverage/lcov-report/api/controllers/row/internalSearch.js.html +1 -1
  32. package/coverage/lcov-report/api/controllers/row/staticFormula.js.html +1 -1
  33. package/coverage/lcov-report/api/controllers/row/utils.js.html +1 -1
  34. package/coverage/lcov-report/api/controllers/screen.js.html +1 -1
  35. package/coverage/lcov-report/api/controllers/script.js.html +1 -1
  36. package/coverage/lcov-report/api/controllers/table/bulkFormula.js.html +1 -1
  37. package/coverage/lcov-report/api/controllers/table/external.js.html +1 -1
  38. package/coverage/lcov-report/api/controllers/table/index.html +1 -1
  39. package/coverage/lcov-report/api/controllers/table/index.js.html +1 -1
  40. package/coverage/lcov-report/api/controllers/table/internal.js.html +1 -1
  41. package/coverage/lcov-report/api/controllers/table/utils.js.html +1 -1
  42. package/coverage/lcov-report/api/controllers/templates.js.html +1 -1
  43. package/coverage/lcov-report/api/controllers/user.js.html +1 -1
  44. package/coverage/lcov-report/api/controllers/view/exporters.js.html +1 -1
  45. package/coverage/lcov-report/api/controllers/view/index.html +1 -1
  46. package/coverage/lcov-report/api/controllers/view/index.js.html +1 -1
  47. package/coverage/lcov-report/api/controllers/view/utils.js.html +1 -1
  48. package/coverage/lcov-report/api/controllers/view/viewBuilder.js.html +1 -1
  49. package/coverage/lcov-report/api/controllers/webhook.js.html +1 -1
  50. package/coverage/lcov-report/api/index.html +1 -1
  51. package/coverage/lcov-report/api/index.js.html +1 -1
  52. package/coverage/lcov-report/api/routes/analytics.js.html +1 -1
  53. package/coverage/lcov-report/api/routes/apikeys.js.html +1 -1
  54. package/coverage/lcov-report/api/routes/application.js.html +1 -1
  55. package/coverage/lcov-report/api/routes/auth.js.html +1 -1
  56. package/coverage/lcov-report/api/routes/automation.js.html +1 -1
  57. package/coverage/lcov-report/api/routes/backup.js.html +1 -1
  58. package/coverage/lcov-report/api/routes/cloud.js.html +1 -1
  59. package/coverage/lcov-report/api/routes/component.js.html +1 -1
  60. package/coverage/lcov-report/api/routes/datasource.js.html +1 -1
  61. package/coverage/lcov-report/api/routes/deploy.js.html +1 -1
  62. package/coverage/lcov-report/api/routes/dev.js.html +1 -1
  63. package/coverage/lcov-report/api/routes/index.html +1 -1
  64. package/coverage/lcov-report/api/routes/index.js.html +1 -1
  65. package/coverage/lcov-report/api/routes/integration.js.html +1 -1
  66. package/coverage/lcov-report/api/routes/layout.js.html +1 -1
  67. package/coverage/lcov-report/api/routes/metadata.js.html +1 -1
  68. package/coverage/lcov-report/api/routes/migrations.js.html +1 -1
  69. package/coverage/lcov-report/api/routes/permission.js.html +1 -1
  70. package/coverage/lcov-report/api/routes/query.js.html +1 -1
  71. package/coverage/lcov-report/api/routes/role.js.html +1 -1
  72. package/coverage/lcov-report/api/routes/routing.js.html +1 -1
  73. package/coverage/lcov-report/api/routes/row.js.html +1 -1
  74. package/coverage/lcov-report/api/routes/screen.js.html +1 -1
  75. package/coverage/lcov-report/api/routes/script.js.html +1 -1
  76. package/coverage/lcov-report/api/routes/static.js.html +1 -1
  77. package/coverage/lcov-report/api/routes/table.js.html +1 -1
  78. package/coverage/lcov-report/api/routes/templates.js.html +1 -1
  79. package/coverage/lcov-report/api/routes/user.js.html +1 -1
  80. package/coverage/lcov-report/api/routes/utils/index.html +1 -1
  81. package/coverage/lcov-report/api/routes/utils/validators.js.html +1 -1
  82. package/coverage/lcov-report/api/routes/view.js.html +1 -1
  83. package/coverage/lcov-report/api/routes/webhook.js.html +1 -1
  84. package/coverage/lcov-report/automations/actions.js.html +13 -4
  85. package/coverage/lcov-report/automations/automationUtils.js.html +45 -9
  86. package/coverage/lcov-report/automations/bullboard.js.html +1 -1
  87. package/coverage/lcov-report/automations/index.html +18 -18
  88. package/coverage/lcov-report/automations/index.js.html +1 -1
  89. package/coverage/lcov-report/automations/steps/bash.js.html +1 -1
  90. package/coverage/lcov-report/automations/steps/createRow.js.html +1 -1
  91. package/coverage/lcov-report/automations/steps/delay.js.html +1 -1
  92. package/coverage/lcov-report/automations/steps/deleteRow.js.html +1 -1
  93. package/coverage/lcov-report/automations/steps/discord.js.html +1 -1
  94. package/coverage/lcov-report/automations/steps/executeQuery.js.html +1 -1
  95. package/coverage/lcov-report/automations/steps/executeScript.js.html +1 -1
  96. package/coverage/lcov-report/automations/steps/filter.js.html +1 -1
  97. package/coverage/lcov-report/automations/steps/index.html +20 -5
  98. package/coverage/lcov-report/automations/steps/integromat.js.html +1 -1
  99. package/coverage/lcov-report/automations/steps/loop.js.html +230 -0
  100. package/coverage/lcov-report/automations/steps/outgoingWebhook.js.html +1 -1
  101. package/coverage/lcov-report/automations/steps/queryRows.js.html +1 -1
  102. package/coverage/lcov-report/automations/steps/sendSmtpEmail.js.html +1 -1
  103. package/coverage/lcov-report/automations/steps/serverLog.js.html +1 -1
  104. package/coverage/lcov-report/automations/steps/slack.js.html +1 -1
  105. package/coverage/lcov-report/automations/steps/updateRow.js.html +1 -1
  106. package/coverage/lcov-report/automations/steps/utils.js.html +1 -1
  107. package/coverage/lcov-report/automations/steps/zapier.js.html +1 -1
  108. package/coverage/lcov-report/automations/triggerInfo/app.js.html +1 -1
  109. package/coverage/lcov-report/automations/triggerInfo/cron.js.html +1 -1
  110. package/coverage/lcov-report/automations/triggerInfo/index.html +1 -1
  111. package/coverage/lcov-report/automations/triggerInfo/index.js.html +1 -1
  112. package/coverage/lcov-report/automations/triggerInfo/rowDeleted.js.html +1 -1
  113. package/coverage/lcov-report/automations/triggerInfo/rowSaved.js.html +1 -1
  114. package/coverage/lcov-report/automations/triggerInfo/rowUpdated.js.html +1 -1
  115. package/coverage/lcov-report/automations/triggerInfo/webhook.js.html +1 -1
  116. package/coverage/lcov-report/automations/triggers.js.html +1 -1
  117. package/coverage/lcov-report/automations/utils.js.html +2 -2
  118. package/coverage/lcov-report/constants/index.html +5 -5
  119. package/coverage/lcov-report/constants/index.js.html +22 -4
  120. package/coverage/lcov-report/constants/layouts.js.html +1 -1
  121. package/coverage/lcov-report/constants/screens.js.html +1 -1
  122. package/coverage/lcov-report/db/client.js.html +1 -1
  123. package/coverage/lcov-report/db/inMemoryView.js.html +1 -1
  124. package/coverage/lcov-report/db/index.html +1 -1
  125. package/coverage/lcov-report/db/index.js.html +1 -1
  126. package/coverage/lcov-report/db/linkedRows/LinkController.js.html +1 -1
  127. package/coverage/lcov-report/db/linkedRows/index.html +1 -1
  128. package/coverage/lcov-report/db/linkedRows/index.js.html +1 -1
  129. package/coverage/lcov-report/db/linkedRows/linkUtils.js.html +1 -1
  130. package/coverage/lcov-report/db/newid.js.html +1 -1
  131. package/coverage/lcov-report/db/utils.js.html +1 -1
  132. package/coverage/lcov-report/events/AutomationEmitter.js.html +1 -1
  133. package/coverage/lcov-report/events/index.html +1 -1
  134. package/coverage/lcov-report/events/index.js.html +1 -1
  135. package/coverage/lcov-report/events/utils.js.html +1 -1
  136. package/coverage/lcov-report/index.html +34 -34
  137. package/coverage/lcov-report/integrations/tests/TestConfiguration.js.html +1 -1
  138. package/coverage/lcov-report/integrations/tests/index.html +1 -1
  139. package/coverage/lcov-report/middleware/appInfo.js.html +1 -1
  140. package/coverage/lcov-report/middleware/authorized.js.html +1 -1
  141. package/coverage/lcov-report/middleware/builder.js.html +1 -1
  142. package/coverage/lcov-report/middleware/currentapp.js.html +1 -1
  143. package/coverage/lcov-report/middleware/index.html +1 -1
  144. package/coverage/lcov-report/middleware/joi-validator.js.html +1 -1
  145. package/coverage/lcov-report/middleware/publicApi.js.html +1 -1
  146. package/coverage/lcov-report/middleware/resourceId.js.html +1 -1
  147. package/coverage/lcov-report/middleware/selfhost.js.html +1 -1
  148. package/coverage/lcov-report/middleware/usageQuota.js.html +1 -1
  149. package/coverage/lcov-report/middleware/utils.js.html +1 -1
  150. package/coverage/lcov-report/threads/automation.js.html +531 -45
  151. package/coverage/lcov-report/threads/index.html +20 -20
  152. package/coverage/lcov-report/threads/index.js.html +1 -1
  153. package/coverage/lcov-report/threads/query.js.html +1 -1
  154. package/coverage/lcov-report/threads/utils.js.html +1 -1
  155. package/coverage/lcov-report/utilities/bcrypt.js.html +1 -1
  156. package/coverage/lcov-report/utilities/budibaseDir.js.html +1 -1
  157. package/coverage/lcov-report/utilities/centralPath.js.html +1 -1
  158. package/coverage/lcov-report/utilities/csvParser.js.html +1 -1
  159. package/coverage/lcov-report/utilities/global.js.html +1 -1
  160. package/coverage/lcov-report/utilities/index.html +1 -1
  161. package/coverage/lcov-report/utilities/index.js.html +1 -1
  162. package/coverage/lcov-report/utilities/queue/inMemoryQueue.js.html +1 -1
  163. package/coverage/lcov-report/utilities/queue/index.html +1 -1
  164. package/coverage/lcov-report/utilities/routing/index.html +1 -1
  165. package/coverage/lcov-report/utilities/routing/index.js.html +1 -1
  166. package/coverage/lcov-report/utilities/rowProcessor/index.html +1 -1
  167. package/coverage/lcov-report/utilities/rowProcessor/index.js.html +1 -1
  168. package/coverage/lcov-report/utilities/rowProcessor/utils.js.html +1 -1
  169. package/coverage/lcov-report/utilities/scriptRunner.js.html +1 -1
  170. package/coverage/lcov-report/utilities/security.js.html +1 -1
  171. package/coverage/lcov-report/utilities/statusCodes.js.html +1 -1
  172. package/coverage/lcov-report/utilities/usageQuota/index.html +1 -1
  173. package/coverage/lcov-report/utilities/usageQuota/index.js.html +1 -1
  174. package/coverage/lcov-report/utilities/usageQuota/rows.js.html +1 -1
  175. package/coverage/lcov-report/utilities/usageQuota/usageQuoteReset.js.html +1 -1
  176. package/coverage/lcov-report/utilities/users.js.html +1 -1
  177. package/coverage/lcov-report/utilities/workerRequests.js.html +1 -1
  178. package/coverage/lcov.info +280 -159
  179. package/dist/automations/actions.js +3 -0
  180. package/dist/automations/automationUtils.js +10 -0
  181. package/dist/automations/steps/loop.js +51 -0
  182. package/dist/constants/index.js +5 -0
  183. package/dist/environment.js +1 -0
  184. package/dist/package.json +4 -4
  185. package/dist/threads/automation.js +149 -27
  186. package/dist/tsconfig.tsbuildinfo +1 -1
  187. package/package.json +5 -5
  188. package/src/automations/actions.js +3 -0
  189. package/src/automations/automationUtils.js +12 -0
  190. package/src/automations/steps/loop.js +50 -0
  191. package/src/constants/index.js +6 -0
  192. package/src/environment.js +1 -0
  193. package/src/threads/automation.js +196 -34
@@ -5448,88 +5448,99 @@ DA:13,40
5448
5448
  DA:14,40
5449
5449
  DA:15,40
5450
5450
  DA:16,40
5451
- DA:18,40
5452
- DA:36,40
5453
- DA:58,40
5454
- DA:59,40
5455
- DA:60,40
5451
+ DA:17,40
5452
+ DA:19,40
5453
+ DA:38,40
5456
5454
  DA:61,40
5457
- DA:71,40
5458
- LF:23
5459
- LH:23
5460
- BRDA:58,0,0,40
5461
- BRDA:58,0,1,0
5455
+ DA:62,40
5456
+ DA:63,40
5457
+ DA:64,40
5458
+ DA:74,40
5459
+ LF:24
5460
+ LH:24
5461
+ BRDA:61,0,0,40
5462
+ BRDA:61,0,1,0
5462
5463
  BRF:2
5463
5464
  BRH:1
5464
5465
  end_of_record
5465
5466
  TN:
5466
5467
  SF:src/automations/automationUtils.js
5467
- FN:19,(anonymous_0)
5468
- FN:60,(anonymous_1)
5469
- FN:65,(anonymous_2)
5470
- FNF:3
5468
+ FN:20,(anonymous_0)
5469
+ FN:61,(anonymous_1)
5470
+ FN:66,(anonymous_2)
5471
+ FN:79,(anonymous_3)
5472
+ FNF:4
5471
5473
  FNH:3
5472
5474
  FNDA:15,(anonymous_0)
5473
5475
  FNDA:9,(anonymous_1)
5474
5476
  FNDA:3,(anonymous_2)
5477
+ FNDA:0,(anonymous_3)
5475
5478
  DA:1,40
5476
- DA:19,40
5477
- DA:20,15
5478
- DA:21,1
5479
- DA:23,14
5480
- DA:24,36
5479
+ DA:2,40
5480
+ DA:20,40
5481
+ DA:21,15
5482
+ DA:22,1
5483
+ DA:24,14
5481
5484
  DA:25,36
5482
- DA:26,6
5483
- DA:28,30
5485
+ DA:26,36
5486
+ DA:27,6
5484
5487
  DA:29,30
5485
- DA:30,12
5486
- DA:32,18
5487
- DA:33,2
5488
+ DA:30,30
5489
+ DA:31,12
5490
+ DA:33,18
5488
5491
  DA:34,2
5489
- DA:35,1
5490
- DA:37,2
5491
- DA:38,1
5492
- DA:41,18
5493
- DA:42,1
5492
+ DA:35,2
5493
+ DA:36,1
5494
+ DA:38,2
5495
+ DA:39,1
5496
+ DA:42,18
5494
5497
  DA:43,1
5495
5498
  DA:44,1
5496
- DA:48,14
5497
- DA:60,40
5498
- DA:61,9
5499
- DA:62,8
5500
- DA:65,40
5501
- DA:66,3
5502
- DA:67,0
5503
- DA:69,3
5504
- DA:73,0
5505
- DA:75,3
5506
- LF:31
5507
- LH:29
5508
- BRDA:20,0,0,1
5509
- BRDA:20,0,1,14
5510
- BRDA:25,1,0,6
5511
- BRDA:25,1,1,30
5512
- BRDA:29,2,0,12
5513
- BRDA:29,2,1,18
5514
- BRDA:32,3,0,2
5515
- BRDA:32,3,1,16
5516
- BRDA:34,4,0,1
5517
- BRDA:34,4,1,1
5518
- BRDA:37,5,0,1
5519
- BRDA:37,5,1,1
5520
- BRDA:41,6,0,1
5521
- BRDA:41,6,1,17
5522
- BRDA:43,7,0,1
5523
- BRDA:43,7,1,0
5524
- BRDA:66,8,0,0
5525
- BRDA:66,8,1,3
5526
- BRDA:69,9,0,0
5527
- BRDA:69,9,1,3
5528
- BRDA:70,10,0,3
5529
- BRDA:70,10,1,3
5530
- BRDA:70,10,2,3
5531
- BRDA:75,11,0,3
5532
- BRDA:75,11,1,0
5499
+ DA:45,1
5500
+ DA:49,14
5501
+ DA:61,40
5502
+ DA:62,9
5503
+ DA:63,8
5504
+ DA:66,40
5505
+ DA:67,3
5506
+ DA:68,0
5507
+ DA:70,3
5508
+ DA:74,0
5509
+ DA:76,3
5510
+ DA:79,40
5511
+ DA:80,0
5512
+ DA:81,0
5513
+ DA:82,0
5514
+ DA:83,0
5515
+ DA:84,0
5516
+ DA:87,0
5517
+ LF:39
5518
+ LH:31
5519
+ BRDA:21,0,0,1
5520
+ BRDA:21,0,1,14
5521
+ BRDA:26,1,0,6
5522
+ BRDA:26,1,1,30
5523
+ BRDA:30,2,0,12
5524
+ BRDA:30,2,1,18
5525
+ BRDA:33,3,0,2
5526
+ BRDA:33,3,1,16
5527
+ BRDA:35,4,0,1
5528
+ BRDA:35,4,1,1
5529
+ BRDA:38,5,0,1
5530
+ BRDA:38,5,1,1
5531
+ BRDA:42,6,0,1
5532
+ BRDA:42,6,1,17
5533
+ BRDA:44,7,0,1
5534
+ BRDA:44,7,1,0
5535
+ BRDA:67,8,0,0
5536
+ BRDA:67,8,1,3
5537
+ BRDA:70,9,0,0
5538
+ BRDA:70,9,1,3
5539
+ BRDA:71,10,0,3
5540
+ BRDA:71,10,1,3
5541
+ BRDA:71,10,2,3
5542
+ BRDA:76,11,0,3
5543
+ BRDA:76,11,1,0
5533
5544
  BRF:25
5534
5545
  BRH:21
5535
5546
  end_of_record
@@ -5756,7 +5767,7 @@ DA:46,2
5756
5767
  DA:51,39
5757
5768
  DA:52,78
5758
5769
  DA:53,78
5759
- DA:54,858
5770
+ DA:54,897
5760
5771
  DA:55,39
5761
5772
  DA:58,78
5762
5773
  DA:62,39
@@ -5811,7 +5822,7 @@ BRDA:39,0,1,2
5811
5822
  BRDA:39,1,0,2
5812
5823
  BRDA:39,1,1,2
5813
5824
  BRDA:54,2,0,39
5814
- BRDA:54,2,1,819
5825
+ BRDA:54,2,1,858
5815
5826
  BRDA:66,3,0,0
5816
5827
  BRDA:66,3,1,0
5817
5828
  BRDA:80,4,0,1
@@ -6108,6 +6119,16 @@ BRF:0
6108
6119
  BRH:0
6109
6120
  end_of_record
6110
6121
  TN:
6122
+ SF:src/automations/steps/loop.js
6123
+ FNF:0
6124
+ FNH:0
6125
+ DA:1,40
6126
+ LF:1
6127
+ LH:1
6128
+ BRF:0
6129
+ BRH:0
6130
+ end_of_record
6131
+ TN:
6111
6132
  SF:src/automations/steps/outgoingWebhook.js
6112
6133
  FN:79,(anonymous_0)
6113
6134
  FNF:1
@@ -6472,9 +6493,10 @@ DA:173,48
6472
6493
  DA:178,48
6473
6494
  DA:184,48
6474
6495
  DA:189,48
6475
- DA:194,48
6476
- LF:26
6477
- LH:26
6496
+ DA:193,48
6497
+ DA:200,48
6498
+ LF:27
6499
+ LH:27
6478
6500
  BRDA:55,0,0,96
6479
6501
  BRDA:55,0,1,0
6480
6502
  BRF:2
@@ -8206,30 +8228,32 @@ BRH:0
8206
8228
  end_of_record
8207
8229
  TN:
8208
8230
  SF:src/threads/automation.js
8209
- FN:22,(anonymous_0)
8210
- FN:44,(anonymous_1)
8211
- FN:51,(anonymous_2)
8212
- FN:59,(anonymous_3)
8213
- FN:68,(anonymous_4)
8214
- FN:77,(anonymous_5)
8215
- FN:96,(anonymous_6)
8216
- FN:125,(anonymous_7)
8217
- FN:127,(anonymous_8)
8218
- FN:134,(anonymous_9)
8219
- FN:137,(anonymous_10)
8220
- FNF:11
8231
+ FN:26,(anonymous_0)
8232
+ FN:48,(anonymous_1)
8233
+ FN:55,(anonymous_2)
8234
+ FN:63,(anonymous_3)
8235
+ FN:72,(anonymous_4)
8236
+ FN:81,(anonymous_5)
8237
+ FN:99,(anonymous_6)
8238
+ FN:222,(anonymous_7)
8239
+ FN:287,(anonymous_8)
8240
+ FN:289,(anonymous_9)
8241
+ FN:296,(anonymous_10)
8242
+ FN:299,(anonymous_11)
8243
+ FNF:12
8221
8244
  FNH:10
8222
8245
  FNDA:7,(anonymous_0)
8223
8246
  FNDA:7,(anonymous_1)
8224
8247
  FNDA:5,(anonymous_2)
8225
8248
  FNDA:7,(anonymous_3)
8226
8249
  FNDA:12,(anonymous_4)
8227
- FNDA:7,(anonymous_5)
8228
- FNDA:5,(anonymous_6)
8229
- FNDA:7,(anonymous_7)
8250
+ FNDA:0,(anonymous_5)
8251
+ FNDA:7,(anonymous_6)
8252
+ FNDA:5,(anonymous_7)
8230
8253
  FNDA:7,(anonymous_8)
8231
- FNDA:6,(anonymous_9)
8232
- FNDA:0,(anonymous_10)
8254
+ FNDA:7,(anonymous_9)
8255
+ FNDA:6,(anonymous_10)
8256
+ FNDA:0,(anonymous_11)
8233
8257
  DA:1,4
8234
8258
  DA:2,4
8235
8259
  DA:3,4
@@ -8240,92 +8264,189 @@ DA:7,4
8240
8264
  DA:8,4
8241
8265
  DA:9,4
8242
8266
  DA:10,4
8267
+ DA:11,4
8243
8268
  DA:12,4
8244
8269
  DA:13,4
8245
- DA:14,4
8246
- DA:23,7
8247
- DA:24,7
8248
- DA:25,7
8249
- DA:26,7
8270
+ DA:15,4
8271
+ DA:16,4
8272
+ DA:17,4
8273
+ DA:18,4
8250
8274
  DA:27,7
8251
8275
  DA:28,7
8276
+ DA:29,7
8252
8277
  DA:30,7
8253
8278
  DA:31,7
8254
- DA:33,7
8279
+ DA:32,7
8255
8280
  DA:34,7
8281
+ DA:35,7
8256
8282
  DA:37,7
8257
8283
  DA:38,7
8258
- DA:40,7
8259
8284
  DA:41,7
8285
+ DA:42,7
8286
+ DA:44,7
8260
8287
  DA:45,7
8261
- DA:46,0
8262
- DA:48,7
8263
- DA:52,5
8264
- DA:53,5
8265
- DA:54,0
8288
+ DA:49,7
8289
+ DA:50,0
8290
+ DA:52,7
8266
8291
  DA:56,5
8267
- DA:60,7
8268
- DA:61,0
8269
- DA:63,7
8292
+ DA:57,5
8293
+ DA:58,0
8294
+ DA:60,5
8270
8295
  DA:64,7
8271
- DA:65,6
8272
- DA:69,12
8273
- DA:71,12
8274
- DA:72,7
8275
- DA:74,12
8276
- DA:78,7
8277
- DA:79,7
8278
- DA:80,6
8279
- DA:81,6
8280
- DA:83,5
8281
- DA:84,0
8282
- DA:85,0
8283
- DA:87,5
8284
- DA:88,5
8285
- DA:89,5
8286
- DA:94,5
8287
- DA:95,5
8288
- DA:96,5
8289
- DA:97,5
8290
- DA:104,5
8291
- DA:107,5
8292
- DA:108,0
8293
- DA:109,0
8296
+ DA:65,0
8297
+ DA:67,7
8298
+ DA:68,7
8299
+ DA:69,6
8300
+ DA:73,12
8301
+ DA:75,12
8302
+ DA:76,7
8303
+ DA:78,12
8304
+ DA:82,0
8305
+ DA:92,0
8306
+ DA:100,7
8307
+ DA:101,7
8308
+ DA:102,6
8309
+ DA:105,6
8310
+ DA:107,6
8311
+ DA:108,6
8312
+ DA:109,5
8313
+ DA:111,5
8314
+ DA:112,0
8294
8315
  DA:113,0
8295
- DA:115,5
8296
- DA:117,0
8316
+ DA:114,0
8317
+ DA:117,5
8297
8318
  DA:118,0
8298
- DA:121,6
8299
- DA:125,4
8300
- DA:126,7
8301
- DA:127,7
8302
- DA:128,7
8303
- DA:132,7
8304
- DA:135,6
8305
- DA:138,0
8306
- LF:73
8307
- LH:62
8308
- BRDA:22,0,0,0
8309
- BRDA:24,1,0,4
8310
- BRDA:24,1,1,3
8311
- BRDA:45,2,0,0
8312
- BRDA:45,2,1,7
8313
- BRDA:53,3,0,0
8314
- BRDA:53,3,1,5
8315
- BRDA:60,4,0,0
8316
- BRDA:60,4,1,7
8317
- BRDA:71,5,0,7
8318
- BRDA:71,5,1,5
8319
- BRDA:83,6,0,0
8320
- BRDA:83,6,1,5
8321
- BRDA:95,7,0,5
8322
- BRDA:95,7,1,0
8323
- BRDA:107,8,0,0
8324
- BRDA:107,8,1,5
8325
- BRDA:107,9,0,5
8326
- BRDA:107,9,1,0
8327
- BRF:19
8328
- BRH:11
8319
+ DA:120,5
8320
+ DA:121,5
8321
+ DA:122,5
8322
+ DA:123,5
8323
+ DA:126,5
8324
+ DA:129,0
8325
+ DA:133,0
8326
+ DA:137,0
8327
+ DA:141,0
8328
+ DA:142,0
8329
+ DA:148,0
8330
+ DA:152,0
8331
+ DA:153,0
8332
+ DA:154,0
8333
+ DA:159,0
8334
+ DA:160,0
8335
+ DA:161,0
8336
+ DA:164,0
8337
+ DA:165,0
8338
+ DA:173,0
8339
+ DA:174,0
8340
+ DA:182,0
8341
+ DA:186,0
8342
+ DA:190,0
8343
+ DA:191,0
8344
+ DA:192,0
8345
+ DA:195,0
8346
+ DA:199,0
8347
+ DA:203,0
8348
+ DA:204,0
8349
+ DA:205,0
8350
+ DA:210,5
8351
+ DA:211,0
8352
+ DA:212,0
8353
+ DA:216,5
8354
+ DA:217,5
8355
+ DA:218,5
8356
+ DA:219,5
8357
+ DA:221,5
8358
+ DA:222,5
8359
+ DA:223,5
8360
+ DA:230,5
8361
+ DA:233,5
8362
+ DA:234,0
8363
+ DA:235,0
8364
+ DA:239,0
8365
+ DA:241,5
8366
+ DA:242,0
8367
+ DA:244,5
8368
+ DA:252,0
8369
+ DA:253,0
8370
+ DA:255,5
8371
+ DA:256,0
8372
+ DA:257,0
8373
+ DA:258,0
8374
+ DA:259,0
8375
+ DA:260,0
8376
+ DA:265,5
8377
+ DA:266,0
8378
+ DA:271,0
8379
+ DA:278,0
8380
+ DA:279,0
8381
+ DA:283,6
8382
+ DA:287,4
8383
+ DA:288,7
8384
+ DA:289,7
8385
+ DA:290,7
8386
+ DA:294,7
8387
+ DA:297,6
8388
+ DA:300,0
8389
+ LF:132
8390
+ LH:79
8391
+ BRDA:26,0,0,0
8392
+ BRDA:28,1,0,4
8393
+ BRDA:28,1,1,3
8394
+ BRDA:49,2,0,0
8395
+ BRDA:49,2,1,7
8396
+ BRDA:57,3,0,0
8397
+ BRDA:57,3,1,5
8398
+ BRDA:64,4,0,0
8399
+ BRDA:64,4,1,7
8400
+ BRDA:75,5,0,7
8401
+ BRDA:75,5,1,5
8402
+ BRDA:111,6,0,0
8403
+ BRDA:111,6,1,5
8404
+ BRDA:117,7,0,0
8405
+ BRDA:117,7,1,5
8406
+ BRDA:120,8,0,0
8407
+ BRDA:120,8,1,5
8408
+ BRDA:126,9,0,0
8409
+ BRDA:126,9,1,5
8410
+ BRDA:142,10,0,0
8411
+ BRDA:142,10,1,0
8412
+ BRDA:143,11,0,0
8413
+ BRDA:143,11,1,0
8414
+ BRDA:143,11,2,0
8415
+ BRDA:143,11,3,0
8416
+ BRDA:160,12,0,0
8417
+ BRDA:160,12,1,0
8418
+ BRDA:164,13,0,0
8419
+ BRDA:164,13,1,0
8420
+ BRDA:173,14,0,0
8421
+ BRDA:173,14,1,0
8422
+ BRDA:182,15,0,0
8423
+ BRDA:182,15,1,0
8424
+ BRDA:183,16,0,0
8425
+ BRDA:183,16,1,0
8426
+ BRDA:195,17,0,0
8427
+ BRDA:195,17,1,0
8428
+ BRDA:210,18,0,0
8429
+ BRDA:210,18,1,5
8430
+ BRDA:221,19,0,5
8431
+ BRDA:221,19,1,0
8432
+ BRDA:233,20,0,0
8433
+ BRDA:233,20,1,5
8434
+ BRDA:233,21,0,5
8435
+ BRDA:233,21,1,0
8436
+ BRDA:241,22,0,0
8437
+ BRDA:241,22,1,5
8438
+ BRDA:241,23,0,5
8439
+ BRDA:241,23,1,0
8440
+ BRDA:255,24,0,0
8441
+ BRDA:255,24,1,5
8442
+ BRDA:257,25,0,0
8443
+ BRDA:257,25,1,0
8444
+ BRDA:265,26,0,0
8445
+ BRDA:265,26,1,5
8446
+ BRDA:265,27,0,5
8447
+ BRDA:265,27,1,5
8448
+ BRF:57
8449
+ BRH:21
8329
8450
  end_of_record
8330
8451
  TN:
8331
8452
  SF:src/threads/index.js
@@ -23,6 +23,7 @@ const integromat = require("./steps/integromat");
23
23
  let filter = require("./steps/filter");
24
24
  let delay = require("./steps/delay");
25
25
  let queryRow = require("./steps/queryRows");
26
+ let loop = require("./steps/loop");
26
27
  const env = require("../environment");
27
28
  const ACTION_IMPLS = {
28
29
  SEND_EMAIL_SMTP: sendSmtpEmail.run,
@@ -36,6 +37,7 @@ const ACTION_IMPLS = {
36
37
  DELAY: delay.run,
37
38
  FILTER: filter.run,
38
39
  QUERY_ROWS: queryRow.run,
40
+ LOOP: loop.run,
39
41
  // these used to be lowercase step IDs, maintain for backwards compat
40
42
  discord: discord.run,
41
43
  slack: slack.run,
@@ -54,6 +56,7 @@ const ACTION_DEFINITIONS = {
54
56
  DELAY: delay.definition,
55
57
  FILTER: filter.definition,
56
58
  QUERY_ROWS: queryRow.definition,
59
+ LOOP: loop.definition,
57
60
  // these used to be lowercase step IDs, maintain for backwards compat
58
61
  discord: discord.definition,
59
62
  slack: slack.definition,
@@ -9,6 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  const { getTable } = require("../api/controllers/table/utils");
12
+ const { findHBSBlocks } = require("@budibase/string-templates");
12
13
  /**
13
14
  * When values are input to the system generally they will be of type string as this is required for template strings.
14
15
  * This can generate some odd scenarios as the Schema of the automation requires a number but the builder might supply
@@ -79,3 +80,12 @@ exports.getError = err => {
79
80
  }
80
81
  return typeof err !== "string" ? err.toString() : err;
81
82
  };
83
+ exports.substituteLoopStep = (hbsString, substitute) => {
84
+ let blocks = findHBSBlocks(hbsString);
85
+ for (let block of blocks) {
86
+ let oldBlock = block;
87
+ block = block.replace(/loop/, substitute);
88
+ hbsString = hbsString.replace(new RegExp(oldBlock, "g"), block);
89
+ }
90
+ return hbsString;
91
+ };
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+ exports.definition = {
3
+ name: "Looping",
4
+ icon: "Reuse",
5
+ tagline: "Loop the block",
6
+ description: "Loop",
7
+ stepId: "LOOP",
8
+ internal: true,
9
+ inputs: {},
10
+ schema: {
11
+ inputs: {
12
+ properties: {
13
+ option: {
14
+ customType: "loopOption",
15
+ title: "Input type",
16
+ },
17
+ binding: {
18
+ type: "string",
19
+ title: "Binding / Value",
20
+ },
21
+ iterations: {
22
+ type: "number",
23
+ title: "Max loop iterations",
24
+ },
25
+ failure: {
26
+ type: "string",
27
+ title: "Failure Condition",
28
+ },
29
+ },
30
+ required: ["type", "value", "iterations", "failure"],
31
+ },
32
+ outputs: {
33
+ properties: {
34
+ items: {
35
+ customType: "item",
36
+ description: "The item currently being executed",
37
+ },
38
+ success: {
39
+ type: "boolean",
40
+ description: "Whether the message loop was successfully",
41
+ },
42
+ iterations: {
43
+ type: "number",
44
+ descriptions: "The amount of times the block ran",
45
+ },
46
+ },
47
+ required: ["success", "items", "iterations"],
48
+ },
49
+ },
50
+ type: "LOGIC",
51
+ };
@@ -169,5 +169,10 @@ exports.BuildSchemaErrors = {
169
169
  exports.WebhookType = {
170
170
  AUTOMATION: "automation",
171
171
  };
172
+ exports.AutomationErrors = {
173
+ INCORRECT_TYPE: "INCORRECT_TYPE",
174
+ MAX_ITERATIONS: "MAX_ITERATIONS_REACHED",
175
+ FAILURE_CONDITION: "FAILURE_CONDITION_MET",
176
+ };
172
177
  // pass through the list from the auth/core lib
173
178
  exports.ObjectStoreBuckets = ObjectStoreBuckets;
@@ -51,6 +51,7 @@ module.exports = {
51
51
  LOG_LEVEL: process.env.LOG_LEVEL,
52
52
  AUTOMATION_DIRECTORY: process.env.AUTOMATION_DIRECTORY,
53
53
  AUTOMATION_BUCKET: process.env.AUTOMATION_BUCKET,
54
+ AUTOMATION_MAX_ITERATIONS: process.env.AUTOMATION_MAX_ITERATIONS,
54
55
  SENDGRID_API_KEY: process.env.SENDGRID_API_KEY,
55
56
  DYNAMO_ENDPOINT: process.env.DYNAMO_ENDPOINT,
56
57
  POSTHOG_TOKEN: process.env.POSTHOG_TOKEN,
package/dist/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@budibase/server",
3
3
  "email": "hi@budibase.com",
4
- "version": "1.0.105-alpha.19",
4
+ "version": "1.0.105-alpha.20",
5
5
  "description": "Budibase Web Server",
6
6
  "main": "src/index.ts",
7
7
  "repository": {
@@ -68,9 +68,9 @@
68
68
  "license": "GPL-3.0",
69
69
  "dependencies": {
70
70
  "@apidevtools/swagger-parser": "^10.0.3",
71
- "@budibase/backend-core": "^1.0.105-alpha.19",
72
- "@budibase/client": "^1.0.105-alpha.19",
73
- "@budibase/string-templates": "^1.0.105-alpha.19",
71
+ "@budibase/backend-core": "^1.0.105-alpha.20",
72
+ "@budibase/client": "^1.0.105-alpha.20",
73
+ "@budibase/string-templates": "^1.0.105-alpha.20",
74
74
  "@bull-board/api": "^3.7.0",
75
75
  "@bull-board/koa": "^3.7.0",
76
76
  "@elastic/elasticsearch": "7.10.0",