@budibase/server 0.9.148 → 0.9.149-alpha.3

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 (173) hide show
  1. package/builder/assets/{index.6216ff9a.js → index.171bc7bc.js} +2 -2
  2. package/builder/assets/{index.bf911dc7.css → index.474ebeb3.css} +1 -1
  3. package/builder/index.html +2 -2
  4. package/coverage/clover.xml +126 -113
  5. package/coverage/coverage-final.json +5 -5
  6. package/coverage/lcov-report/api/controllers/analytics.js.html +24 -9
  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/hosting.js.html +1 -1
  17. package/coverage/lcov-report/api/controllers/index.html +11 -11
  18. package/coverage/lcov-report/api/controllers/integration.js.html +1 -1
  19. package/coverage/lcov-report/api/controllers/layout.js.html +1 -1
  20. package/coverage/lcov-report/api/controllers/metadata.js.html +1 -1
  21. package/coverage/lcov-report/api/controllers/permission.js.html +1 -1
  22. package/coverage/lcov-report/api/controllers/query.js.html +1 -1
  23. package/coverage/lcov-report/api/controllers/role.js.html +1 -1
  24. package/coverage/lcov-report/api/controllers/routing.js.html +1 -1
  25. package/coverage/lcov-report/api/controllers/row/external.js.html +1 -1
  26. package/coverage/lcov-report/api/controllers/row/index.html +14 -14
  27. package/coverage/lcov-report/api/controllers/row/index.js.html +1 -1
  28. package/coverage/lcov-report/api/controllers/row/internal.js.html +66 -18
  29. package/coverage/lcov-report/api/controllers/row/internalSearch.js.html +1 -1
  30. package/coverage/lcov-report/api/controllers/row/utils.js.html +1 -1
  31. package/coverage/lcov-report/api/controllers/screen.js.html +1 -1
  32. package/coverage/lcov-report/api/controllers/script.js.html +1 -1
  33. package/coverage/lcov-report/api/controllers/table/index.html +1 -1
  34. package/coverage/lcov-report/api/controllers/table/index.js.html +1 -1
  35. package/coverage/lcov-report/api/controllers/table/utils.js.html +1 -1
  36. package/coverage/lcov-report/api/controllers/templates.js.html +1 -1
  37. package/coverage/lcov-report/api/controllers/user.js.html +1 -1
  38. package/coverage/lcov-report/api/controllers/view/exporters.js.html +1 -1
  39. package/coverage/lcov-report/api/controllers/view/index.html +1 -1
  40. package/coverage/lcov-report/api/controllers/view/index.js.html +1 -1
  41. package/coverage/lcov-report/api/controllers/view/utils.js.html +1 -1
  42. package/coverage/lcov-report/api/controllers/view/viewBuilder.js.html +1 -1
  43. package/coverage/lcov-report/api/controllers/webhook.js.html +1 -1
  44. package/coverage/lcov-report/api/index.html +1 -1
  45. package/coverage/lcov-report/api/index.js.html +1 -1
  46. package/coverage/lcov-report/api/routes/analytics.js.html +10 -7
  47. package/coverage/lcov-report/api/routes/apikeys.js.html +1 -1
  48. package/coverage/lcov-report/api/routes/application.js.html +1 -1
  49. package/coverage/lcov-report/api/routes/auth.js.html +1 -1
  50. package/coverage/lcov-report/api/routes/automation.js.html +1 -1
  51. package/coverage/lcov-report/api/routes/backup.js.html +1 -1
  52. package/coverage/lcov-report/api/routes/cloud.js.html +1 -1
  53. package/coverage/lcov-report/api/routes/component.js.html +1 -1
  54. package/coverage/lcov-report/api/routes/datasource.js.html +1 -1
  55. package/coverage/lcov-report/api/routes/deploy.js.html +1 -1
  56. package/coverage/lcov-report/api/routes/dev.js.html +1 -1
  57. package/coverage/lcov-report/api/routes/hosting.js.html +1 -1
  58. package/coverage/lcov-report/api/routes/index.html +7 -7
  59. package/coverage/lcov-report/api/routes/index.js.html +1 -1
  60. package/coverage/lcov-report/api/routes/integration.js.html +1 -1
  61. package/coverage/lcov-report/api/routes/layout.js.html +1 -1
  62. package/coverage/lcov-report/api/routes/metadata.js.html +1 -1
  63. package/coverage/lcov-report/api/routes/permission.js.html +1 -1
  64. package/coverage/lcov-report/api/routes/query.js.html +1 -1
  65. package/coverage/lcov-report/api/routes/role.js.html +1 -1
  66. package/coverage/lcov-report/api/routes/routing.js.html +1 -1
  67. package/coverage/lcov-report/api/routes/row.js.html +1 -1
  68. package/coverage/lcov-report/api/routes/screen.js.html +1 -1
  69. package/coverage/lcov-report/api/routes/script.js.html +1 -1
  70. package/coverage/lcov-report/api/routes/static.js.html +1 -1
  71. package/coverage/lcov-report/api/routes/table.js.html +1 -1
  72. package/coverage/lcov-report/api/routes/templates.js.html +1 -1
  73. package/coverage/lcov-report/api/routes/user.js.html +1 -1
  74. package/coverage/lcov-report/api/routes/view.js.html +1 -1
  75. package/coverage/lcov-report/api/routes/webhook.js.html +1 -1
  76. package/coverage/lcov-report/automations/actions.js.html +1 -1
  77. package/coverage/lcov-report/automations/automationUtils.js.html +1 -1
  78. package/coverage/lcov-report/automations/bullboard.js.html +1 -1
  79. package/coverage/lcov-report/automations/index.html +1 -1
  80. package/coverage/lcov-report/automations/index.js.html +1 -1
  81. package/coverage/lcov-report/automations/steps/bash.js.html +1 -1
  82. package/coverage/lcov-report/automations/steps/createRow.js.html +1 -1
  83. package/coverage/lcov-report/automations/steps/delay.js.html +1 -1
  84. package/coverage/lcov-report/automations/steps/deleteRow.js.html +1 -1
  85. package/coverage/lcov-report/automations/steps/discord.js.html +1 -1
  86. package/coverage/lcov-report/automations/steps/executeQuery.js.html +1 -1
  87. package/coverage/lcov-report/automations/steps/executeScript.js.html +1 -1
  88. package/coverage/lcov-report/automations/steps/filter.js.html +1 -1
  89. package/coverage/lcov-report/automations/steps/index.html +1 -1
  90. package/coverage/lcov-report/automations/steps/integromat.js.html +1 -1
  91. package/coverage/lcov-report/automations/steps/outgoingWebhook.js.html +1 -1
  92. package/coverage/lcov-report/automations/steps/queryRows.js.html +1 -1
  93. package/coverage/lcov-report/automations/steps/sendSmtpEmail.js.html +1 -1
  94. package/coverage/lcov-report/automations/steps/serverLog.js.html +1 -1
  95. package/coverage/lcov-report/automations/steps/slack.js.html +1 -1
  96. package/coverage/lcov-report/automations/steps/updateRow.js.html +1 -1
  97. package/coverage/lcov-report/automations/steps/utils.js.html +1 -1
  98. package/coverage/lcov-report/automations/steps/zapier.js.html +1 -1
  99. package/coverage/lcov-report/automations/thread.js.html +1 -1
  100. package/coverage/lcov-report/automations/triggerInfo/app.js.html +1 -1
  101. package/coverage/lcov-report/automations/triggerInfo/cron.js.html +1 -1
  102. package/coverage/lcov-report/automations/triggerInfo/index.html +1 -1
  103. package/coverage/lcov-report/automations/triggerInfo/index.js.html +1 -1
  104. package/coverage/lcov-report/automations/triggerInfo/rowDeleted.js.html +1 -1
  105. package/coverage/lcov-report/automations/triggerInfo/rowSaved.js.html +1 -1
  106. package/coverage/lcov-report/automations/triggerInfo/rowUpdated.js.html +1 -1
  107. package/coverage/lcov-report/automations/triggerInfo/webhook.js.html +1 -1
  108. package/coverage/lcov-report/automations/triggers.js.html +1 -1
  109. package/coverage/lcov-report/automations/utils.js.html +1 -1
  110. package/coverage/lcov-report/constants/index.html +1 -1
  111. package/coverage/lcov-report/constants/index.js.html +1 -1
  112. package/coverage/lcov-report/constants/layouts.js.html +1 -1
  113. package/coverage/lcov-report/constants/screens.js.html +1 -1
  114. package/coverage/lcov-report/db/client.js.html +1 -1
  115. package/coverage/lcov-report/db/inMemoryView.js.html +1 -1
  116. package/coverage/lcov-report/db/index.html +1 -1
  117. package/coverage/lcov-report/db/index.js.html +1 -1
  118. package/coverage/lcov-report/db/linkedRows/LinkController.js.html +1 -1
  119. package/coverage/lcov-report/db/linkedRows/index.html +1 -1
  120. package/coverage/lcov-report/db/linkedRows/index.js.html +1 -1
  121. package/coverage/lcov-report/db/linkedRows/linkUtils.js.html +1 -1
  122. package/coverage/lcov-report/db/newid.js.html +1 -1
  123. package/coverage/lcov-report/db/utils.js.html +1 -1
  124. package/coverage/lcov-report/events/AutomationEmitter.js.html +1 -1
  125. package/coverage/lcov-report/events/index.html +1 -1
  126. package/coverage/lcov-report/events/index.js.html +1 -1
  127. package/coverage/lcov-report/events/utils.js.html +1 -1
  128. package/coverage/lcov-report/index.html +38 -38
  129. package/coverage/lcov-report/integrations/tests/TestConfiguration.js.html +1 -1
  130. package/coverage/lcov-report/integrations/tests/index.html +1 -1
  131. package/coverage/lcov-report/middleware/appInfo.js.html +1 -1
  132. package/coverage/lcov-report/middleware/authorized.js.html +1 -1
  133. package/coverage/lcov-report/middleware/builder.js.html +1 -1
  134. package/coverage/lcov-report/middleware/currentapp.js.html +1 -1
  135. package/coverage/lcov-report/middleware/index.html +1 -1
  136. package/coverage/lcov-report/middleware/joi-validator.js.html +1 -1
  137. package/coverage/lcov-report/middleware/resourceId.js.html +1 -1
  138. package/coverage/lcov-report/middleware/selfhost.js.html +1 -1
  139. package/coverage/lcov-report/middleware/usageQuota.js.html +1 -1
  140. package/coverage/lcov-report/utilities/bcrypt.js.html +1 -1
  141. package/coverage/lcov-report/utilities/budibaseDir.js.html +1 -1
  142. package/coverage/lcov-report/utilities/centralPath.js.html +1 -1
  143. package/coverage/lcov-report/utilities/csvParser.js.html +1 -1
  144. package/coverage/lcov-report/utilities/global.js.html +1 -1
  145. package/coverage/lcov-report/utilities/index.html +11 -11
  146. package/coverage/lcov-report/utilities/index.js.html +1 -1
  147. package/coverage/lcov-report/utilities/queue/inMemoryQueue.js.html +1 -1
  148. package/coverage/lcov-report/utilities/queue/index.html +1 -1
  149. package/coverage/lcov-report/utilities/routing/index.html +1 -1
  150. package/coverage/lcov-report/utilities/routing/index.js.html +1 -1
  151. package/coverage/lcov-report/utilities/rowProcessor/index.html +15 -15
  152. package/coverage/lcov-report/utilities/rowProcessor/index.js.html +28 -10
  153. package/coverage/lcov-report/utilities/rowProcessor/utils.js.html +1 -1
  154. package/coverage/lcov-report/utilities/security.js.html +1 -1
  155. package/coverage/lcov-report/utilities/statusCodes.js.html +1 -1
  156. package/coverage/lcov-report/utilities/users.js.html +1 -1
  157. package/coverage/lcov-report/utilities/workerRequests.js.html +10 -7
  158. package/coverage/lcov.info +194 -175
  159. package/dist/api/controllers/analytics.js +10 -8
  160. package/dist/api/controllers/deploy/index.js +17 -0
  161. package/dist/api/controllers/row/internal.js +19 -4
  162. package/dist/api/routes/analytics.js +3 -2
  163. package/dist/package.json +4 -4
  164. package/dist/tsconfig.tsbuildinfo +1 -1
  165. package/dist/utilities/rowProcessor/index.js +6 -2
  166. package/dist/utilities/workerRequests.js +2 -1
  167. package/package.json +5 -5
  168. package/src/api/controllers/analytics.js +8 -3
  169. package/src/api/controllers/deploy/index.js +18 -0
  170. package/src/api/controllers/row/internal.js +26 -10
  171. package/src/api/routes/analytics.js +3 -2
  172. package/src/utilities/rowProcessor/index.js +8 -2
  173. package/src/utilities/workerRequests.js +2 -1
