@budibase/server 1.3.15-alpha.1 → 1.3.15-alpha.4

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 (171) hide show
  1. package/builder/assets/{index.ed9ae6a1.js → index.b7375c37.js} +207 -207
  2. package/builder/index.html +1 -1
  3. package/coverage/clover.xml +125 -118
  4. package/coverage/coverage-final.json +2 -2
  5. package/coverage/lcov-report/api/controllers/apikeys.js.html +1 -1
  6. package/coverage/lcov-report/api/controllers/auth.js.html +1 -1
  7. package/coverage/lcov-report/api/controllers/automation.js.html +1 -1
  8. package/coverage/lcov-report/api/controllers/backup.js.html +1 -1
  9. package/coverage/lcov-report/api/controllers/cloud.js.html +1 -1
  10. package/coverage/lcov-report/api/controllers/component.js.html +1 -1
  11. package/coverage/lcov-report/api/controllers/datasource.js.html +54 -15
  12. package/coverage/lcov-report/api/controllers/dev.js.html +1 -1
  13. package/coverage/lcov-report/api/controllers/index.html +19 -19
  14. package/coverage/lcov-report/api/controllers/integration.js.html +1 -1
  15. package/coverage/lcov-report/api/controllers/layout.js.html +1 -1
  16. package/coverage/lcov-report/api/controllers/metadata.js.html +1 -1
  17. package/coverage/lcov-report/api/controllers/migrations.js.html +1 -1
  18. package/coverage/lcov-report/api/controllers/permission.js.html +1 -1
  19. package/coverage/lcov-report/api/controllers/query/index.html +1 -1
  20. package/coverage/lcov-report/api/controllers/query/validation.js.html +1 -1
  21. package/coverage/lcov-report/api/controllers/role.js.html +1 -1
  22. package/coverage/lcov-report/api/controllers/routing.js.html +1 -1
  23. package/coverage/lcov-report/api/controllers/row/external.js.html +1 -1
  24. package/coverage/lcov-report/api/controllers/row/index.html +1 -1
  25. package/coverage/lcov-report/api/controllers/row/internal.js.html +1 -1
  26. package/coverage/lcov-report/api/controllers/row/internalSearch.js.html +1 -1
  27. package/coverage/lcov-report/api/controllers/row/staticFormula.js.html +1 -1
  28. package/coverage/lcov-report/api/controllers/row/utils.js.html +1 -1
  29. package/coverage/lcov-report/api/controllers/screen.js.html +5 -2
  30. package/coverage/lcov-report/api/controllers/script.js.html +1 -1
  31. package/coverage/lcov-report/api/controllers/table/bulkFormula.js.html +1 -1
  32. package/coverage/lcov-report/api/controllers/table/external.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/templates.js.html +1 -1
  36. package/coverage/lcov-report/api/controllers/user.js.html +1 -1
  37. package/coverage/lcov-report/api/controllers/view/exporters.js.html +1 -1
  38. package/coverage/lcov-report/api/controllers/view/index.html +1 -1
  39. package/coverage/lcov-report/api/controllers/view/index.js.html +1 -1
  40. package/coverage/lcov-report/api/controllers/view/utils.js.html +1 -1
  41. package/coverage/lcov-report/api/controllers/view/viewBuilder.js.html +1 -1
  42. package/coverage/lcov-report/api/controllers/webhook.js.html +1 -1
  43. package/coverage/lcov-report/api/index.html +1 -1
  44. package/coverage/lcov-report/api/index.js.html +1 -1
  45. package/coverage/lcov-report/api/routes/analytics.js.html +1 -1
  46. package/coverage/lcov-report/api/routes/apikeys.js.html +1 -1
  47. package/coverage/lcov-report/api/routes/auth.js.html +1 -1
  48. package/coverage/lcov-report/api/routes/automation.js.html +1 -1
  49. package/coverage/lcov-report/api/routes/backup.js.html +1 -1
  50. package/coverage/lcov-report/api/routes/cloud.js.html +1 -1
  51. package/coverage/lcov-report/api/routes/component.js.html +1 -1
  52. package/coverage/lcov-report/api/routes/datasource.js.html +1 -1
  53. package/coverage/lcov-report/api/routes/deploy.js.html +1 -1
  54. package/coverage/lcov-report/api/routes/dev.js.html +1 -1
  55. package/coverage/lcov-report/api/routes/index.html +1 -1
  56. package/coverage/lcov-report/api/routes/integration.js.html +1 -1
  57. package/coverage/lcov-report/api/routes/layout.js.html +1 -1
  58. package/coverage/lcov-report/api/routes/metadata.js.html +1 -1
  59. package/coverage/lcov-report/api/routes/migrations.js.html +1 -1
  60. package/coverage/lcov-report/api/routes/permission.js.html +1 -1
  61. package/coverage/lcov-report/api/routes/query.js.html +1 -1
  62. package/coverage/lcov-report/api/routes/role.js.html +1 -1
  63. package/coverage/lcov-report/api/routes/routing.js.html +1 -1
  64. package/coverage/lcov-report/api/routes/screen.js.html +1 -1
  65. package/coverage/lcov-report/api/routes/script.js.html +1 -1
  66. package/coverage/lcov-report/api/routes/table.js.html +1 -1
  67. package/coverage/lcov-report/api/routes/templates.js.html +1 -1
  68. package/coverage/lcov-report/api/routes/user.js.html +1 -1
  69. package/coverage/lcov-report/api/routes/utils/index.html +1 -1
  70. package/coverage/lcov-report/api/routes/utils/validators.js.html +1 -1
  71. package/coverage/lcov-report/api/routes/view.js.html +1 -1
  72. package/coverage/lcov-report/api/routes/webhook.js.html +1 -1
  73. package/coverage/lcov-report/automations/actions.js.html +1 -1
  74. package/coverage/lcov-report/automations/automationUtils.js.html +1 -1
  75. package/coverage/lcov-report/automations/bullboard.js.html +1 -1
  76. package/coverage/lcov-report/automations/index.html +1 -1
  77. package/coverage/lcov-report/automations/index.js.html +1 -1
  78. package/coverage/lcov-report/automations/steps/bash.js.html +1 -1
  79. package/coverage/lcov-report/automations/steps/delay.js.html +1 -1
  80. package/coverage/lcov-report/automations/steps/discord.js.html +1 -1
  81. package/coverage/lcov-report/automations/steps/executeQuery.js.html +1 -1
  82. package/coverage/lcov-report/automations/steps/executeScript.js.html +1 -1
  83. package/coverage/lcov-report/automations/steps/filter.js.html +1 -1
  84. package/coverage/lcov-report/automations/steps/index.html +1 -1
  85. package/coverage/lcov-report/automations/steps/integromat.js.html +1 -1
  86. package/coverage/lcov-report/automations/steps/loop.js.html +1 -1
  87. package/coverage/lcov-report/automations/steps/outgoingWebhook.js.html +1 -1
  88. package/coverage/lcov-report/automations/steps/queryRows.js.html +1 -1
  89. package/coverage/lcov-report/automations/steps/sendSmtpEmail.js.html +1 -1
  90. package/coverage/lcov-report/automations/steps/serverLog.js.html +1 -1
  91. package/coverage/lcov-report/automations/steps/slack.js.html +1 -1
  92. package/coverage/lcov-report/automations/steps/updateRow.js.html +1 -1
  93. package/coverage/lcov-report/automations/steps/utils.js.html +1 -1
  94. package/coverage/lcov-report/automations/steps/zapier.js.html +1 -1
  95. package/coverage/lcov-report/automations/triggerInfo/app.js.html +1 -1
  96. package/coverage/lcov-report/automations/triggerInfo/cron.js.html +1 -1
  97. package/coverage/lcov-report/automations/triggerInfo/index.html +1 -1
  98. package/coverage/lcov-report/automations/triggerInfo/index.js.html +1 -1
  99. package/coverage/lcov-report/automations/triggerInfo/rowDeleted.js.html +1 -1
  100. package/coverage/lcov-report/automations/triggerInfo/rowSaved.js.html +1 -1
  101. package/coverage/lcov-report/automations/triggerInfo/rowUpdated.js.html +1 -1
  102. package/coverage/lcov-report/automations/triggerInfo/webhook.js.html +1 -1
  103. package/coverage/lcov-report/automations/triggers.js.html +1 -1
  104. package/coverage/lcov-report/constants/index.html +1 -1
  105. package/coverage/lcov-report/constants/index.js.html +1 -1
  106. package/coverage/lcov-report/constants/layouts.js.html +1 -1
  107. package/coverage/lcov-report/constants/screens.js.html +1 -1
  108. package/coverage/lcov-report/db/inMemoryView.js.html +1 -1
  109. package/coverage/lcov-report/db/index.html +1 -1
  110. package/coverage/lcov-report/db/index.js.html +1 -1
  111. package/coverage/lcov-report/db/linkedRows/LinkController.js.html +1 -1
  112. package/coverage/lcov-report/db/linkedRows/index.html +1 -1
  113. package/coverage/lcov-report/db/linkedRows/index.js.html +1 -1
  114. package/coverage/lcov-report/db/linkedRows/linkUtils.js.html +1 -1
  115. package/coverage/lcov-report/db/newid.js.html +1 -1
  116. package/coverage/lcov-report/db/utils.js.html +1 -1
  117. package/coverage/lcov-report/events/AutomationEmitter.js.html +1 -1
  118. package/coverage/lcov-report/events/index.html +1 -1
  119. package/coverage/lcov-report/events/index.js.html +1 -1
  120. package/coverage/lcov-report/events/utils.js.html +1 -1
  121. package/coverage/lcov-report/index.html +19 -19
  122. package/coverage/lcov-report/integrations/tests/TestConfiguration.js.html +1 -1
  123. package/coverage/lcov-report/integrations/tests/index.html +1 -1
  124. package/coverage/lcov-report/middleware/appInfo.js.html +1 -1
  125. package/coverage/lcov-report/middleware/builder.js.html +1 -1
  126. package/coverage/lcov-report/middleware/currentapp.js.html +1 -1
  127. package/coverage/lcov-report/middleware/index.html +1 -1
  128. package/coverage/lcov-report/middleware/joi-validator.js.html +1 -1
  129. package/coverage/lcov-report/middleware/publicApi.js.html +1 -1
  130. package/coverage/lcov-report/middleware/resourceId.js.html +1 -1
  131. package/coverage/lcov-report/middleware/selfhost.js.html +1 -1
  132. package/coverage/lcov-report/middleware/utils.js.html +1 -1
  133. package/coverage/lcov-report/utilities/budibaseDir.js.html +1 -1
  134. package/coverage/lcov-report/utilities/centralPath.js.html +1 -1
  135. package/coverage/lcov-report/utilities/csvParser.js.html +1 -1
  136. package/coverage/lcov-report/utilities/global.js.html +1 -1
  137. package/coverage/lcov-report/utilities/index.html +1 -1
  138. package/coverage/lcov-report/utilities/index.js.html +1 -1
  139. package/coverage/lcov-report/utilities/queue/inMemoryQueue.js.html +1 -1
  140. package/coverage/lcov-report/utilities/queue/index.html +1 -1
  141. package/coverage/lcov-report/utilities/routing/index.html +1 -1
  142. package/coverage/lcov-report/utilities/routing/index.js.html +1 -1
  143. package/coverage/lcov-report/utilities/rowProcessor/index.html +1 -1
  144. package/coverage/lcov-report/utilities/rowProcessor/index.js.html +1 -1
  145. package/coverage/lcov-report/utilities/rowProcessor/utils.js.html +1 -1
  146. package/coverage/lcov-report/utilities/scriptRunner.js.html +1 -1
  147. package/coverage/lcov-report/utilities/security.js.html +1 -1
  148. package/coverage/lcov-report/utilities/statusCodes.js.html +1 -1
  149. package/coverage/lcov-report/utilities/usageQuota/index.html +1 -1
  150. package/coverage/lcov-report/utilities/usageQuota/rows.js.html +1 -1
  151. package/coverage/lcov-report/utilities/usageQuota/usageQuoteReset.js.html +1 -1
  152. package/coverage/lcov-report/utilities/users.js.html +1 -1
  153. package/coverage/lcov-report/utilities/workerRequests.js.html +1 -1
  154. package/coverage/lcov.info +209 -192
  155. package/dist/api/controllers/datasource.js +17 -4
  156. package/dist/api/controllers/plugin/index.js +4 -1
  157. package/dist/api/controllers/screen.js +1 -0
  158. package/dist/api/controllers/static/templates/preview.hbs +3 -1
  159. package/dist/app.js +2 -0
  160. package/dist/integrations/base/sqlTable.js +3 -1
  161. package/dist/package.json +7 -6
  162. package/dist/tsconfig.build.tsbuildinfo +1 -1
  163. package/dist/websocket.js +22 -0
  164. package/package.json +8 -7
  165. package/src/api/controllers/datasource.js +17 -4
  166. package/src/api/controllers/plugin/index.ts +5 -1
  167. package/src/api/controllers/screen.js +1 -0
  168. package/src/api/controllers/static/templates/preview.hbs +3 -1
  169. package/src/app.ts +2 -0
  170. package/src/integrations/base/sqlTable.ts +3 -1
  171. package/src/websocket.ts +26 -0
