@budibase/server 1.0.213 → 1.0.216

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 (177) hide show
  1. package/builder/assets/{index.12c39710.js → index.5f52bb46.js} +179 -178
  2. package/builder/index.html +1 -1
  3. package/coverage/clover.xml +127 -100
  4. package/coverage/coverage-final.json +3 -3
  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 +1 -1
  12. package/coverage/lcov-report/api/controllers/dev.js.html +166 -13
  13. package/coverage/lcov-report/api/controllers/index.html +20 -20
  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 +1 -1
  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 +5 -2
  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 +27 -27
  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/threads/automation.js.html +1 -1
  134. package/coverage/lcov-report/threads/index.html +1 -1
  135. package/coverage/lcov-report/threads/query.js.html +1 -1
  136. package/coverage/lcov-report/threads/utils.js.html +1 -1
  137. package/coverage/lcov-report/utilities/budibaseDir.js.html +1 -1
  138. package/coverage/lcov-report/utilities/centralPath.js.html +1 -1
  139. package/coverage/lcov-report/utilities/csvParser.js.html +1 -1
  140. package/coverage/lcov-report/utilities/global.js.html +1 -1
  141. package/coverage/lcov-report/utilities/index.html +15 -15
  142. package/coverage/lcov-report/utilities/index.js.html +27 -9
  143. package/coverage/lcov-report/utilities/queue/inMemoryQueue.js.html +1 -1
  144. package/coverage/lcov-report/utilities/queue/index.html +1 -1
  145. package/coverage/lcov-report/utilities/routing/index.html +1 -1
  146. package/coverage/lcov-report/utilities/routing/index.js.html +1 -1
  147. package/coverage/lcov-report/utilities/rowProcessor/index.html +1 -1
  148. package/coverage/lcov-report/utilities/rowProcessor/index.js.html +1 -1
  149. package/coverage/lcov-report/utilities/rowProcessor/utils.js.html +1 -1
  150. package/coverage/lcov-report/utilities/scriptRunner.js.html +1 -1
  151. package/coverage/lcov-report/utilities/security.js.html +1 -1
  152. package/coverage/lcov-report/utilities/statusCodes.js.html +1 -1
  153. package/coverage/lcov-report/utilities/usageQuota/index.html +1 -1
  154. package/coverage/lcov-report/utilities/usageQuota/rows.js.html +1 -1
  155. package/coverage/lcov-report/utilities/usageQuota/usageQuoteReset.js.html +1 -1
  156. package/coverage/lcov-report/utilities/users.js.html +1 -1
  157. package/coverage/lcov-report/utilities/workerRequests.js.html +1 -1
  158. package/coverage/lcov.info +197 -154
  159. package/dist/api/controllers/application.js +1 -1
  160. package/dist/api/controllers/dev.js +40 -2
  161. package/dist/api/controllers/static/index.js +31 -2
  162. package/dist/api/routes/dev.js +2 -1
  163. package/dist/api/routes/static.js +1 -0
  164. package/dist/environment.js +2 -1
  165. package/dist/package.json +6 -6
  166. package/dist/tsconfig.build.tsbuildinfo +1 -1
  167. package/dist/utilities/fileSystem/utilities.js +2 -1
  168. package/dist/utilities/index.js +5 -1
  169. package/package.json +7 -7
  170. package/src/api/controllers/application.ts +5 -1
  171. package/src/api/controllers/dev.js +53 -2
  172. package/src/api/controllers/static/index.js +41 -2
  173. package/src/api/routes/dev.js +1 -0
  174. package/src/api/routes/static.ts +1 -0
  175. package/src/environment.js +3 -1
  176. package/src/utilities/fileSystem/utilities.js +2 -0
  177. package/src/utilities/index.js +7 -1
@@ -740,17 +740,19 @@ BRH:20
740
740
  end_of_record
741
741
  TN:
742
742
  SF:src/api/controllers/dev.js