@@ -133,7 +133,7 @@ exports.processFormulas = (table, rows) => {
133
133
  <div class='footer quiet pad2 space-top1 center small'>
134
134
  Code coverage generated by
135
135
  <a href="https://istanbul.js.org/" target="_blank">istanbul</a>
136
- at Fri Oct 01 2021 09:10:31 GMT+0000 (Coordinated Universal Time)
136
+ at Fri Oct 01 2021 15:22:17 GMT+0000 (Coordinated Universal Time)
137
137
  </div>
138
138
  </div>
139
139
  <script src="../../prettify.js"></script>
@@ -265,7 +265,7 @@ exports.CURRENTLY_SUPPORTED_LEVELS = CURRENTLY_SUPPORTED_LEVELS
265
265
  <div class='footer quiet pad2 space-top1 center small'>
266
266
  Code coverage generated by
267
267
  <a href="https://istanbul.js.org/" target="_blank">istanbul</a>
268
- at Fri Oct 01 2021 09:10:31 GMT+0000 (Coordinated Universal Time)
268
+ at Fri Oct 01 2021 15:22:17 GMT+0000 (Coordinated Universal Time)
269
269
  </div>
270
270
  </div>
271
271
  <script src="../prettify.js"></script>
@@ -85,7 +85,7 @@
85
85
  <div class='footer quiet pad2 space-top1 center small'>
86
86
  Code coverage generated by
87
87
  <a href="https://istanbul.js.org/" target="_blank">istanbul</a>
88
- at Fri Oct 01 2021 09:10:31 GMT+0000 (Coordinated Universal Time)
88
+ at Fri Oct 01 2021 15:22:17 GMT+0000 (Coordinated Universal Time)
89
89
  </div>
90
90
  </div>
91
91
  <script src="../prettify.js"></script>
@@ -136,7 +136,7 @@ exports.getFullUser = async (ctx, userId) =&gt; {
136
136
  <div class='footer quiet pad2 space-top1 center small'>
137
137
  Code coverage generated by
138
138
  <a href="https://istanbul.js.org/" target="_blank">istanbul</a>
139
- at Fri Oct 01 2021 09:10:31 GMT+0000 (Coordinated Universal Time)
139
+ at Fri Oct 01 2021 15:22:17 GMT+0000 (Coordinated Universal Time)
140
140
  </div>
141
141
  </div>
142
142
  <script src="../prettify.js"></script>
@@ -23,9 +23,9 @@
23
23
  <div class='clearfix'>
24
24
 
25
25
  <div class='fl pad1y space-right2'>
26
- <span class="strong">52.31% </span>
26
+ <span class="strong">51.52% </span>
27
27
  <span class="quiet">Statements</span>
28
- <span class='fraction'>34/65</span>
28
+ <span class='fraction'>34/66</span>
29
29
  </div>
30
30
 
31
31
 
@@ -44,9 +44,9 @@
44
44
 
45
45
 
46
46
  <div class='fl pad1y space-right2'>
47
- <span class="strong">52.31% </span>
47
+ <span class="strong">51.52% </span>
48
48
  <span class="quiet">Lines</span>
49
- <span class='fraction'>34/65</span>
49
+ <span class='fraction'>34/66</span>
50
50
  </div>
51
51
 
52
52
 
@@ -201,7 +201,8 @@
201
201
  <a name='L142'></a><a href='#L142'>142</a>
202
202
  <a name='L143'></a><a href='#L143'>143</a>
203
203
  <a name='L144'></a><a href='#L144'>144</a>
204
- <a name='L145'></a><a href='#L145'>145</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">34x</span>
204
+ <a name='L145'></a><a href='#L145'>145</a>
205
+ <a name='L146'></a><a href='#L146'>146</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">34x</span>
205
206
  <span class="cline-any cline-yes">34x</span>
206
207
  <span class="cline-any cline-yes">34x</span>
207
208
  <span class="cline-any cline-yes">34x</span>
@@ -256,6 +257,7 @@
256
257
  <span class="cline-any cline-neutral">&nbsp;</span>
257
258
  <span class="cline-any cline-no">&nbsp;</span>
258
259
  <span class="cline-any cline-no">&nbsp;</span>
260
+ <span class="cline-any cline-no">&nbsp;</span>
259
261
  <span class="cline-any cline-neutral">&nbsp;</span>
260
262
  <span class="cline-any cline-no">&nbsp;</span>
261
263
  <span class="cline-any cline-neutral">&nbsp;</span>
@@ -399,7 +401,8 @@ exports.sendSmtpEmail = <span class="fstat-no" title="function not covered" >as<
399
401
  )
400
402
  &nbsp;
401
403
  <span class="cstat-no" title="statement not covered" > if (response.status !== 200) {</span>
402
- <span class="cstat-no" title="statement not covered" > throw "Unable to send email."</span>
404
+ const error = <span class="cstat-no" title="statement not covered" >await response.text()</span>
405
+ <span class="cstat-no" title="statement not covered" > throw `Unable to send email - ${error}`</span>
403
406
  }
404
407
  <span class="cstat-no" title="statement not covered" > return response.json()</span>
405
408
  }