@@ -283,7 +283,7 @@ exports.CURRENTLY_SUPPORTED_LEVELS = CURRENTLY_SUPPORTED_LEVELS
283
283
  <div class='footer quiet pad2 space-top1 center small'>
284
284
  Code coverage generated by
285
285
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
286
- at Mon Sep 12 2022 19:08:44 GMT+0000 (Coordinated Universal Time)
286
+ at Tue Sep 13 2022 10:28:55 GMT+0000 (Coordinated Universal Time)
287
287
  </div>
288
288
  <script src="../prettify.js"></script>
289
289
  <script>
@@ -91,7 +91,7 @@
91
91
  <div class='footer quiet pad2 space-top1 center small'>
92
92
  Code coverage generated by
93
93
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
94
- at Mon Sep 12 2022 19:08:44 GMT+0000 (Coordinated Universal Time)
94
+ at Tue Sep 13 2022 10:28:55 GMT+0000 (Coordinated Universal Time)
95
95
  </div>
96
96
  <script src="../prettify.js"></script>
97
97
  <script>
@@ -116,7 +116,7 @@
116
116
  <div class='footer quiet pad2 space-top1 center small'>
117
117
  Code coverage generated by
118
118
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
119
- at Mon Sep 12 2022 19:08:44 GMT+0000 (Coordinated Universal Time)
119
+ at Tue Sep 13 2022 10:28:55 GMT+0000 (Coordinated Universal Time)
120
120
  </div>