743
- FN:12,redirect
744
- FN:49,(anonymous_1)
745
- FN:50,(anonymous_2)
746
- FN:55,(anonymous_3)
747
- FN:56,(anonymous_4)
748
- FN:61,(anonymous_5)
749
- FN:62,(anonymous_6)
750
- FN:67,(anonymous_7)
751
- FN:79,(anonymous_8)
752
- FN:129,(anonymous_9)
753
- FNF:10
743
+ FN:16,redirect
744
+ FN:53,(anonymous_1)
745
+ FN:54,(anonymous_2)
746
+ FN:59,(anonymous_3)
747
+ FN:60,(anonymous_4)
748
+ FN:65,(anonymous_5)
749
+ FN:66,(anonymous_6)
750
+ FN:71,(anonymous_7)
751
+ FN:83,(anonymous_8)
752
+ FN:133,(anonymous_9)
753
+ FN:142,(anonymous_10)
754
+ FN:172,(anonymous_11)
755
+ FNF:12
754
756
  FNH:5
755
757
  FNDA:0,redirect
756
758
  FNDA:54,(anonymous_1)
@@ -762,96 +764,131 @@ FNDA:0,(anonymous_6)
762
764
  FNDA:0,(anonymous_7)
763
765
  FNDA:1,(anonymous_8)
764
766
  FNDA:1,(anonymous_9)
767
+ FNDA:0,(anonymous_10)
768
+ FNDA:0,(anonymous_11)
765
769
  DA:1,27
766
770
  DA:2,27
767
771
  DA:3,27
768
772
  DA:4,27
769
773
  DA:5,27
770
- DA:6,27
771
- DA:7,27
772
- DA:8,27
773
- DA:9,27
774
774
  DA:10,27
775
- DA:13,0
776
- DA:14,0
777
- DA:15,0
778
- DA:28,0
779
- DA:29,0
780
- DA:30,0
775
+ DA:11,27
776
+ DA:12,27
777
+ DA:13,27
778
+ DA:14,27
779
+ DA:17,0
780
+ DA:18,0
781
+ DA:19,0
781
782
  DA:32,0
782
783
  DA:33,0
783
784
  DA:34,0
785
+ DA:36,0
784
786
  DA:37,0
785
787
  DA:38,0
788
+ DA:41,0
786
789
  DA:42,0
787
- DA:43,0
788
- DA:44,0
789
790
  DA:46,0
790
- DA:49,27
791
- DA:50,54
792
- DA:51,0
793
- DA:55,27
794
- DA:56,54
795
- DA:57,0
796
- DA:61,27
797
- DA:62,54
798
- DA:63,0
799
- DA:67,27
800
- DA:68,0
801
- DA:69,0
802
- DA:70,0
791
+ DA:47,0
792
+ DA:48,0
793
+ DA:50,0
794
+ DA:53,27
795
+ DA:54,54
796
+ DA:55,0
797
+ DA:59,27
798
+ DA:60,54
799
+ DA:61,0
800
+ DA:65,27
801
+ DA:66,54
802
+ DA:67,0
803
+ DA:71,27
803
804
  DA:72,0
805
+ DA:73,0
804
806
  DA:74,0
805
- DA:79,27
806
- DA:80,1
807
- DA:81,1
807
+ DA:76,0
808
+ DA:78,0
809
+ DA:83,27
808
810
  DA:84,1
809
811
  DA:85,1
810
- DA:86,1
811
- DA:87,1
812
- DA:88,0
812
+ DA:88,1
813
+ DA:89,1
813
814
  DA:90,1
814
815
  DA:91,1
815
- DA:95,0
816
- DA:98,0
817
- DA:101,1
816
+ DA:92,0
817
+ DA:94,1
818
+ DA:95,1
819
+ DA:99,0
820
+ DA:102,0
818
821
  DA:105,1
819
- DA:106,1
820
- DA:108,0
821
- DA:112,1
822
- DA:113,1
823
- DA:114,1
824
- DA:115,1
822
+ DA:109,1
823
+ DA:110,1
824
+ DA:112,0
825
825
  DA:116,1
826
826
  DA:117,1
827
827
  DA:118,1
828
+ DA:119,1
829
+ DA:120,1
828
830
  DA:121,1
829
- DA:123,0
831
+ DA:122,1
830
832
  DA:125,1