@@ -496,7 +499,7 @@ exports.removeAppFromUserRoles = async (ctx, appId) =&gt; {
496
499
  <div class='footer quiet pad2 space-top1 center small'>
497
500
  Code coverage generated by
498
501
  <a href="https://istanbul.js.org/" target="_blank">istanbul</a>
499
- at Fri Oct 01 2021 09:10:31 GMT+0000 (Coordinated Universal Time)
502
+ at Fri Oct 01 2021 15:22:17 GMT+0000 (Coordinated Universal Time)
500
503
  </div>
501
504
  </div>
502
505
  <script src="../prettify.js"></script>
@@ -67,9 +67,11 @@ DA:10,23
67
67
  DA:11,1
68
68
  DA:16,23
69
69
  DA:17,0
70
- DA:19,0
70
+ DA:18,0
71
+ DA:21,0
71
72
  DA:24,0
72
- LF:10
73
+ DA:29,0
74
+ LF:12
73
75
  LH:6
74
76
  BRDA:6,0,0,0
75
77
  BRDA:6,0,1,23
@@ -80,8 +82,8 @@ BRDA:12,2,0,1
80
82
  BRDA:12,2,1,0
81
83
  BRDA:17,3,0,0
82
84
  BRDA:17,3,1,0
83
- BRDA:20,4,0,0
84
- BRDA:20,4,1,0
85
+ BRDA:25,4,0,0
86
+ BRDA:25,4,1,0
85
87
  BRF:11
86
88
  BRH:4
87
89
  end_of_record
@@ -2114,11 +2116,11 @@ FN:342,(anonymous_16)
2114
2116
  FN:348,(anonymous_17)
2115
2117
  FN:381,(anonymous_18)
2116
2118
  FN:389,(anonymous_19)
2117
- FN:408,(anonymous_20)
2118
- FN:414,(anonymous_21)
2119
- FN:422,(anonymous_22)
2120
- FN:423,(anonymous_23)
2121
- FN:425,(anonymous_24)
2119
+ FN:409,(anonymous_20)
2120
+ FN:411,(anonymous_21)
2121
+ FN:438,(anonymous_22)
2122
+ FN:439,(anonymous_23)
2123
+ FN:441,(anonymous_24)
2122
2124
  FNF:25
2123
2125
  FNH:23
2124
2126
  FNDA:70,storeResponse
@@ -2333,20 +2335,30 @@ DA:393,1
2333
2335
  DA:395,1
2334
2336
  DA:400,1
2335
2337
  DA:406,1
2336
- DA:408,1
2338
+ DA:409,1
2337
2339
  DA:411,1
2340
+ DA:413,1
2338
2341
  DA:414,1
2342
+ DA:415,1
2343
+ DA:416,1
2339
2344
  DA:417,1
2340
- DA:418,3
2341
- DA:419,3
2342
- DA:421,1
2343
- DA:422,1
2344
- DA:423,1
2345
+ DA:418,1
2346
+ DA:419,1
2347
+ DA:421,0
2348
+ DA:424,1
2345
2349
  DA:425,1
2346
- DA:426,1
2347
- DA:430,1
2348
- LF:199
2349
- LH:164
2350
+ DA:427,1
2351
+ DA:433,1
2352
+ DA:434,3
2353
+ DA:435,3
2354
+ DA:437,1
2355
+ DA:438,1
2356
+ DA:439,1
2357
+ DA:441,1
2358
+ DA:442,1
2359
+ DA:446,1
2360
+ LF:209
2361
+ LH:173
2350
2362
  BRDA:40,0,0,0
2351
2363
  BRDA:40,0,1,70
2352
2364
  BRDA:44,1,0,0
@@ -2407,10 +2419,12 @@ BRDA:369,28,0,1
2407
2419
  BRDA:369,28,1,1
2408
2420
  BRDA:371,29,0,0
2409
2421
  BRDA:371,29,1,1
2410
- BRDA:419,30,0,1
2411
- BRDA:419,30,1,2
2412
- BRF:62
2413
- BRH:38
2422
+ BRDA:417,30,0,1
2423
+ BRDA:417,30,1,0
2424
+ BRDA:435,31,0,1
2425
+ BRDA:435,31,1,2
2426
+ BRF:64
2427
+ BRH:39
2414
2428
  end_of_record
2415
2429
  TN:
2416
2430
  SF:src/api/controllers/row/internalSearch.js
@@ -3473,10 +3487,9 @@ DA:1,23
3473
3487
  DA:2,23
3474
3488
  DA:4,23
3475
3489
  DA:6,23
3476
- DA:7,23
3477
- DA:9,23
3478
- LF:6
3479
- LH:6
3490
+ DA:10,23
3491
+ LF:5
3492
+ LH:5
3480
3493
  BRF:0
3481
3494
  BRH:0
3482
3495
  end_of_record
@@ -7067,10 +7080,10 @@ TN:
7067
7080
  SF:src/utilities/workerRequests.js
7068
7081
  FN:9,request
7069
7082
  FN:37,(anonymous_1)
7070
- FN:60,(anonymous_2)
7071
- FN:83,(anonymous_3)
7072
- FN:100,(anonymous_4)
7073
- FN:132,(anonymous_5)
7083
+ FN:61,(anonymous_2)
7084
+ FN:84,(anonymous_3)
7085
+ FN:101,(anonymous_4)
7086
+ FN:133,(anonymous_5)
7074
7087
  FNF:6
7075
7088
  FNH:3
7076
7089
  FNDA:182,request
@@ -7104,47 +7117,48 @@ DA:37,34
7104
7117
  DA:39,0
7105
7118
  DA:54,0
7106
7119
  DA:55,0
7107
- DA:57,0
7108
- DA:60,34
7109
- DA:61,171
7120
+ DA:56,0
7121
+ DA:58,0
7122
+ DA:61,34
7110
7123
  DA:62,171
7111
- DA:68,171
7124
+ DA:63,171
7112
7125
  DA:69,171
7113
7126
  DA:70,171
7114
7127
  DA:71,171
7115
7128
  DA:72,171
7116
7129
  DA:73,171
7117
- DA:76,171
7118
- DA:79,0
7119
- DA:83,34
7120
- DA:84,0
7130
+ DA:74,171
7131
+ DA:77,171
7132
+ DA:80,0
7133
+ DA:84,34
7121
7134
  DA:85,0
7122
- DA:90,0
7135
+ DA:86,0
7123
7136
  DA:91,0
7124
- DA:93,0
7137
+ DA:92,0
7125
7138
  DA:94,0
7126
7139
  DA:95,0
7127
- DA:97,0
7128
- DA:100,34
7129
- DA:103,0
7140
+ DA:96,0
7141
+ DA:98,0
7142
+ DA:101,34
7130
7143
  DA:104,0
7131
7144
  DA:105,0
7132
7145
  DA:106,0
7133
- DA:108,0
7146
+ DA:107,0
7134
7147
  DA:109,0
7135
7148
  DA:110,0
7136
- DA:112,0
7137
- DA:119,0
7138
- DA:126,0
7149
+ DA:111,0
7150
+ DA:113,0
7151
+ DA:120,0
7139
7152
  DA:127,0
7140
- DA:129,0
7141
- DA:132,34
7142
- DA:133,11
7153
+ DA:128,0
7154
+ DA:130,0
7155
+ DA:133,34
7143
7156
  DA:134,11
7144
- DA:140,11
7145
- DA:141,0
7146
- DA:143,11
7147
- LF:65
7157
+ DA:135,11
7158
+ DA:141,11
7159
+ DA:142,0
7160
+ DA:144,11
7161
+ LF:66
7148
7162
  LH:34
7149
7163
  BRDA:10,0,0,182
7150
7164
  BRDA:10,0,1,0
@@ -7164,20 +7178,20 @@ BRDA:28,7,0,182
7164
7178
  BRDA:28,7,1,182
7165
7179
  BRDA:54,8,0,0
7166
7180
  BRDA:54,8,1,0
7167
- BRDA:71,9,0,171
7168
- BRDA:71,9,1,0
7169
- BRDA:83,10,0,0
7170
- BRDA:90,11,0,0
7171
- BRDA:90,11,1,0
7172
- BRDA:94,12,0,0
7173
- BRDA:94,12,1,0
7174
- BRDA:100,13,0,0
7175
- BRDA:104,14,0,0
7176
- BRDA:104,14,1,0
7177
- BRDA:126,15,0,0
7178
- BRDA:126,15,1,0
7179
- BRDA:140,16,0,0
7180
- BRDA:140,16,1,11
7181
+ BRDA:72,9,0,171
7182
+ BRDA:72,9,1,0
7183
+ BRDA:84,10,0,0
7184
+ BRDA:91,11,0,0
7185
+ BRDA:91,11,1,0
7186
+ BRDA:95,12,0,0
7187
+ BRDA:95,12,1,0
7188
+ BRDA:101,13,0,0
7189
+ BRDA:105,14,0,0
7190
+ BRDA:105,14,1,0
7191
+ BRDA:127,15,0,0
7192
+ BRDA:127,15,1,0
7193
+ BRDA:141,16,0,0
7194
+ BRDA:141,16,1,11
7181
7195
  BRF:32
7182
7196
  BRH:10
7183
7197
  end_of_record
@@ -7258,10 +7272,10 @@ FN:56,(anonymous_2)
7258
7272
  FN:62,(anonymous_3)
7259
7273
  FN:82,(anonymous_4)
7260
7274
  FN:96,processAutoColumn
7261
- FN:146,(anonymous_6)
7262
- FN:166,(anonymous_7)
7263
- FN:207,(anonymous_8)
7264
- FN:232,(anonymous_9)
7275
+ FN:152,(anonymous_6)
7276
+ FN:172,(anonymous_7)
7277
+ FN:213,(anonymous_8)
7278
+ FN:238,(anonymous_9)
7265
7279
  FNF:10
7266
7280
  FNH:9
7267
7281
  FNDA:11,(anonymous_0)
@@ -7292,68 +7306,69 @@ DA:64,1
7292
7306
  DA:66,1
7293
7307
  DA:82,0
7294
7308
  DA:102,73
7295
- DA:104,73
7309
+ DA:103,73
7296
7310
  DA:105,73
7297
- DA:106,206
7311
+ DA:106,73
7298
7312
  DA:107,206
7299
- DA:109,0
7300
- DA:111,0
7313
+ DA:108,206
7314
+ DA:110,0
7301
7315
  DA:112,0
7302
- DA:114,0
7303
- DA:116,0
7304
- DA:117,0
7305
- DA:119,0
7306
- DA:121,0
7316
+ DA:118,0
7317
+ DA:120,0
7307
7318
  DA:122,0
7308
- DA:124,0
7309
- DA:126,0
7319
+ DA:123,0
7320
+ DA:125,0
7310
7321
  DA:127,0
7311
- DA:129,0
7322
+ DA:128,0
7312
7323
  DA:130,0
7313
- DA:131,0
7324
+ DA:132,0
7314
7325
  DA:133,0
7315
- DA:136,73
7316
- DA:138,34
7317
- DA:146,34
7318
- DA:148,174
7319
- DA:149,16
7320
- DA:150,158
7321
- DA:151,22
7322
- DA:154,136
7323
- DA:166,34
7324
- DA:172,73
7325
- DA:174,73
7326
- DA:175,73
7327
- DA:176,73
7328
- DA:177,332
7329
- DA:179,332
7330
- DA:180,159
7331
- DA:181,3
7332
- DA:183,159
7333
- DA:187,173
7334
- DA:188,0
7335
- DA:190,173
7336
- DA:194,73
7337
- DA:207,34
7338
- DA:213,100
7339
- DA:214,100
7340
- DA:215,100
7341
- DA:216,87
7342
- DA:217,87
7326
+ DA:135,0
7327
+ DA:136,0
7328
+ DA:137,0
7329
+ DA:139,0
7330
+ DA:142,73
7331
+ DA:144,34
7332
+ DA:152,34
7333
+ DA:154,174
7334
+ DA:155,16
7335
+ DA:156,158
7336
+ DA:157,22
7337
+ DA:160,136
7338
+ DA:172,34
7339
+ DA:178,73
7340
+ DA:180,73
7341
+ DA:181,73
7342
+ DA:182,73
7343
+ DA:183,332
7344
+ DA:185,332
7345
+ DA:186,159
7346
+ DA:187,3
7347
+ DA:189,159
7348
+ DA:193,173
7349
+ DA:194,0
7350
+ DA:196,173
7351
+ DA:200,73
7352
+ DA:213,34
7353
+ DA:219,100
7343
7354
  DA:220,100
7344
- DA:223,100
7355
+ DA:221,100
7356
+ DA:222,87
7357
+ DA:223,87
7345
7358
  DA:226,100
7346
- DA:227,296
7347
- DA:228,8
7348
- DA:229,8
7349
- DA:230,6
7350
- DA:232,2
7351
- DA:233,2
7352
- DA:238,100
7353
- DA:239,26
7354
- DA:245,100
7355
- LF:78
7356
- LH:59
7359
+ DA:229,100
7360
+ DA:232,100
7361
+ DA:233,296
7362
+ DA:234,8
7363
+ DA:235,8
7364
+ DA:236,6
7365
+ DA:238,2
7366
+ DA:239,2
7367
+ DA:244,100
7368
+ DA:245,26
7369
+ DA:251,100
7370
+ LF:79
7371
+ LH:60
7357
7372
  BRDA:18,0,0,2
7358
7373
  BRDA:18,0,1,9
7359
7374
  BRDA:18,1,0,11
@@ -7367,55 +7382,59 @@ BRDA:21,4,1,9
7367
7382
  BRDA:63,5,0,1
7368
7383
  BRDA:63,5,1,1
7369
7384
  BRDA:100,6,0,0
7370
- BRDA:106,7,0,206
7371
- BRDA:106,7,1,0
7372
- BRDA:109,8,0,0
7373
- BRDA:109,8,1,0
7374
- BRDA:109,8,2,0
7375
- BRDA:109,8,3,0
7376
- BRDA:109,8,4,0
7377
- BRDA:111,9,0,0
7378
- BRDA:111,9,1,0
7379
- BRDA:111,10,0,0
7380
- BRDA:111,10,1,0
7381
- BRDA:111,10,2,0
7382
- BRDA:116,11,0,0
7383
- BRDA:116,11,1,0
7384
- BRDA:121,12,0,0
7385
- BRDA:121,12,1,0
7386
- BRDA:121,13,0,0
7387
- BRDA:121,13,1,0
7388
- BRDA:129,14,0,0
7389
- BRDA:129,14,1,0
7390
- BRDA:130,15,0,0
7391
- BRDA:130,15,1,0
7392
- BRDA:148,16,0,16
7393
- BRDA:148,16,1,158
7394
- BRDA:150,17,0,22
7395
- BRDA:150,17,1,136
7396
- BRDA:167,18,0,0
7397
- BRDA:170,19,0,72
7398
- BRDA:179,20,0,159
7399
- BRDA:179,20,1,173
7400
- BRDA:180,21,0,3
7401
- BRDA:180,21,1,156
7402
- BRDA:187,22,0,0
7403
- BRDA:187,22,1,173
7404
- BRDA:211,23,0,26
7405
- BRDA:215,24,0,87
7406
- BRDA:215,24,1,13
7407
- BRDA:227,25,0,8
7408
- BRDA:227,25,1,288
7409
- BRDA:229,26,0,6
7410
- BRDA:229,26,1,2
7411
- BRDA:229,27,0,8
7412
- BRDA:229,27,1,6
7413
- BRDA:238,28,0,26
7414
- BRDA:238,28,1,74
7415
- BRDA:245,29,0,13
7416
- BRDA:245,29,1,87
7417
- BRF:60
7418
- BRH:34
7385
+ BRDA:102,7,0,73
7386
+ BRDA:102,7,1,73
7387
+ BRDA:107,8,0,206
7388
+ BRDA:107,8,1,0
7389
+ BRDA:110,9,0,0
7390
+ BRDA:110,9,1,0
7391
+ BRDA:110,9,2,0
7392
+ BRDA:110,9,3,0
7393
+ BRDA:110,9,4,0
7394
+ BRDA:112,10,0,0
7395
+ BRDA:112,10,1,0
7396
+ BRDA:113,11,0,0
7397
+ BRDA:113,11,1,0
7398
+ BRDA:113,11,2,0
7399
+ BRDA:113,11,3,0
7400
+ BRDA:122,12,0,0
7401
+ BRDA:122,12,1,0
7402
+ BRDA:127,13,0,0
7403
+ BRDA:127,13,1,0
7404
+ BRDA:127,14,0,0
7405
+ BRDA:127,14,1,0
7406
+ BRDA:127,14,2,0
7407
+ BRDA:135,15,0,0
7408
+ BRDA:135,15,1,0
7409
+ BRDA:136,16,0,0
7410
+ BRDA:136,16,1,0
7411
+ BRDA:154,17,0,16
7412
+ BRDA:154,17,1,158
7413
+ BRDA:156,18,0,22
7414
+ BRDA:156,18,1,136
7415
+ BRDA:173,19,0,0
7416
+ BRDA:176,20,0,72
7417
+ BRDA:185,21,0,159
7418
+ BRDA:185,21,1,173
7419
+ BRDA:186,22,0,3
7420
+ BRDA:186,22,1,156
7421
+ BRDA:193,23,0,0
7422
+ BRDA:193,23,1,173
7423
+ BRDA:217,24,0,26
7424
+ BRDA:221,25,0,87
7425
+ BRDA:221,25,1,13
7426
+ BRDA:233,26,0,8
7427
+ BRDA:233,26,1,288
7428
+ BRDA:235,27,0,6
7429
+ BRDA:235,27,1,2
7430
+ BRDA:235,28,0,8
7431
+ BRDA:235,28,1,6
7432
+ BRDA:244,29,0,26
7433
+ BRDA:244,29,1,74
7434
+ BRDA:251,30,0,13
7435
+ BRDA:251,30,1,87
7436
+ BRF:64
7437
+ BRH:36
7419
7438
  end_of_record
7420
7439
  TN:
7421
7440
  SF:src/utilities/rowProcessor/utils.js
@@ -14,16 +14,18 @@ let posthogClient;
14
14
  if (env.POSTHOG_TOKEN && env.ENABLE_ANALYTICS && !env.SELF_HOSTED) {
15
15
  posthogClient = new PostHog(env.POSTHOG_TOKEN);
16
16
  }
17
- exports.isEnabled = function (ctx) {
18
- return __awaiter(this, void 0, void 0, function* () {
17
+ exports.isEnabled = (ctx) => __awaiter(void 0, void 0, void 0, function* () {
18
+ ctx.body = {
19
+ enabled: !env.SELF_HOSTED && env.ENABLE_ANALYTICS === "true",
20
+ };
21
+ });
22
+ exports.endUserPing = (ctx) => __awaiter(void 0, void 0, void 0, function* () {
23
+ if (!posthogClient) {
19
24
  ctx.body = {
20
- enabled: !env.SELF_HOSTED && env.ENABLE_ANALYTICS === "true",
25
+ ping: false,
21
26
  };
22
- });
23
- };
24
- exports.endUserPing = (ctx, next) => __awaiter(void 0, void 0, void 0, function* () {
25
- if (!posthogClient)
26
- return next();
27
+ return;
28
+ }
27
29
  posthogClient.capture("budibase:end_user_ping", {
28
30
  userId: ctx.user && ctx.user._id,
29
31
  appId: ctx.appId,
@@ -62,15 +62,21 @@ function storeDeploymentHistory(deployment) {
62
62
  function initDeployedApp(prodAppId) {
63
63
  return __awaiter(this, void 0, void 0, function* () {
64
64
  const db = new CouchDB(prodAppId);
65
+ console.log("Reading automation docs");
65
66
  const automations = (yield db.allDocs(getAutomationParams(null, {
66
67
  include_docs: true,
67
68
  }))).rows.map(row => row.doc);
69
+ console.log("You have " + automations.length + " automations");
68
70
  const promises = [];
71
+ console.log("Disabling prod crons..");
69
72
  yield disableAllCrons(prodAppId);
73
+ console.log("Prod Cron triggers disabled..");
74
+ console.log("Enabling cron triggers for deployed app..");
70
75
  for (let automation of automations) {
71
76
  promises.push(enableCronTrigger(prodAppId, automation));
72
77
  }
73
78
  yield Promise.all(promises);
79
+ console.log("Enabled cron triggers for deployed app..");
74
80
  });
75
81
  }
76
82
  function deployApp(deployment) {
@@ -81,12 +87,16 @@ function deployApp(deployment) {
81
87
  source: deployment.appId,
82
88
  target: productionAppId,
83
89
  });
90
+ console.log("Replication object created");
84
91
  yield replication.replicate();
92
+ console.log("replication complete.. replacing app meta doc");
85
93
  const db = new CouchDB(productionAppId);
86
94
  const appDoc = yield db.get(DocumentTypes.APP_METADATA);
87
95
  appDoc.appId = productionAppId;
88
96
  appDoc.instance._id = productionAppId;
89
97
  yield db.put(appDoc);
98
+ console.log("New app doc written successfully.");
99
+ console.log("Setting up live repl between dev and prod");
90
100
  // Set up live sync between the live and dev instances
91
101
  const liveReplication = new Replication({
92
102
  source: productionAppId,
@@ -97,7 +107,10 @@ function deployApp(deployment) {
97
107
  return doc._id !== DocumentTypes.APP_METADATA;
98
108
  },
99
109
  });
110
+ console.log("Set up live repl between dev and prod");
111
+ console.log("Initialising deployed app");
100
112
  yield initDeployedApp(productionAppId);
113
+ console.log("Init complete, setting deployment to successful");
101
114
  deployment.setStatus(DeploymentStatus.SUCCESS);
102
115
  yield storeDeploymentHistory(deployment);
103
116
  }
@@ -141,8 +154,12 @@ exports.deploymentProgress = function (ctx) {
141
154
  exports.deployApp = function (ctx) {
142
155
  return __awaiter(this, void 0, void 0, function* () {
143
156
  let deployment = new Deployment(ctx.appId);
157
+ console.log("Deployment object created");
144
158
  deployment.setStatus(DeploymentStatus.PENDING);
159
+ console.log("Deployment object set to pending");
145
160
  deployment = yield storeDeploymentHistory(deployment);
161
+ console.log("Stored deployment history");
162
+ console.log("Deploying app...");
146
163
  yield deployApp(deployment);
147
164
  ctx.body = deployment;
148
165
  });