121
121
  <script src="../../prettify.js"></script>
122
122
  <script>
@@ -310,7 +310,7 @@ exports.getUniqueRows = async appIds =&gt; {
310
310
  <div class='footer quiet pad2 space-top1 center small'>
311
311
  Code coverage generated by
312
312
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
313
- at Mon Sep 12 2022 19:08:44 GMT+0000 (Coordinated Universal Time)
313
+ at Tue Sep 13 2022 10:28:55 GMT+0000 (Coordinated Universal Time)
314
314
  </div>
315
315
  <script src="../../prettify.js"></script>
316
316
  <script>
@@ -124,7 +124,7 @@ function <span class="fstat-no" title="function not covered" >resetQuotasIfRequi
124
124
  <div class='footer quiet pad2 space-top1 center small'>
125
125
  Code coverage generated by
126
126
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
127
- at Mon Sep 12 2022 19:08:44 GMT+0000 (Coordinated Universal Time)
127
+ at Tue Sep 13 2022 10:28:55 GMT+0000 (Coordinated Universal Time)
128
128
  </div>
129
129
  <script src="../../prettify.js"></script>
130
130
  <script>
@@ -205,7 +205,7 @@ exports.publicApiUserFix = ctx =&gt; {
205
205
  <div class='footer quiet pad2 space-top1 center small'>
206
206
  Code coverage generated by
207
207
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
208
- at Mon Sep 12 2022 19:08:44 GMT+0000 (Coordinated Universal Time)
208
+ at Tue Sep 13 2022 10:28:55 GMT+0000 (Coordinated Universal Time)
209
209
  </div>
210
210
  <script src="../prettify.js"></script>
211
211
  <script>
@@ -535,7 +535,7 @@ exports.getChecklist = <span class="fstat-no" title="function not covered" >as</
535
535
  <div class='footer quiet pad2 space-top1 center small'>
536
536
  Code coverage generated by
537
537
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
538
- at Mon Sep 12 2022 19:08:44 GMT+0000 (Coordinated Universal Time)
538
+ at Tue Sep 13 2022 10:28:55 GMT+0000 (Coordinated Universal Time)
539
539
  </div>
540
540
  <script src="../prettify.js"></script>
541
541
  <script>
@@ -563,42 +563,44 @@ FN:16,(anonymous_0)
563
563
  FN:24,(anonymous_1)
564
564
  FN:38,(anonymous_2)
565
565
  FN:50,(anonymous_3)
566
- FN:70,(anonymous_4)
566
+ FN:62,(anonymous_4)
567
567
  FN:84,(anonymous_5)
568
- FN:86,(anonymous_6)
569
- FN:99,(anonymous_7)
570
- FN:128,(anonymous_8)
571
- FN:165,(anonymous_9)
572
- FN:173,(anonymous_10)
573
- FN:188,(anonymous_11)
574
- FN:194,(anonymous_12)
575
- FN:203,getErrorTables
576
- FN:205,(anonymous_14)
577
- FN:206,(anonymous_15)
578
- FN:209,updateError
579
- FN:220,(anonymous_17)
568
+ FN:98,(anonymous_6)
569
+ FN:100,(anonymous_7)
570
+ FN:113,(anonymous_8)
571
+ FN:142,(anonymous_9)
572
+ FN:179,(anonymous_10)
573
+ FN:187,(anonymous_11)
574
+ FN:202,(anonymous_12)
575
+ FN:208,(anonymous_13)
576
+ FN:217,getErrorTables
577
+ FN:219,(anonymous_15)
578
+ FN:220,(anonymous_16)
579
+ FN:223,updateError
580
580
  FN:234,(anonymous_18)
581
- FNF:19
581
+ FN:247,(anonymous_19)
582
+ FNF:20
582
583
  FNH:11
583
584
  FNDA:2,(anonymous_0)
584
585
  FNDA:2,(anonymous_1)
585
586
  FNDA:1,(anonymous_2)
586
587
  FNDA:0,(anonymous_3)
587
- FNDA:6,(anonymous_4)
588
- FNDA:1,(anonymous_5)
589
- FNDA:0,(anonymous_6)
590
- FNDA:6,(anonymous_7)
591
- FNDA:64,(anonymous_8)
592
- FNDA:1,(anonymous_9)
588
+ FNDA:0,(anonymous_4)
589
+ FNDA:6,(anonymous_5)
590
+ FNDA:1,(anonymous_6)
591
+ FNDA:0,(anonymous_7)
592
+ FNDA:6,(anonymous_8)
593
+ FNDA:64,(anonymous_9)
593
594
  FNDA:1,(anonymous_10)
594
595
  FNDA:1,(anonymous_11)
595
596
  FNDA:1,(anonymous_12)
597
+ FNDA:1,(anonymous_13)
596
598
  FNDA:0,getErrorTables
597
- FNDA:0,(anonymous_14)
598
599
  FNDA:0,(anonymous_15)
600
+ FNDA:0,(anonymous_16)
599
601
  FNDA:0,updateError
600
- FNDA:0,(anonymous_17)
601
602
  FNDA:0,(anonymous_18)
603
+ FNDA:0,(anonymous_19)
602
604
  DA:8,45
603
605
  DA:9,45
604
606
  DA:10,45
@@ -620,175 +622,190 @@ DA:47,2
620
622
  DA:50,45
621
623
  DA:51,0
622
624
  DA:52,0
623
- DA:54,0
625
+ DA:53,0
624
626
  DA:55,0
627
+ DA:56,0
625
628
  DA:57,0
626
629
  DA:58,0
627
630
  DA:60,0
628
631
  DA:61,0
629
632
  DA:62,0
630
633
  DA:64,0
631
- DA:70,45
632
- DA:71,6
633
- DA:72,6
634
- DA:73,6
635
- DA:75,6
636
- DA:76,5
637
- DA:79,1
638
- DA:81,0
639
- DA:84,1
640
- DA:85,1
641
- DA:87,0
642
- DA:91,1
643
- DA:92,1
644
- DA:96,1
645
- DA:99,45
646
- DA:100,6
647
- DA:101,6
648
- DA:102,6
649
- DA:103,6
650
- DA:104,6
651
- DA:105,6
652
- DA:106,6
653
- DA:108,0
654
- DA:111,6
655
- DA:112,6
656
- DA:113,6
634
+ DA:68,0
635
+ DA:71,0
636
+ DA:72,0
637
+ DA:74,0
638
+ DA:75,0
639
+ DA:76,0
640
+ DA:78,0
641
+ DA:84,45
642
+ DA:85,6
643
+ DA:86,6
644
+ DA:87,6
645
+ DA:89,6
646
+ DA:90,5
647
+ DA:93,1
648
+ DA:95,0
649
+ DA:98,1
650
+ DA:99,1
651
+ DA:101,0
652
+ DA:105,1
653
+ DA:106,1
654
+ DA:110,1
655
+ DA:113,45
656
+ DA:114,6
657
+ DA:115,6
657
658
  DA:116,6
658
659
  DA:117,6
659
660
  DA:118,6
660
- DA:119,0
661
- DA:123,6
662
- DA:124,6
661
+ DA:119,6
662
+ DA:120,6
663
+ DA:122,0
663
664
  DA:125,6
664
- DA:128,45
665
- DA:129,64
666
- DA:130,64
667
- DA:131,64
668
- DA:133,64
669
- DA:139,64
670
- DA:140,64
671
- DA:141,0
672
- DA:142,0
673
- DA:143,0
674
- DA:146,64
665
+ DA:126,6
666
+ DA:127,6
667
+ DA:130,6
668
+ DA:131,6
669
+ DA:132,6
670
+ DA:133,0
671
+ DA:137,6
672
+ DA:138,6
673
+ DA:139,6
674
+ DA:142,45
675
+ DA:143,64
676
+ DA:144,64
677
+ DA:145,64
675
678
  DA:147,64
676
- DA:148,64
677
- DA:151,64
678
- DA:152,64
679
- DA:153,63
680
- DA:154,0
681
- DA:158,63
682
- DA:159,63
683
- DA:160,0
684
- DA:162,63
685
- DA:165,45
686
- DA:166,1
687
- DA:167,1
688
- DA:169,1
689
- DA:171,1
690
- DA:172,1
691
- DA:173,1
679
+ DA:153,64
680
+ DA:154,64
681
+ DA:155,0
682
+ DA:156,0
683
+ DA:157,0
684
+ DA:160,64
685
+ DA:161,64
686
+ DA:162,64
687
+ DA:165,64
688
+ DA:166,64
689
+ DA:167,63
690
+ DA:168,0
691
+ DA:172,63
692
+ DA:173,63
693
+ DA:174,0
694
+ DA:176,63
695
+ DA:179,45
696
+ DA:180,1
692
697
  DA:181,1
693
- DA:182,1
694
- DA:184,1
698
+ DA:183,1
695
699
  DA:185,1
696
- DA:188,45
697
- DA:189,1
698
- DA:190,1
699
- DA:194,45
700
+ DA:186,1
701
+ DA:187,1
700
702
  DA:195,1
701
703
  DA:196,1
702
- DA:197,1
703
- DA:199,0
704
- DA:204,0
705
- DA:205,0
706
- DA:206,0
707
- DA:210,0
708
- DA:211,0
704
+ DA:198,1
705
+ DA:199,1
706
+ DA:202,45
707
+ DA:203,1
708
+ DA:204,1
709
+ DA:208,45
710
+ DA:209,1
711
+ DA:210,1
712
+ DA:211,1
709
713
  DA:213,0
710
- DA:214,0
711
- DA:216,0
712
- DA:217,0
713
- DA:220,45
714
- DA:221,0
714
+ DA:218,0
715
+ DA:219,0
716
+ DA:220,0
715
717
  DA:224,0
716
718
  DA:225,0
717
- DA:226,0
718
- DA:229,0
719
+ DA:227,0
720
+ DA:228,0
719
721
  DA:230,0
720
722
  DA:231,0
721
- DA:233,0
722
- DA:234,0
723
- DA:236,0
724
- DA:237,0
725
- DA:241,0
723
+ DA:234,45
724
+ DA:235,0
725
+ DA:238,0
726
+ DA:239,0
726
727
  DA:242,0
727
728
  DA:243,0
728
729
  DA:244,0
729
- DA:245,0
730
730
  DA:246,0
731
731
  DA:247,0
732
- DA:253,0
732
+ DA:249,0
733
+ DA:250,0
733
734
  DA:254,0
734
735
  DA:255,0
735
- DA:262,0
736
- LF:134
736
+ DA:256,0
737
+ DA:257,0
738
+ DA:258,0
739
+ DA:259,0
740
+ DA:260,0
741
+ DA:266,0
742
+ DA:267,0
743
+ DA:268,0
744
+ DA:275,0
745
+ LF:141
737
746
  LH:82
738
747
  BRDA:41,0,0,0
739
748
  BRDA:41,0,1,1
740
749
  BRDA:41,1,0,1
741
750
  BRDA:41,1,1,1
742
- BRDA:61,2,0,0
743
- BRDA:61,2,1,0
744
- BRDA:75,3,0,5
745
- BRDA:75,3,1,1
746
- BRDA:79,4,0,0
747
- BRDA:79,4,1,1
748
- BRDA:87,5,0,0
749
- BRDA:87,5,1,0
750
- BRDA:87,5,2,0
751
- BRDA:91,6,0,1
752
- BRDA:91,6,1,0
753
- BRDA:106,7,0,0
754
- BRDA:106,7,1,6
755
- BRDA:106,8,0,6
756
- BRDA:106,8,1,0
757
- BRDA:116,9,0,6
758
- BRDA:116,9,1,0
759
- BRDA:118,10,0,0
760
- BRDA:118,10,1,6
761
- BRDA:118,11,0,6
762
- BRDA:118,11,1,6
763
- BRDA:135,12,0,0
764
- BRDA:135,12,1,64
765
- BRDA:140,13,0,0
766
- BRDA:140,13,1,64
767
- BRDA:151,14,0,64
768
- BRDA:151,14,1,0
769
- BRDA:153,15,0,0
770
- BRDA:153,15,1,63
771
- BRDA:153,16,0,63
772
- BRDA:153,16,1,63
773
- BRDA:159,17,0,0
774
- BRDA:159,17,1,63
775
- BRDA:210,18,0,0
776
- BRDA:210,18,1,0
777
- BRDA:213,19,0,0
778
- BRDA:213,19,1,0
779
- BRDA:230,20,0,0
780
- BRDA:230,20,1,0
781
- BRDA:236,21,0,0
782
- BRDA:236,21,1,0
783
- BRDA:243,22,0,0
784
- BRDA:243,22,1,0
785
- BRDA:243,23,0,0
786
- BRDA:243,23,1,0
787
- BRDA:246,24,0,0
788
- BRDA:246,24,1,0
789
- BRDA:253,25,0,0
790
- BRDA:253,25,1,0
791
- BRF:53
751
+ BRDA:56,2,0,0
752
+ BRDA:56,2,1,0
753
+ BRDA:57,3,0,0
754
+ BRDA:57,3,1,0
755
+ BRDA:61,4,0,0
756
+ BRDA:61,4,1,0
757
+ BRDA:75,5,0,0
758
+ BRDA:75,5,1,0
759
+ BRDA:89,6,0,5
760
+ BRDA:89,6,1,1
761
+ BRDA:93,7,0,0
762
+ BRDA:93,7,1,1
763
+ BRDA:101,8,0,0
764
+ BRDA:101,8,1,0
765
+ BRDA:101,8,2,0
766
+ BRDA:105,9,0,1
767
+ BRDA:105,9,1,0
768
+ BRDA:120,10,0,0
769
+ BRDA:120,10,1,6
770
+ BRDA:120,11,0,6
771
+ BRDA:120,11,1,0
772
+ BRDA:130,12,0,6
773
+ BRDA:130,12,1,0
774
+ BRDA:132,13,0,0
775
+ BRDA:132,13,1,6
776
+ BRDA:132,14,0,6
777
+ BRDA:132,14,1,6
778
+ BRDA:149,15,0,0
779
+ BRDA:149,15,1,64
780
+ BRDA:154,16,0,0
781
+ BRDA:154,16,1,64
782
+ BRDA:165,17,0,64
783
+ BRDA:165,17,1,0
784
+ BRDA:167,18,0,0
785
+ BRDA:167,18,1,63
786
+ BRDA:167,19,0,63
787
+ BRDA:167,19,1,63
788
+ BRDA:173,20,0,0
789
+ BRDA:173,20,1,63
790
+ BRDA:224,21,0,0
791
+ BRDA:224,21,1,0
792
+ BRDA:227,22,0,0
793
+ BRDA:227,22,1,0
794
+ BRDA:242,23,0,0
795
+ BRDA:242,23,1,0
796
+ BRDA:243,24,0,0
797
+ BRDA:243,24,1,0
798
+ BRDA:249,25,0,0
799
+ BRDA:249,25,1,0
800
+ BRDA:256,26,0,0
801
+ BRDA:256,26,1,0
802
+ BRDA:256,27,0,0
803
+ BRDA:256,27,1,0
804
+ BRDA:259,28,0,0
805
+ BRDA:259,28,1,0
806
+ BRDA:266,29,0,0
807
+ BRDA:266,29,1,0
808
+ BRF:61
792
809
  BRH:20
793
810
  end_of_record
794
811
  TN:
@@ -1399,9 +1416,9 @@ FN:54,(anonymous_3)
1399
1416
  FN:55,(anonymous_4)
1400
1417
  FN:66,(anonymous_5)
1401
1418
  FN:67,(anonymous_6)
1402
- FN:95,(anonymous_7)
1403
- FN:109,(anonymous_8)
1404
- FN:121,(anonymous_9)
1419
+ FN:96,(anonymous_7)
1420
+ FN:110,(anonymous_8)
1421
+ FN:122,(anonymous_9)
1405
1422
  FNF:10
1406
1423
  FNH:6
1407
1424
  FNDA:1,(anonymous_0)
@@ -1447,29 +1464,29 @@ DA:66,0
1447
1464
  DA:67,0
1448
1465
  DA:68,0
1449
1466
  DA:69,0
1450
- DA:78,0
1451
1467
  DA:79,0
1452
- DA:83,24
1453
- DA:84,23
1454
- DA:86,24
1468
+ DA:80,0
1469
+ DA:84,24
1470
+ DA:85,23
1455
1471
  DA:87,24
1456
- DA:95,44
1457
- DA:96,1
1472
+ DA:88,24
1473
+ DA:96,44
1458
1474
  DA:97,1
1459
1475
  DA:98,1
1460
- DA:100,1
1461
- DA:102,1
1476
+ DA:99,1
1477
+ DA:101,1
1462
1478
  DA:103,1
1463
- DA:106,1
1464
- DA:109,44
1465
- DA:110,48
1466
- DA:111,0
1467
- DA:113,48
1468
- DA:114,0
1479
+ DA:104,1
1480
+ DA:107,1
1481
+ DA:110,44
1482
+ DA:111,48
1483
+ DA:112,0
1484
+ DA:114,48
1469
1485
  DA:115,0
1470
- DA:118,48
1471
- DA:119,24
1472
- DA:121,24
1486
+ DA:116,0
1487
+ DA:119,48
1488
+ DA:120,24
1489
+ DA:122,24
1473
1490
  LF:56
1474
1491
  LH:40
1475
1492
  BRDA:35,0,0,23
@@ -1482,20 +1499,20 @@ BRDA:64,3,0,0
1482
1499
  BRDA:64,3,1,0
1483
1500
  BRDA:67,4,0,0
1484
1501
  BRDA:67,4,1,0
1485
- BRDA:78,5,0,0
1486
- BRDA:78,5,1,0
1487
- BRDA:83,6,0,23
1488
- BRDA:83,6,1,1
1489
- BRDA:110,7,0,0
1490
- BRDA:110,7,1,48
1491
- BRDA:113,8,0,0
1492
- BRDA:113,8,1,48
1493
- BRDA:114,9,0,0
1494
- BRDA:114,9,1,0
1495
- BRDA:118,10,0,24
1496
- BRDA:118,10,1,24
1497
- BRDA:118,11,0,48
1498
- BRDA:118,11,1,48
1502
+ BRDA:79,5,0,0
1503
+ BRDA:79,5,1,0
1504
+ BRDA:84,6,0,23
1505
+ BRDA:84,6,1,1
1506
+ BRDA:111,7,0,0
1507
+ BRDA:111,7,1,48
1508
+ BRDA:114,8,0,0
1509
+ BRDA:114,8,1,48
1510
+ BRDA:115,9,0,0
1511
+ BRDA:115,9,1,0
1512
+ BRDA:119,10,0,24
1513
+ BRDA:119,10,1,24
1514
+ BRDA:119,11,0,48
1515
+ BRDA:119,11,1,48
1499
1516
  BRF:24
1500
1517
  BRH:11
1501
1518
  end_of_record
@@ -41,8 +41,21 @@ exports.buildSchemaFromDb = function (ctx) {
41
41
  return __awaiter(this, void 0, void 0, function* () {
42
42
  const db = getAppDB();
43
43
  const datasource = yield db.get(ctx.params.datasourceId);
44
- const { tables, error } = yield buildSchemaHelper(datasource);
45
- datasource.entities = tables;
44
+ const tablesFilter = ctx.request.body.tablesFilter;
45
+ let { tables, error } = yield buildSchemaHelper(datasource);
46
+ if (tablesFilter) {
47
+ if (!datasource.entities) {
48
+ datasource.entities = {};
49
+ }
50
+ for (let key in tables) {
51
+ if (tablesFilter.some(filter => filter.toLowerCase() === key.toLowerCase())) {
52
+ datasource.entities[key] = tables[key];
53
+ }
54
+ }
55
+ }
56
+ else {
57
+ datasource.entities = tables;
58
+ }
46
59
  const dbResp = yield db.put(datasource);
47
60
  datasource._rev = dbResp.rev;
48
61
  const response = { datasource };
@@ -188,13 +201,13 @@ function updateError(error, newError, tables) {
188
201
  return error;
189
202
  }
190
203
  const buildSchemaHelper = (datasource) => __awaiter(void 0, void 0, void 0, function* () {
204
+ var _a;
191
205
  const Connector = yield getIntegration(datasource.source);
192
206
  // Connect to the DB and build the schema
193
207
  const connector = new Connector(datasource.config);
194
208
  yield connector.buildSchema(datasource._id, datasource.entities);
195
- datasource.entities = connector.tables;
196
209
  // make sure they all have a display name selected
197
- for (let entity of Object.values(datasource.entities)) {
210
+ for (let entity of Object.values((_a = datasource.entities) !== null && _a !== void 0 ? _a : {})) {
198
211
  if (entity.primaryDisplay) {
199
212
  continue;
200
213
  }
@@ -22,6 +22,7 @@ const utils_1 = require("../../../db/utils");
22
22
  const objectStore_1 = require("@budibase/backend-core/objectStore");
23
23
  const types_1 = require("@budibase/types");
24
24
  const environment_1 = __importDefault(require("../../../environment"));
25
+ const websocket_1 = require("../../../websocket");
25
26
  function getPlugins(type) {
26
27
  return __awaiter(this, void 0, void 0, function* () {
27
28
  const db = (0, tenancy_1.getGlobalDB)();
@@ -134,7 +135,7 @@ exports.destroy = destroy;
134
135
  function storePlugin(metadata, directory, source) {
135
136
  return __awaiter(this, void 0, void 0, function* () {
136
137
  const db = (0, tenancy_1.getGlobalDB)();
137
- const version = metadata.package.version, name = metadata.package.name, description = metadata.package.description;
138
+ const version = metadata.package.version, name = metadata.package.name, description = metadata.package.description, hash = metadata.schema.hash;
138
139
  // first open the tarball into tmp directory
139
140
  const bucketPath = `${name}/`;
140
141
  const files = yield (0, objectStore_1.uploadDirectory)(constants_1.ObjectStoreBuckets.PLUGINS, directory, bucketPath);
@@ -168,11 +169,13 @@ function storePlugin(metadata, directory, source) {
168
169
  }
169
170
  let doc = Object.assign(Object.assign({ _id: pluginId, _rev: rev }, metadata), { name,
170
171
  version,
172
+ hash,
171
173
  description, jsUrl: `${bucketPath}${jsFileName}` });
172
174
  if (source) {
173
175
  doc = Object.assign(Object.assign({}, doc), { source });
174
176
  }
175
177
  const response = yield db.put(doc);
178
+ websocket_1.ClientAppSocket.emit("plugin-update", { name, hash });
176
179
  return Object.assign(Object.assign({}, doc), { _rev: response.rev });
177
180
  });
178
181
  }
@@ -56,6 +56,7 @@ exports.save = (ctx) => __awaiter(void 0, void 0, void 0, function* () {
56
56
  name: plugin.name,
57
57
  version: plugin.version,
58
58
  jsUrl: plugin.jsUrl,
59
+ hash: plugin.hash,
59
60
  });
60
61
  }
61
62
  });
@@ -67,7 +67,8 @@
67
67
  previewDevice,
68
68
  navigation,
69
69
  hiddenComponentIds,
70
- usedPlugins
70
+ usedPlugins,
71
+ location
71
72
  } = parsed
72
73
 
73
74
  // Set some flags so the app knows we're in the builder
@@ -83,6 +84,7 @@
83
84
  window["##BUDIBASE_PREVIEW_NAVIGATION##"] = navigation
84
85
  window["##BUDIBASE_HIDDEN_COMPONENT_IDS##"] = hiddenComponentIds
85
86
  window["##BUDIBASE_USED_PLUGINS##"] = usedPlugins
87
+ window["##BUDIBASE_LOCATION##"] = location
86
88
 
87
89
  // Initialise app
88
90
  try {
package/dist/app.js CHANGED
@@ -66,6 +66,7 @@ const migrations = __importStar(require("./migrations"));
66
66
  const backend_core_1 = require("@budibase/backend-core");
67
67
  const workerRequests_1 = require("./utilities/workerRequests");
68
68
  const watch_1 = require("./watch");
69
+ const websocket_1 = require("./websocket");
69
70
  const app = new Koa();
70
71
  // set up top level koa middleware
71
72
  app.use(koaBody({
@@ -99,6 +100,7 @@ if (env.isProd()) {
99
100
  }
100
101
  const server = http.createServer(app.callback());
101
102
  destroyable(server);
103
+ (0, websocket_1.initialise)(server);
102
104
  let shuttingDown = false, errCode = 0;
103
105
  server.on("close", () => __awaiter(void 0, void 0, void 0, function* () {
104
106
  // already in process