831
- DA:129,27
832
- DA:130,1
833
- DA:131,1
833
+ DA:127,0
834
+ DA:129,1
835
+ DA:133,27
834
836
  DA:134,1
835
- LF:70
836
- LH:42
837
- BRDA:12,0,0,0
838
- BRDA:14,1,0,0
839
- BRDA:14,1,1,0
840
- BRDA:28,2,0,0
841
- BRDA:28,2,1,0
842
- BRDA:33,3,0,0
843
- BRDA:33,3,1,0
844
- BRDA:43,4,0,0
845
- BRDA:43,4,1,0
846
- BRDA:87,5,0,0
847
- BRDA:87,5,1,1
848
- BRDA:91,6,0,0
849
- BRDA:91,6,1,1
850
- BRDA:92,7,0,1
851
- BRDA:92,7,1,1
852
- BRDA:106,8,0,0
853
- BRDA:106,8,1,1
854
- BRF:17
837
+ DA:135,1
838
+ DA:138,1
839
+ DA:142,27
840
+ DA:144,0
841
+ DA:145,0
842
+ DA:146,0
843
+ DA:147,0
844
+ DA:149,0
845
+ DA:152,0
846
+ DA:155,0
847
+ DA:156,0
848
+ DA:157,0
849
+ DA:160,0
850
+ DA:161,0
851
+ DA:162,0
852
+ DA:164,0
853
+ DA:165,0
854
+ DA:166,0
855
+ DA:172,0
856
+ DA:174,0
857
+ DA:175,0
858
+ DA:176,0
859
+ DA:177,0
860
+ DA:178,0
861
+ DA:181,0
862
+ DA:183,0
863
+ DA:184,0
864
+ LF:95
865
+ LH:43
866
+ BRDA:16,0,0,0
867
+ BRDA:18,1,0,0
868
+ BRDA:18,1,1,0
869
+ BRDA:32,2,0,0
870
+ BRDA:32,2,1,0
871
+ BRDA:37,3,0,0
872
+ BRDA:37,3,1,0
873
+ BRDA:47,4,0,0
874
+ BRDA:47,4,1,0
875
+ BRDA:91,5,0,0
876
+ BRDA:91,5,1,1
877
+ BRDA:95,6,0,0
878
+ BRDA:95,6,1,1
879
+ BRDA:96,7,0,1
880
+ BRDA:96,7,1,1
881
+ BRDA:110,8,0,0
882
+ BRDA:110,8,1,1
883
+ BRDA:144,9,0,0
884
+ BRDA:144,9,1,0
885
+ BRDA:144,10,0,0
886
+ BRDA:144,10,1,0
887
+ BRDA:146,11,0,0
888
+ BRDA:146,11,1,0
889
+ BRDA:176,12,0,0
890
+ BRDA:176,12,1,0
891
+ BRF:25
855
892
  BRH:5
856
893
  end_of_record
857
894
  TN:
@@ -4007,7 +4044,7 @@ DA:16,27
4007
4044
  DA:17,27
4008
4045
  DA:18,27
4009
4046
  DA:21,27
4010
- DA:26,27
4047
+ DA:27,27
4011
4048
  LF:12
4012
4049
  LH:12
4013
4050
  BRDA:16,0,0,27
@@ -7528,16 +7565,16 @@ FN:16,(anonymous_2)
7528
7565
  FN:30,(anonymous_3)
7529
7566
  FN:38,(anonymous_4)
7530
7567
  FN:57,(anonymous_5)
7531
- FN:72,(anonymous_6)
7532
- FN:78,(anonymous_7)
7533
- FN:104,(anonymous_8)
7534
- FN:105,(anonymous_9)
7535
- FN:110,(anonymous_10)
7536
- FN:127,(anonymous_11)
7537
- FN:137,(anonymous_12)
7538
- FN:139,(anonymous_13)
7539
- FN:146,(anonymous_14)
7540
- FN:157,(anonymous_15)
7568
+ FN:78,(anonymous_6)
7569
+ FN:84,(anonymous_7)
7570
+ FN:110,(anonymous_8)
7571
+ FN:111,(anonymous_9)
7572
+ FN:116,(anonymous_10)
7573
+ FN:133,(anonymous_11)
7574
+ FN:143,(anonymous_12)
7575
+ FN:145,(anonymous_13)
7576
+ FN:152,(anonymous_14)
7577
+ FN:163,(anonymous_15)
7541
7578
  FNF:16
7542
7579
  FNH:15
7543
7580
  FNDA:4,(anonymous_0)
@@ -7579,60 +7616,62 @@ DA:41,2
7579
7616
  DA:43,0
7580
7617
  DA:57,47
7581
7618
  DA:58,245
7582
- DA:59,0
7583
- DA:63,0
7619
+ DA:60,0
7620
+ DA:61,0
7584
7621
  DA:64,0
7585
- DA:66,0
7586
- DA:68,245
7587
- DA:72,47
7588
- DA:73,2
7622
+ DA:69,0
7623
+ DA:70,0
7624
+ DA:72,0
7625
+ DA:74,245
7589
7626
  DA:78,47
7590
- DA:79,3
7591
- DA:80,3
7592
- DA:83,3
7593
- DA:84,3
7627
+ DA:79,2
7628
+ DA:84,47
7594
7629
  DA:85,3
7595
- DA:86,0
7596
- DA:87,0
7630
+ DA:86,3
7597
7631
  DA:89,3
7598
7632
  DA:90,3
7599
- DA:92,3
7600
- DA:93,3
7601
- DA:94,0
7633
+ DA:91,3
7634
+ DA:92,0
7635
+ DA:93,0
7636
+ DA:95,3
7602
7637
  DA:96,3
7603
- DA:97,3
7604
- DA:104,47
7605
- DA:105,1
7606
- DA:106,1
7638
+ DA:98,3
7639
+ DA:99,3
7640
+ DA:100,0
7641
+ DA:102,3
7642
+ DA:103,3
7607
7643
  DA:110,47
7608
- DA:111,4
7609
- DA:112,4
7610
- DA:114,4
7611
- DA:115,4
7612
- DA:116,0
7613
- DA:117,0
7614
- DA:122,4
7644
+ DA:111,1
7645
+ DA:112,1
7646
+ DA:116,47
7647
+ DA:117,4
7648
+ DA:118,4
7649
+ DA:120,4
7650
+ DA:121,4
7651
+ DA:122,0
7615
7652
  DA:123,0
7616
- DA:127,47
7617
- DA:128,0
7618
- DA:137,47
7619
- DA:138,1
7620
- DA:140,1
7621
- DA:141,1
7622
- DA:146,47
7623
- DA:147,29
7624
- DA:148,29
7625
- DA:149,29
7626
- DA:150,29
7627
- DA:151,29
7628
- DA:152,0
7653
+ DA:128,4
7654
+ DA:129,0
7655
+ DA:133,47
7656
+ DA:134,0
7657
+ DA:143,47
7658
+ DA:144,1
7659
+ DA:146,1
7660
+ DA:147,1
7661
+ DA:152,47
7662
+ DA:153,29
7629
7663
  DA:154,29
7630
- DA:157,47
7631
- DA:158,1
7632
- DA:159,1
7633
- DA:160,0
7634
- DA:162,1
7635
- LF:76
7664
+ DA:155,29
7665
+ DA:156,29
7666
+ DA:157,29
7667
+ DA:158,0
7668
+ DA:160,29
7669
+ DA:163,47
7670
+ DA:164,1
7671
+ DA:165,1
7672
+ DA:166,0
7673
+ DA:168,1
7674
+ LF:78
7636
7675
  LH:62
7637
7676
  BRDA:18,0,0,1
7638
7677
  BRDA:18,0,1,0
@@ -7642,29 +7681,33 @@ BRDA:39,2,0,2
7642
7681
  BRDA:39,2,1,0
7643
7682
  BRDA:58,3,0,0
7644
7683
  BRDA:58,3,1,245
7645
- BRDA:63,4,0,0
7646
- BRDA:63,4,1,0
7647
- BRDA:93,5,0,0
7648
- BRDA:93,5,1,3
7649
- BRDA:116,6,0,0
7650
- BRDA:116,6,1,0
7651
- BRDA:122,7,0,0
7652
- BRDA:122,7,1,4
7653
- BRDA:122,8,0,4
7654
- BRDA:122,8,1,4
7655
- BRDA:150,9,0,29
7656
- BRDA:150,9,1,26
7657
- BRDA:151,10,0,29
7658
- BRDA:151,10,1,0
7659
- BRDA:154,11,0,0
7660
- BRDA:154,11,1,29
7661
- BRDA:154,12,0,29
7662
- BRDA:154,12,1,26
7663
- BRDA:159,13,0,0
7664
- BRDA:159,13,1,1
7665
- BRDA:159,14,0,1
7666
- BRDA:159,14,1,0
7667
- BRF:30
7684
+ BRDA:60,4,0,0
7685
+ BRDA:60,4,1,0
7686
+ BRDA:60,5,0,0
7687
+ BRDA:60,5,1,0
7688
+ BRDA:69,6,0,0
7689
+ BRDA:69,6,1,0
7690
+ BRDA:99,7,0,0
7691
+ BRDA:99,7,1,3
7692
+ BRDA:122,8,0,0
7693
+ BRDA:122,8,1,0
7694
+ BRDA:128,9,0,0
7695
+ BRDA:128,9,1,4
7696
+ BRDA:128,10,0,4
7697
+ BRDA:128,10,1,4
7698
+ BRDA:156,11,0,29
7699
+ BRDA:156,11,1,26
7700
+ BRDA:157,12,0,29
7701
+ BRDA:157,12,1,0
7702
+ BRDA:160,13,0,0
7703
+ BRDA:160,13,1,29
7704
+ BRDA:160,14,0,29
7705
+ BRDA:160,14,1,26
7706
+ BRDA:165,15,0,0
7707
+ BRDA:165,15,1,1
7708
+ BRDA:165,16,0,1
7709
+ BRDA:165,16,1,0
7710
+ BRF:34
7668
7711
  BRH:16
7669
7712
  end_of_record
7670
7713
  TN:
@@ -189,7 +189,7 @@ const fetchAppPackage = (ctx) => __awaiter(void 0, void 0, void 0, function* ()
189
189
  application,
190
190
  screens,
191
191
  layouts,
192
- clientLibPath: (0, utilities_1.clientLibraryPath)(ctx.params.appId, application.version),
192
+ clientLibPath: (0, utilities_1.clientLibraryPath)(ctx.params.appId, application.version, ctx),
193
193
  };
194
194
  });
195
195
  exports.fetchAppPackage = fetchAppPackage;
@@ -13,8 +13,8 @@ const env = require("../../environment");
13
13
  const { checkSlashesInUrl } = require("../../utilities");
14
14
  const { request } = require("../../utilities/workerRequests");
15
15
  const { clearLock } = require("../../utilities/redis");
16
- const { Replication, getProdAppID } = require("@budibase/backend-core/db");
17
- const { DocumentTypes } = require("../../db/utils");
16
+ const { Replication, getProdAppID, dangerousGetDB, } = require("@budibase/backend-core/db");
17
+ const { DocumentTypes, getRowParams } = require("../../db/utils");
18
18
  const { app: appCache } = require("@budibase/backend-core/cache");
19
19
  const { getProdAppDB, getAppDB } = require("@budibase/backend-core/context");
20
20
  const { events } = require("@budibase/backend-core");
@@ -129,3 +129,41 @@ exports.getBudibaseVersion = (ctx) => __awaiter(void 0, void 0, void 0, function
129
129
  };
130
130
  yield events.installation.versionChecked(version);
131
131
  });
132
+ // TODO: remove as part of beta program
133
+ exports.checkBetaAccess = (ctx) => __awaiter(void 0, void 0, void 0, function* () {
134
+ // go to the cloud platform if running self hosted
135
+ if (env.SELF_HOSTED || !env.MULTI_TENANCY) {
136
+ let baseUrl = "";
137
+ if (env.ACCOUNT_PORTAL_URL) {
138
+ baseUrl = env.ACCOUNT_PORTAL_URL.replace("account.", "");
139
+ }
140
+ else {
141
+ baseUrl = "https://budibase.app";
142
+ }
143
+ const response = yield fetch(`${baseUrl}/api/beta/access?email=${ctx.query.email}`);
144
+ const json = yield response.json();
145
+ ctx.body = json;
146
+ return;
147
+ }
148
+ const userToCheck = ctx.query.email;
149
+ const BETA_USERS_DB = "app_bb_f9b77d06b9db4e3ca185476ab87a2364";
150
+ const BETA_USERS_TABLE = "ta_8c2c6df1c03f49cfb6340e85e066dd15";
151
+ try {
152
+ const db = dangerousGetDB(BETA_USERS_DB);
153
+ const betaUsers = (yield db.allDocs(getRowParams(BETA_USERS_TABLE, null, {
154
+ include_docs: true,
155
+ }))).rows.map(row => row.doc);
156
+ let access = false;
157
+ for (let betaUser of betaUsers) {
158
+ if (betaUser["Email address"].trim() === userToCheck) {
159
+ access = true;
160
+ break;
161
+ }
162
+ }
163
+ ctx.body = { access };
164
+ }
165
+ catch (err) {
166
+ console.error(err);
167
+ ctx.body = { access: false };
168
+ }
169
+ });
@@ -21,8 +21,11 @@ const { upload } = require("../../../utilities/fileSystem");
21
21
  const { attachmentsRelativeURL } = require("../../../utilities");
22
22
  const { DocumentTypes, isDevAppID } = require("../../../db/utils");
23
23
  const { getAppDB, getAppId } = require("@budibase/backend-core/context");
24
+ const { setCookie, clearCookie } = require("@budibase/backend-core/utils");
24
25
  const AWS = require("aws-sdk");
25
26
  const { events } = require("@budibase/backend-core");
27
+ const fs = require("fs");
28
+ const { downloadTarballDirect, } = require("../../../utilities/fileSystem/utilities");
26
29
  function prepareUpload({ s3Key, bucket, metadata, file }) {
27
30
  return __awaiter(this, void 0, void 0, function* () {
28
31
  const response = yield upload({
@@ -42,9 +45,35 @@ function prepareUpload({ s3Key, bucket, metadata, file }) {
42
45
  };
43
46
  });
44
47
  }
48
+ exports.toggleBetaUiFeature = function (ctx) {
49
+ return __awaiter(this, void 0, void 0, function* () {
50
+ const cookieName = `beta:${ctx.params.feature}`;
51
+ if (ctx.cookies.get(cookieName)) {
52
+ clearCookie(ctx, cookieName);
53
+ ctx.body = {
54
+ message: `${ctx.params.feature} disabled`,
55
+ };
56
+ return;
57
+ }
58
+ let builderPath = resolve(TOP_LEVEL_PATH, "new_design_ui");
59
+ // // download it from S3
60
+ if (!fs.existsSync(builderPath)) {
61
+ fs.mkdirSync(builderPath);
62
+ }
63
+ yield downloadTarballDirect("https://cdn.budi.live/beta:design_ui/new_ui.tar.gz", builderPath);
64
+ setCookie(ctx, {}, cookieName);
65
+ ctx.body = {
66
+ message: `${ctx.params.feature} enabled`,
67
+ };
68
+ });
69
+ };
45
70
  exports.serveBuilder = function (ctx) {
46
71
  return __awaiter(this, void 0, void 0, function* () {
47
- let builderPath = resolve(TOP_LEVEL_PATH, "builder");
72
+ // Temporary: New Design UI
73
+ const designUiCookie = ctx.cookies.get("beta:design_ui");
74
+ // TODO: get this from the tmp Dir that we downloaded from MinIO
75
+ const uiPath = designUiCookie ? "new_design_ui" : "builder";
76
+ let builderPath = resolve(TOP_LEVEL_PATH, uiPath);
48
77
  yield send(ctx, ctx.file, { root: builderPath });
49
78
  if (!ctx.file.includes("assets/")) {
50
79
  yield events.serve.servedBuilder();
@@ -80,7 +109,7 @@ exports.serveApp = function (ctx) {
80
109
  title: appInfo.name,
81
110
  production: env.isProd(),
82
111
  appId,
83
- clientLibPath: clientLibraryPath(appId, appInfo.version),
112
+ clientLibPath: clientLibraryPath(appId, appInfo.version, ctx),
84
113
  });
85
114
  const appHbs = loadHandlebarsFile(`${__dirname}/templates/app.hbs`);
86
115
  ctx.body = yield processString(appHbs, {
@@ -18,5 +18,6 @@ if (env.isDev() || env.isTest()) {
18
18
  router
19
19
  .get("/api/dev/version", authorized(BUILDER), controller.getBudibaseVersion)
20
20
  .delete("/api/dev/:appId/lock", authorized(BUILDER), controller.clearLock)
21
- .post("/api/dev/:appId/revert", authorized(BUILDER), controller.revert);
21
+ .post("/api/dev/:appId/revert", authorized(BUILDER), controller.revert)
22
+ .get("/api/beta/access", controller.checkBetaAccess);
22
23
  module.exports = router;
@@ -68,6 +68,7 @@ router
68
68
  // TODO: for now this builder endpoint is not authorized/secured, will need to be
69
69
  .get("/builder/:file*", controller.serveBuilder)
70
70
  .post("/api/attachments/process", (0, authorized_1.default)(permissions_1.BUILDER), controller.uploadFile)
71
+ .post("/api/beta/:feature", controller.toggleBetaUiFeature)
71
72
  .post("/api/attachments/:tableId/upload", (0, resourceId_1.paramResource)("tableId"), (0, authorized_1.default)(permissions_1.PermissionTypes.TABLE, permissions_1.PermissionLevels.WRITE), controller.uploadFile)
72
73
  .get("/:appId/:path*", controller.serveApp)
73
74
  .get("/app/:appUrl/:path*", controller.serveApp)
@@ -56,7 +56,8 @@ module.exports = {
56
56
  SALT_ROUNDS: process.env.SALT_ROUNDS,
57
57
  LOGGER: process.env.LOGGER,
58
58
  LOG_LEVEL: process.env.LOG_LEVEL,
59
- AUTOMATION_MAX_ITERATIONS: process.env.AUTOMATION_MAX_ITERATIONS,
59
+ ACCOUNT_PORTAL_URL: process.env.ACCOUNT_PORTAL_URL,
60
+ AUTOMATION_MAX_ITERATIONS: parseIntSafe(process.env.AUTOMATION_MAX_ITERATIONS) || 200,
60
61
  SENDGRID_API_KEY: process.env.SENDGRID_API_KEY,
61
62
  DYNAMO_ENDPOINT: process.env.DYNAMO_ENDPOINT,
62
63
  QUERY_THREAD_TIMEOUT: parseIntSafe(process.env.QUERY_THREAD_TIMEOUT),
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.212",
4
+ "version": "1.0.215",
5
5
  "description": "Budibase Web Server",
6
6
  "main": "src/index.ts",
7
7
  "repository": {
@@ -77,10 +77,10 @@
77
77
  "license": "GPL-3.0",
78
78
  "dependencies": {
79
79
  "@apidevtools/swagger-parser": "10.0.3",
80
- "@budibase/backend-core": "^1.0.212",
81
- "@budibase/client": "^1.0.212",
82
- "@budibase/pro": "1.0.212",
83
- "@budibase/string-templates": "^1.0.212",
80
+ "@budibase/backend-core": "^1.0.215",
81
+ "@budibase/client": "^1.0.215",
82
+ "@budibase/pro": "1.0.215",
83
+ "@budibase/string-templates": "^1.0.215",
84
84
  "@bull-board/api": "3.7.0",
85
85
  "@bull-board/koa": "3.9.4",
86
86
  "@elastic/elasticsearch": "7.10.0",
@@ -150,7 +150,7 @@
150
150
  "@babel/core": "7.17.4",
151
151
  "@babel/preset-env": "7.16.11",
152
152
  "@budibase/standard-components": "^0.9.139",
153
- "@budibase/types": "^1.0.212",
153
+ "@budibase/types": "^1.0.215",
154
154
  "@jest/test-sequencer": "24.9.0",
155
155
  "@types/apidoc": "0.50.0",
156
156
  "@types/bson": "4.2.0",