@budibase/worker 2.1.43-alpha.11 → 2.1.43-alpha.13

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 (107) hide show
  1. package/coverage/clover.xml +386 -376
  2. package/coverage/coverage-final.json +9 -9
  3. package/coverage/lcov-report/index.html +23 -23
  4. package/coverage/lcov-report/src/api/controllers/global/auth.ts.html +1 -1
  5. package/coverage/lcov-report/src/api/controllers/global/configs.ts.html +1 -1
  6. package/coverage/lcov-report/src/api/controllers/global/email.ts.html +1 -1
  7. package/coverage/lcov-report/src/api/controllers/global/index.html +10 -10
  8. package/coverage/lcov-report/src/api/controllers/global/license.ts.html +1 -1
  9. package/coverage/lcov-report/src/api/controllers/global/roles.ts.html +1 -1
  10. package/coverage/lcov-report/src/api/controllers/global/self.ts.html +1 -1
  11. package/coverage/lcov-report/src/api/controllers/global/templates.ts.html +1 -1
  12. package/coverage/lcov-report/src/api/controllers/global/users.ts.html +14 -11
  13. package/coverage/lcov-report/src/api/controllers/global/workspaces.ts.html +1 -1
  14. package/coverage/lcov-report/src/api/controllers/system/accounts.ts.html +1 -1
  15. package/coverage/lcov-report/src/api/controllers/system/environment.ts.html +1 -1
  16. package/coverage/lcov-report/src/api/controllers/system/index.html +1 -1
  17. package/coverage/lcov-report/src/api/controllers/system/migrations.ts.html +1 -1
  18. package/coverage/lcov-report/src/api/controllers/system/restore.ts.html +1 -1
  19. package/coverage/lcov-report/src/api/controllers/system/status.ts.html +1 -1
  20. package/coverage/lcov-report/src/api/controllers/system/tenants.ts.html +1 -1
  21. package/coverage/lcov-report/src/api/index.html +1 -1
  22. package/coverage/lcov-report/src/api/index.ts.html +7 -7
  23. package/coverage/lcov-report/src/api/routes/global/auth.ts.html +1 -1
  24. package/coverage/lcov-report/src/api/routes/global/configs.ts.html +1 -1
  25. package/coverage/lcov-report/src/api/routes/global/email.ts.html +1 -1
  26. package/coverage/lcov-report/src/api/routes/global/index.html +1 -1
  27. package/coverage/lcov-report/src/api/routes/global/license.ts.html +1 -1
  28. package/coverage/lcov-report/src/api/routes/global/roles.ts.html +1 -1
  29. package/coverage/lcov-report/src/api/routes/global/self.ts.html +1 -1
  30. package/coverage/lcov-report/src/api/routes/global/templates.ts.html +1 -1
  31. package/coverage/lcov-report/src/api/routes/global/users.ts.html +3 -3
  32. package/coverage/lcov-report/src/api/routes/global/workspaces.ts.html +1 -1
  33. package/coverage/lcov-report/src/api/routes/index.html +1 -1
  34. package/coverage/lcov-report/src/api/routes/index.ts.html +1 -1
  35. package/coverage/lcov-report/src/api/routes/system/accounts.ts.html +1 -1
  36. package/coverage/lcov-report/src/api/routes/system/environment.ts.html +1 -1
  37. package/coverage/lcov-report/src/api/routes/system/index.html +1 -1
  38. package/coverage/lcov-report/src/api/routes/system/migrations.ts.html +1 -1
  39. package/coverage/lcov-report/src/api/routes/system/restore.ts.html +1 -1
  40. package/coverage/lcov-report/src/api/routes/system/status.ts.html +1 -1
  41. package/coverage/lcov-report/src/api/routes/system/tenants.ts.html +1 -1
  42. package/coverage/lcov-report/src/api/routes/validation/index.html +1 -1
  43. package/coverage/lcov-report/src/api/routes/validation/index.ts.html +1 -1
  44. package/coverage/lcov-report/src/api/routes/validation/users.ts.html +1 -1
  45. package/coverage/lcov-report/src/constants/index.html +1 -1
  46. package/coverage/lcov-report/src/constants/index.ts.html +1 -1
  47. package/coverage/lcov-report/src/constants/templates/index.html +1 -1
  48. package/coverage/lcov-report/src/constants/templates/index.ts.html +1 -1
  49. package/coverage/lcov-report/src/db/index.html +1 -1
  50. package/coverage/lcov-report/src/db/index.ts.html +1 -1
  51. package/coverage/lcov-report/src/environment.ts.html +2 -2
  52. package/coverage/lcov-report/src/index.html +1 -1
  53. package/coverage/lcov-report/src/index.ts.html +1 -1
  54. package/coverage/lcov-report/src/middleware/cloudRestricted.ts.html +1 -1
  55. package/coverage/lcov-report/src/middleware/index.html +1 -1
  56. package/coverage/lcov-report/src/migrations/functions/globalInfoSyncUsers.ts.html +1 -1
  57. package/coverage/lcov-report/src/migrations/functions/index.html +1 -1
  58. package/coverage/lcov-report/src/migrations/index.html +1 -1
  59. package/coverage/lcov-report/src/migrations/index.ts.html +1 -1
  60. package/coverage/lcov-report/src/sdk/accounts/accounts.ts.html +1 -1
  61. package/coverage/lcov-report/src/sdk/accounts/index.html +1 -1
  62. package/coverage/lcov-report/src/sdk/accounts/index.ts.html +1 -1
  63. package/coverage/lcov-report/src/sdk/index.html +1 -1
  64. package/coverage/lcov-report/src/sdk/index.ts.html +1 -1
  65. package/coverage/lcov-report/src/sdk/users/events.ts.html +43 -43
  66. package/coverage/lcov-report/src/sdk/users/index.html +22 -22
  67. package/coverage/lcov-report/src/sdk/users/index.ts.html +1 -1
  68. package/coverage/lcov-report/src/sdk/users/users.ts.html +112 -73
  69. package/coverage/lcov-report/src/tests/TestConfiguration.ts.html +12 -12
  70. package/coverage/lcov-report/src/tests/api/accounts.ts.html +1 -1
  71. package/coverage/lcov-report/src/tests/api/auth.ts.html +1 -1
  72. package/coverage/lcov-report/src/tests/api/base.ts.html +1 -1
  73. package/coverage/lcov-report/src/tests/api/configs.ts.html +1 -1
  74. package/coverage/lcov-report/src/tests/api/email.ts.html +1 -1
  75. package/coverage/lcov-report/src/tests/api/environment.ts.html +1 -1
  76. package/coverage/lcov-report/src/tests/api/index.html +5 -5
  77. package/coverage/lcov-report/src/tests/api/index.ts.html +1 -1
  78. package/coverage/lcov-report/src/tests/api/migrations.ts.html +1 -1
  79. package/coverage/lcov-report/src/tests/api/restore.ts.html +1 -1
  80. package/coverage/lcov-report/src/tests/api/self.ts.html +1 -1
  81. package/coverage/lcov-report/src/tests/api/status.ts.html +1 -1
  82. package/coverage/lcov-report/src/tests/api/tenants.ts.html +1 -1
  83. package/coverage/lcov-report/src/tests/api/users.ts.html +7 -7
  84. package/coverage/lcov-report/src/tests/controllers.ts.html +1 -1
  85. package/coverage/lcov-report/src/tests/index.html +1 -1
  86. package/coverage/lcov-report/src/tests/index.ts.html +1 -1
  87. package/coverage/lcov-report/src/tests/mocks/email.js.html +1 -1
  88. package/coverage/lcov-report/src/tests/mocks/index.html +1 -1
  89. package/coverage/lcov-report/src/tests/mocks/index.ts.html +1 -1
  90. package/coverage/lcov-report/src/tests/structures/configs.ts.html +1 -1
  91. package/coverage/lcov-report/src/tests/structures/groups.ts.html +1 -1
  92. package/coverage/lcov-report/src/tests/structures/index.html +1 -1
  93. package/coverage/lcov-report/src/tests/structures/index.ts.html +1 -1
  94. package/coverage/lcov-report/src/tests/structures/users.ts.html +1 -1
  95. package/coverage/lcov-report/src/utilities/appService.ts.html +5 -5
  96. package/coverage/lcov-report/src/utilities/email.ts.html +1 -1
  97. package/coverage/lcov-report/src/utilities/fileSystem.ts.html +1 -1
  98. package/coverage/lcov-report/src/utilities/index.html +1 -1
  99. package/coverage/lcov-report/src/utilities/index.ts.html +1 -1
  100. package/coverage/lcov-report/src/utilities/redis.ts.html +1 -1
  101. package/coverage/lcov-report/src/utilities/templates.ts.html +1 -1
  102. package/coverage/lcov-report/src/utilities/users.ts.html +1 -1
  103. package/coverage/lcov.info +659 -640
  104. package/package.json +6 -6
  105. package/src/api/controllers/global/users.ts +2 -1
  106. package/src/api/routes/global/tests/users.spec.ts +18 -1
  107. package/src/sdk/users/users.ts +28 -15
@@ -1,14 +1,14 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
- <coverage generated="1670411778334" clover="3.2.0">
3
- <project timestamp="1670411778334" name="All files">
4
- <metrics statements="1854" coveredstatements="1481" conditionals="571" coveredconditionals="399" methods="426" coveredmethods="321" elements="2851" coveredelements="2201" complexity="0" loc="1854" ncloc="1854" packages="22" files="77" classes="77"/>
2
+ <coverage generated="1670491931610" clover="3.2.0">
3
+ <project timestamp="1670491931610" name="All files">
4
+ <metrics statements="1864" coveredstatements="1493" conditionals="580" coveredconditionals="413" methods="426" coveredmethods="321" elements="2870" coveredelements="2227" complexity="0" loc="1864" ncloc="1864" packages="22" files="77" classes="77"/>
5
5
  <package name="src">
6
6
  <metrics statements="78" coveredstatements="52" conditionals="26" coveredconditionals="17" methods="16" coveredmethods="7"/>
7
7
  <file name="environment.ts" path="/home/runner/work/budibase/budibase/packages/worker/src/environment.ts">
8
8
  <metrics statements="19" coveredstatements="15" conditionals="20" coveredconditionals="16" methods="5" coveredmethods="5"/>
9
9
  <line num="1" count="17" type="stmt"/>
10
10
  <line num="4" count="52" type="stmt"/>
11
- <line num="8" count="150" type="stmt"/>
11
+ <line num="8" count="151" type="stmt"/>
12
12
  <line num="15" count="17" type="stmt"/>
13
13
  <line num="16" count="17" type="cond" truecount="3" falsecount="1"/>
14
14
  <line num="17" count="0" type="stmt"/>
@@ -105,14 +105,14 @@
105
105
  <line num="107" count="17" type="stmt"/>
106
106
  <line num="108" count="17" type="stmt"/>
107
107
  <line num="121" count="0" type="stmt"/>
108
- <line num="128" count="106" type="cond" truecount="1" falsecount="0"/>
108
+ <line num="128" count="109" type="cond" truecount="1" falsecount="0"/>
109
109
  <line num="129" count="24" type="stmt"/>
110
- <line num="131" count="82" type="cond" truecount="1" falsecount="0"/>
110
+ <line num="131" count="85" type="cond" truecount="1" falsecount="0"/>
111
111
  <line num="135" count="2" type="stmt"/>
112
- <line num="137" count="80" type="stmt"/>
113
- <line num="142" count="104" type="stmt"/>
114
- <line num="143" count="104" type="stmt"/>
115
- <line num="144" count="104" type="stmt"/>
112
+ <line num="137" count="83" type="stmt"/>
113
+ <line num="142" count="107" type="stmt"/>
114
+ <line num="143" count="107" type="stmt"/>
115
+ <line num="144" count="107" type="stmt"/>
116
116
  <line num="146" count="14" type="stmt"/>
117
117
  <line num="147" count="14" type="cond" truecount="1" falsecount="2"/>
118
118
  <line num="148" count="14" type="stmt"/>
@@ -126,7 +126,7 @@
126
126
  </file>
127
127
  </package>
128
128
  <package name="src.api.controllers.global">
129
- <metrics statements="607" coveredstatements="359" conditionals="172" coveredconditionals="92" methods="137" coveredmethods="69"/>
129
+ <metrics statements="608" coveredstatements="360" conditionals="172" coveredconditionals="92" methods="137" coveredmethods="69"/>
130
130
  <file name="auth.ts" path="/home/runner/work/budibase/budibase/packages/worker/src/api/controllers/global/auth.ts">
131
131
  <metrics statements="122" coveredstatements="75" conditionals="22" coveredconditionals="8" methods="41" coveredmethods="20"/>
132
132
  <line num="1" count="17" type="stmt"/>
@@ -624,113 +624,114 @@
624
624
  <line num="76" count="0" type="stmt"/>
625
625
  </file>
626
626
  <file name="users.ts" path="/home/runner/work/budibase/budibase/packages/worker/src/api/controllers/global/users.ts">
627
- <metrics statements="106" coveredstatements="78" conditionals="40" coveredconditionals="23" methods="33" coveredmethods="25"/>
627
+ <metrics statements="107" coveredstatements="79" conditionals="40" coveredconditionals="23" methods="33" coveredmethods="25"/>
628
628
  <line num="1" count="17" type="stmt"/>
629
629
  <line num="2" count="17" type="stmt"/>
630
630
  <line num="3" count="17" type="stmt"/>
631
631
  <line num="14" count="17" type="stmt"/>
632
632
  <line num="21" count="17" type="stmt"/>
633
633
  <line num="23" count="17" type="stmt"/>
634
- <line num="25" count="82" type="stmt"/>
635
- <line num="26" count="82" type="stmt"/>
636
- <line num="27" count="82" type="stmt"/>
637
- <line num="29" count="5" type="cond" truecount="2" falsecount="0"/>
638
- <line num="33" count="17" type="stmt"/>
639
- <line num="34" count="3" type="cond" truecount="4" falsecount="1"/>
640
- <line num="35" count="1" type="stmt"/>
641
- <line num="37" count="2" type="stmt"/>
642
- <line num="40" count="17" type="stmt"/>
643
- <line num="41" count="6" type="cond" truecount="2" falsecount="1"/>
644
- <line num="42" count="0" type="stmt"/>
645
- <line num="46" count="6" type="stmt"/>
646
- <line num="49" count="17" type="stmt"/>
647
- <line num="50" count="9" type="stmt"/>
634
+ <line num="25" count="83" type="stmt"/>
635
+ <line num="26" count="83" type="stmt"/>
636
+ <line num="27" count="83" type="stmt"/>
637
+ <line num="28" count="83" type="stmt"/>
638
+ <line num="30" count="5" type="cond" truecount="2" falsecount="0"/>
639
+ <line num="34" count="17" type="stmt"/>
640
+ <line num="35" count="3" type="cond" truecount="4" falsecount="1"/>
641
+ <line num="36" count="1" type="stmt"/>
642
+ <line num="38" count="2" type="stmt"/>
643
+ <line num="41" count="17" type="stmt"/>
644
+ <line num="42" count="6" type="cond" truecount="2" falsecount="1"/>
645
+ <line num="43" count="0" type="stmt"/>
646
+ <line num="47" count="6" type="stmt"/>
647
+ <line num="50" count="17" type="stmt"/>
648
648
  <line num="51" count="9" type="stmt"/>
649
- <line num="53" count="9" type="stmt"/>
650
- <line num="54" count="9" type="cond" truecount="1" falsecount="0"/>
651
- <line num="55" count="6" type="stmt"/>
652
- <line num="57" count="9" type="cond" truecount="1" falsecount="0"/>
653
- <line num="58" count="3" type="stmt"/>
654
- <line num="61" count="1" type="cond" truecount="6" falsecount="2"/>
655
- <line num="63" count="8" type="stmt"/>
656
- <line num="66" count="17" type="stmt"/>
657
- <line num="67" count="12" type="cond" truecount="1" falsecount="1"/>
658
- <line num="70" count="17" type="stmt"/>
659
- <line num="71" count="6" type="stmt"/>
660
- <line num="73" count="6" type="stmt"/>
661
- <line num="75" count="6" type="stmt"/>
662
- <line num="77" count="6" type="stmt"/>
663
- <line num="79" count="6" type="cond" truecount="0" falsecount="1"/>
664
- <line num="80" count="0" type="stmt"/>
665
- <line num="83" count="6" type="stmt"/>
666
- <line num="84" count="6" type="cond" truecount="0" falsecount="1"/>
667
- <line num="85" count="0" type="stmt"/>
668
- <line num="91" count="6" type="stmt"/>
669
- <line num="104" count="6" type="stmt"/>
670
- <line num="107" count="6" type="stmt"/>
649
+ <line num="52" count="9" type="stmt"/>
650
+ <line num="54" count="9" type="stmt"/>
651
+ <line num="55" count="9" type="cond" truecount="1" falsecount="0"/>
652
+ <line num="56" count="6" type="stmt"/>
653
+ <line num="58" count="9" type="cond" truecount="1" falsecount="0"/>
654
+ <line num="59" count="3" type="stmt"/>
655
+ <line num="62" count="1" type="cond" truecount="6" falsecount="2"/>
656
+ <line num="64" count="8" type="stmt"/>
657
+ <line num="67" count="17" type="stmt"/>
658
+ <line num="68" count="12" type="cond" truecount="1" falsecount="1"/>
659
+ <line num="71" count="17" type="stmt"/>
660
+ <line num="72" count="6" type="stmt"/>
661
+ <line num="74" count="6" type="stmt"/>
662
+ <line num="76" count="6" type="stmt"/>
663
+ <line num="78" count="6" type="stmt"/>
664
+ <line num="80" count="6" type="cond" truecount="0" falsecount="1"/>
665
+ <line num="81" count="0" type="stmt"/>
666
+ <line num="84" count="6" type="stmt"/>
667
+ <line num="85" count="6" type="cond" truecount="0" falsecount="1"/>
668
+ <line num="86" count="0" type="stmt"/>
669
+ <line num="92" count="6" type="stmt"/>
670
+ <line num="105" count="6" type="stmt"/>
671
671
  <line num="108" count="6" type="stmt"/>
672
- <line num="115" count="6" type="cond" truecount="3" falsecount="0"/>
673
- <line num="116" count="6" type="stmt"/>
674
- <line num="118" count="6" type="stmt"/>
675
- <line num="120" count="6" type="stmt"/>
676
- <line num="122" count="0" type="cond" truecount="0" falsecount="2"/>
677
- <line num="127" count="17" type="stmt"/>
678
- <line num="128" count="0" type="stmt"/>
672
+ <line num="109" count="6" type="stmt"/>
673
+ <line num="116" count="6" type="cond" truecount="3" falsecount="0"/>
674
+ <line num="117" count="6" type="stmt"/>
675
+ <line num="119" count="6" type="stmt"/>
676
+ <line num="121" count="6" type="stmt"/>
677
+ <line num="123" count="0" type="cond" truecount="0" falsecount="2"/>
678
+ <line num="128" count="17" type="stmt"/>
679
679
  <line num="129" count="0" type="stmt"/>
680
680
  <line num="130" count="0" type="stmt"/>
681
- <line num="132" count="0" type="cond" truecount="0" falsecount="2"/>
682
- <line num="136" count="17" type="stmt"/>
683
- <line num="137" count="5" type="stmt"/>
684
- <line num="138" count="5" type="cond" truecount="1" falsecount="0"/>
685
- <line num="139" count="1" type="stmt"/>
686
- <line num="142" count="4" type="stmt"/>
687
- <line num="144" count="3" type="stmt"/>
688
- <line num="149" count="17" type="stmt"/>
689
- <line num="150" count="0" type="stmt"/>
681
+ <line num="131" count="0" type="stmt"/>
682
+ <line num="133" count="0" type="cond" truecount="0" falsecount="2"/>
683
+ <line num="137" count="17" type="stmt"/>
684
+ <line num="138" count="5" type="stmt"/>
685
+ <line num="139" count="5" type="cond" truecount="1" falsecount="0"/>
686
+ <line num="140" count="1" type="stmt"/>
687
+ <line num="143" count="4" type="stmt"/>
688
+ <line num="145" count="3" type="stmt"/>
689
+ <line num="150" count="17" type="stmt"/>
690
690
  <line num="151" count="0" type="stmt"/>
691
- <line num="153" count="0" type="stmt"/>
692
- <line num="154" count="0" type="cond" truecount="0" falsecount="1"/>
693
- <line num="155" count="0" type="stmt"/>
694
- <line num="158" count="0" type="stmt"/>
695
- <line num="162" count="17" type="stmt"/>
696
- <line num="163" count="0" type="stmt"/>
697
- <line num="165" count="0" type="stmt"/>
698
- <line num="166" count="0" type="cond" truecount="0" falsecount="1"/>
699
- <line num="167" count="0" type="stmt"/>
700
- <line num="170" count="0" type="stmt"/>
701
- <line num="174" count="17" type="stmt"/>
702
- <line num="175" count="6" type="stmt"/>
703
- <line num="178" count="17" type="stmt"/>
704
- <line num="179" count="0" type="stmt"/>
691
+ <line num="152" count="0" type="stmt"/>
692
+ <line num="154" count="0" type="stmt"/>
693
+ <line num="155" count="0" type="cond" truecount="0" falsecount="1"/>
694
+ <line num="156" count="0" type="stmt"/>
695
+ <line num="159" count="0" type="stmt"/>
696
+ <line num="163" count="17" type="stmt"/>
697
+ <line num="164" count="0" type="stmt"/>
698
+ <line num="166" count="0" type="stmt"/>
699
+ <line num="167" count="0" type="cond" truecount="0" falsecount="1"/>
700
+ <line num="168" count="0" type="stmt"/>
701
+ <line num="171" count="0" type="stmt"/>
702
+ <line num="175" count="17" type="stmt"/>
703
+ <line num="176" count="8" type="stmt"/>
704
+ <line num="179" count="17" type="stmt"/>
705
705
  <line num="180" count="0" type="stmt"/>
706
- <line num="181" count="0" type="cond" truecount="0" falsecount="2"/>
707
- <line num="182" count="0" type="stmt"/>
708
- <line num="184" count="0" type="stmt"/>
709
- <line num="188" count="17" type="stmt"/>
710
- <line num="189" count="3" type="stmt"/>
706
+ <line num="181" count="0" type="stmt"/>
707
+ <line num="182" count="0" type="cond" truecount="0" falsecount="2"/>
708
+ <line num="183" count="0" type="stmt"/>
709
+ <line num="185" count="0" type="stmt"/>
710
+ <line num="189" count="17" type="stmt"/>
711
711
  <line num="190" count="3" type="stmt"/>
712
- <line num="193" count="3" type="cond" truecount="1" falsecount="0"/>
713
- <line num="194" count="1" type="stmt"/>
714
- <line num="195" count="1" type="cond" truecount="1" falsecount="1"/>
715
- <line num="196" count="1" type="stmt"/>
716
- <line num="198" count="0" type="stmt"/>
717
- <line num="202" count="2" type="stmt"/>
718
- <line num="207" count="17" type="stmt"/>
719
- <line num="208" count="2" type="stmt"/>
712
+ <line num="191" count="3" type="stmt"/>
713
+ <line num="194" count="3" type="cond" truecount="1" falsecount="0"/>
714
+ <line num="195" count="1" type="stmt"/>
715
+ <line num="196" count="1" type="cond" truecount="1" falsecount="1"/>
716
+ <line num="197" count="1" type="stmt"/>
717
+ <line num="199" count="0" type="stmt"/>
718
+ <line num="203" count="2" type="stmt"/>
719
+ <line num="208" count="17" type="stmt"/>
720
720
  <line num="209" count="2" type="stmt"/>
721
- <line num="212" count="17" type="stmt"/>
722
- <line num="213" count="1" type="stmt"/>
721
+ <line num="210" count="2" type="stmt"/>
722
+ <line num="213" count="17" type="stmt"/>
723
723
  <line num="214" count="1" type="stmt"/>
724
- <line num="216" count="1" type="stmt"/>
724
+ <line num="215" count="1" type="stmt"/>
725
725
  <line num="217" count="1" type="stmt"/>
726
726
  <line num="218" count="1" type="stmt"/>
727
- <line num="225" count="1" type="stmt"/>
727
+ <line num="219" count="1" type="stmt"/>
728
728
  <line num="226" count="1" type="stmt"/>
729
729
  <line num="227" count="1" type="stmt"/>
730
730
  <line num="228" count="1" type="stmt"/>
731
- <line num="231" count="0" type="cond" truecount="0" falsecount="1"/>
732
- <line num="233" count="0" type="stmt"/>
733
- <line num="235" count="0" type="stmt"/>
731
+ <line num="229" count="1" type="stmt"/>
732
+ <line num="232" count="0" type="cond" truecount="0" falsecount="1"/>
733
+ <line num="234" count="0" type="stmt"/>
734
+ <line num="236" count="0" type="stmt"/>
734
735
  </file>
735
736
  <file name="workspaces.ts" path="/home/runner/work/budibase/budibase/packages/worker/src/api/controllers/global/workspaces.ts">
736
737
  <metrics statements="26" coveredstatements="5" conditionals="1" coveredconditionals="0" methods="5" coveredmethods="0"/>
@@ -956,9 +957,9 @@
956
957
  <line num="25" count="17" type="stmt"/>
957
958
  <line num="33" count="17" type="stmt"/>
958
959
  <line num="41" count="17" type="stmt"/>
959
- <line num="42" count="22" type="cond" truecount="2" falsecount="0"/>
960
+ <line num="42" count="23" type="cond" truecount="2" falsecount="0"/>
960
961
  <line num="43" count="11" type="stmt"/>
961
- <line num="45" count="11" type="stmt"/>
962
+ <line num="45" count="12" type="stmt"/>
962
963
  <line num="51" count="17" type="stmt"/>
963
964
  <line num="57" count="17" type="stmt"/>
964
965
  <line num="116" count="17" type="stmt"/>
@@ -1248,9 +1249,9 @@
1248
1249
  </file>
1249
1250
  </package>
1250
1251
  <package name="src.sdk.users">
1251
- <metrics statements="319" coveredstatements="283" conditionals="112" coveredconditionals="92" methods="76" coveredmethods="67"/>
1252
+ <metrics statements="328" coveredstatements="294" conditionals="121" coveredconditionals="103" methods="76" coveredmethods="67"/>
1252
1253
  <file name="events.ts" path="/home/runner/work/budibase/budibase/packages/worker/src/sdk/users/events.ts">
1253
- <metrics statements="69" coveredstatements="67" conditionals="37" coveredconditionals="35" methods="18" coveredmethods="18"/>
1254
+ <metrics statements="69" coveredstatements="68" conditionals="37" coveredconditionals="36" methods="18" coveredmethods="18"/>
1254
1255
  <line num="1" count="17" type="stmt"/>
1255
1256
  <line num="2" count="17" type="stmt"/>
1256
1257
  <line num="5" count="17" type="stmt"/>
@@ -1260,61 +1261,61 @@
1260
1261
  <line num="12" count="6" type="cond" truecount="1" falsecount="0"/>
1261
1262
  <line num="13" count="2" type="stmt"/>
1262
1263
  <line num="17" count="17" type="stmt"/>
1263
- <line num="21" count="91" type="stmt"/>
1264
- <line num="22" count="91" type="stmt"/>
1264
+ <line num="21" count="92" type="stmt"/>
1265
+ <line num="22" count="92" type="stmt"/>
1265
1266
  <line num="24" count="10" type="cond" truecount="3" falsecount="0"/>
1266
1267
  <line num="25" count="9" type="stmt"/>
1267
1268
  <line num="30" count="17" type="stmt"/>
1268
- <line num="34" count="91" type="stmt"/>
1269
- <line num="35" count="91" type="cond" truecount="1" falsecount="0"/>
1269
+ <line num="34" count="92" type="stmt"/>
1270
+ <line num="35" count="92" type="cond" truecount="1" falsecount="0"/>
1270
1271
  <line num="36" count="81" type="stmt"/>
1271
- <line num="38" count="10" type="stmt"/>
1272
+ <line num="38" count="11" type="stmt"/>
1272
1273
  <line num="40" count="4" type="cond" truecount="3" falsecount="0"/>
1273
1274
  <line num="41" count="3" type="stmt"/>
1274
- <line num="46" count="91" type="stmt"/>
1275
- <line num="47" count="91" type="stmt"/>
1276
- <line num="48" count="91" type="cond" truecount="4" falsecount="0"/>
1277
- <line num="50" count="91" type="stmt"/>
1278
- <line num="51" count="91" type="stmt"/>
1275
+ <line num="46" count="92" type="stmt"/>
1276
+ <line num="47" count="92" type="stmt"/>
1277
+ <line num="48" count="92" type="cond" truecount="4" falsecount="0"/>
1278
+ <line num="50" count="92" type="stmt"/>
1279
+ <line num="51" count="92" type="stmt"/>
1279
1280
  <line num="54" count="17" type="stmt"/>
1280
- <line num="57" count="91" type="stmt"/>
1281
- <line num="58" count="91" type="stmt"/>
1282
- <line num="60" count="91" type="cond" truecount="3" falsecount="0"/>
1283
- <line num="61" count="91" type="stmt"/>
1284
- <line num="63" count="91" type="stmt"/>
1285
- <line num="65" count="91" type="cond" truecount="2" falsecount="0"/>
1286
- <line num="66" count="10" type="stmt"/>
1287
- <line num="68" count="10" type="cond" truecount="1" falsecount="0"/>
1281
+ <line num="57" count="92" type="stmt"/>
1282
+ <line num="58" count="92" type="stmt"/>
1283
+ <line num="60" count="92" type="cond" truecount="3" falsecount="0"/>
1284
+ <line num="61" count="92" type="stmt"/>
1285
+ <line num="63" count="92" type="stmt"/>
1286
+ <line num="65" count="92" type="cond" truecount="2" falsecount="0"/>
1287
+ <line num="66" count="11" type="stmt"/>
1288
+ <line num="68" count="11" type="cond" truecount="1" falsecount="0"/>
1288
1289
  <line num="69" count="2" type="stmt"/>
1289
- <line num="72" count="10" type="cond" truecount="1" falsecount="0"/>
1290
+ <line num="72" count="11" type="cond" truecount="1" falsecount="0"/>
1290
1291
  <line num="73" count="1" type="stmt"/>
1291
- <line num="76" count="10" type="cond" truecount="1" falsecount="0"/>
1292
+ <line num="76" count="11" type="cond" truecount="1" falsecount="0"/>
1292
1293
  <line num="81" count="1" type="stmt"/>
1293
1294
  <line num="84" count="81" type="stmt"/>
1294
- <line num="87" count="91" type="cond" truecount="1" falsecount="0"/>
1295
+ <line num="87" count="92" type="cond" truecount="1" falsecount="0"/>
1295
1296
  <line num="88" count="54" type="stmt"/>
1296
- <line num="91" count="91" type="cond" truecount="1" falsecount="0"/>
1297
+ <line num="91" count="92" type="cond" truecount="1" falsecount="0"/>
1297
1298
  <line num="92" count="46" type="stmt"/>
1298
- <line num="95" count="91" type="stmt"/>
1299
- <line num="98" count="117" type="cond" truecount="2" falsecount="0"/>
1300
- <line num="99" count="117" type="cond" truecount="2" falsecount="0"/>
1299
+ <line num="95" count="92" type="stmt"/>
1300
+ <line num="98" count="120" type="cond" truecount="2" falsecount="0"/>
1301
+ <line num="99" count="120" type="cond" truecount="2" falsecount="0"/>
1301
1302
  <line num="101" count="17" type="stmt"/>
1302
- <line num="102" count="91" type="stmt"/>
1303
+ <line num="102" count="92" type="stmt"/>
1303
1304
  <line num="105" count="17" type="stmt"/>
1304
- <line num="106" count="10" type="stmt"/>
1305
+ <line num="106" count="11" type="stmt"/>
1305
1306
  <line num="109" count="17" type="stmt"/>
1306
- <line num="110" count="91" type="stmt"/>
1307
+ <line num="110" count="92" type="stmt"/>
1307
1308
  <line num="113" count="17" type="stmt"/>
1308
- <line num="114" count="10" type="stmt"/>
1309
+ <line num="114" count="11" type="stmt"/>
1309
1310
  <line num="120" count="17" type="stmt"/>
1310
- <line num="126" count="182" type="cond" truecount="1" falsecount="0"/>
1311
+ <line num="126" count="184" type="cond" truecount="1" falsecount="0"/>
1311
1312
  <line num="127" count="82" type="stmt"/>
1312
- <line num="131" count="100" type="cond" truecount="2" falsecount="1"/>
1313
- <line num="132" count="0" type="stmt"/>
1313
+ <line num="131" count="102" type="cond" truecount="3" falsecount="0"/>
1314
+ <line num="132" count="2" type="stmt"/>
1314
1315
  <line num="136" count="100" type="stmt"/>
1315
1316
  <line num="142" count="17" type="stmt"/>
1316
- <line num="148" count="20" type="cond" truecount="1" falsecount="0"/>
1317
- <line num="149" count="3" type="stmt"/>
1317
+ <line num="148" count="22" type="cond" truecount="1" falsecount="0"/>
1318
+ <line num="149" count="5" type="stmt"/>
1318
1319
  <line num="153" count="17" type="cond" truecount="0" falsecount="1"/>
1319
1320
  <line num="154" count="0" type="stmt"/>
1320
1321
  <line num="158" count="17" type="cond" truecount="1" falsecount="0"/>
@@ -1326,256 +1327,265 @@
1326
1327
  <line num="1" count="17" type="stmt"/>
1327
1328
  </file>
1328
1329
  <file name="users.ts" path="/home/runner/work/budibase/budibase/packages/worker/src/sdk/users/users.ts">
1329
- <metrics statements="249" coveredstatements="215" conditionals="75" coveredconditionals="57" methods="58" coveredmethods="49"/>
1330
+ <metrics statements="258" coveredstatements="225" conditionals="84" coveredconditionals="67" methods="58" coveredmethods="49"/>
1330
1331
  <line num="1" count="17" type="stmt"/>
1331
1332
  <line num="2" count="17" type="stmt"/>
1332
1333
  <line num="3" count="17" type="stmt"/>
1333
1334
  <line num="4" count="17" type="stmt"/>
1334
1335
  <line num="19" count="17" type="stmt"/>
1335
- <line num="33" count="17" type="stmt"/>
1336
1336
  <line num="34" count="17" type="stmt"/>
1337
1337
  <line num="35" count="17" type="stmt"/>
1338
- <line num="37" count="17" type="stmt"/>
1339
- <line num="39" count="17" type="stmt"/>
1340
- <line num="40" count="0" type="stmt"/>
1338
+ <line num="36" count="17" type="stmt"/>
1339
+ <line num="38" count="17" type="stmt"/>
1340
+ <line num="40" count="17" type="stmt"/>
1341
1341
  <line num="41" count="0" type="stmt"/>
1342
- <line num="46" count="0" type="stmt"/>
1343
- <line num="49" count="17" type="stmt"/>
1344
- <line num="50" count="0" type="stmt"/>
1342
+ <line num="42" count="0" type="stmt"/>
1343
+ <line num="47" count="0" type="stmt"/>
1344
+ <line num="50" count="17" type="stmt"/>
1345
1345
  <line num="51" count="0" type="stmt"/>
1346
- <line num="56" count="17" type="cond" truecount="0" falsecount="1"/>
1347
- <line num="61" count="0" type="stmt"/>
1346
+ <line num="52" count="0" type="stmt"/>
1347
+ <line num="57" count="17" type="cond" truecount="0" falsecount="1"/>
1348
1348
  <line num="62" count="0" type="stmt"/>
1349
- <line num="64" count="0" type="stmt"/>
1350
- <line num="69" count="0" type="cond" truecount="0" falsecount="1"/>
1351
- <line num="70" count="0" type="stmt"/>
1352
- <line num="74" count="0" type="stmt"/>
1353
- <line num="76" count="0" type="cond" truecount="0" falsecount="2"/>
1354
- <line num="77" count="0" type="stmt"/>
1349
+ <line num="63" count="0" type="stmt"/>
1350
+ <line num="65" count="0" type="stmt"/>
1351
+ <line num="70" count="0" type="cond" truecount="0" falsecount="1"/>
1352
+ <line num="71" count="0" type="stmt"/>
1353
+ <line num="75" count="0" type="stmt"/>
1354
+ <line num="77" count="0" type="cond" truecount="0" falsecount="2"/>
1355
1355
  <line num="78" count="0" type="stmt"/>
1356
- <line num="79" count="0" type="cond" truecount="0" falsecount="2"/>
1357
- <line num="80" count="0" type="stmt"/>
1356
+ <line num="79" count="0" type="stmt"/>
1357
+ <line num="80" count="0" type="cond" truecount="0" falsecount="2"/>
1358
1358
  <line num="81" count="0" type="stmt"/>
1359
- <line num="84" count="0" type="stmt"/>
1359
+ <line num="82" count="0" type="stmt"/>
1360
1360
  <line num="85" count="0" type="stmt"/>
1361
- <line num="87" count="0" type="stmt"/>
1362
- <line num="97" count="17" type="stmt"/>
1363
- <line num="98" count="7" type="stmt"/>
1364
- <line num="99" count="7" type="stmt"/>
1365
- <line num="100" count="7" type="cond" truecount="1" falsecount="0"/>
1366
- <line num="101" count="7" type="stmt"/>
1367
- <line num="103" count="7" type="stmt"/>
1368
- <line num="111" count="17" type="stmt"/>
1369
- <line num="119" count="91" type="stmt"/>
1370
- <line num="120" count="91" type="stmt"/>
1371
- <line num="123" count="91" type="cond" truecount="2" falsecount="0"/>
1372
- <line num="124" count="90" type="cond" truecount="1" falsecount="1"/>
1373
- <line num="125" count="1" type="cond" truecount="1" falsecount="1"/>
1374
- <line num="126" count="0" type="stmt"/>
1375
- <line num="127" count="1" type="cond" truecount="0" falsecount="1"/>
1376
- <line num="128" count="0" type="stmt"/>
1377
- <line num="131" count="91" type="cond" truecount="2" falsecount="0"/>
1378
- <line num="133" count="91" type="stmt"/>
1379
- <line num="142" count="91" type="cond" truecount="1" falsecount="0"/>
1380
- <line num="143" count="1" type="stmt"/>
1381
- <line num="146" count="91" type="cond" truecount="1" falsecount="0"/>
1382
- <line num="147" count="81" type="stmt"/>
1383
- <line num="150" count="91" type="stmt"/>
1384
- <line num="153" count="87" type="stmt"/>
1385
- <line num="155" count="87" type="cond" truecount="1" falsecount="0"/>
1386
- <line num="156" count="87" type="stmt"/>
1387
- <line num="157" count="87" type="cond" truecount="3" falsecount="0"/>
1388
- <line num="158" count="1" type="stmt"/>
1389
- <line num="163" count="86" type="cond" truecount="3" falsecount="0"/>
1390
- <line num="164" count="86" type="stmt"/>
1391
- <line num="165" count="86" type="cond" truecount="4" falsecount="0"/>
1392
- <line num="166" count="1" type="stmt"/>
1393
- <line num="171" count="17" type="stmt"/>
1394
- <line num="177" count="90" type="stmt"/>
1395
- <line num="178" count="90" type="stmt"/>
1396
- <line num="179" count="90" type="stmt"/>
1397
- <line num="181" count="90" type="cond" truecount="1" falsecount="0"/>
1398
- <line num="183" count="90" type="cond" truecount="1" falsecount="2"/>
1399
- <line num="184" count="0" type="stmt"/>
1400
- <line num="188" count="90" type="cond" truecount="1" falsecount="0"/>
1401
- <line num="190" count="12" type="stmt"/>
1402
- <line num="191" count="12" type="stmt"/>
1403
- <line num="192" count="11" type="cond" truecount="3" falsecount="0"/>
1404
- <line num="193" count="1" type="stmt"/>
1405
- <line num="195" count="10" type="stmt"/>
1406
- <line num="197" count="2" type="cond" truecount="2" falsecount="0"/>
1361
+ <line num="86" count="0" type="stmt"/>
1362
+ <line num="88" count="0" type="stmt"/>
1363
+ <line num="98" count="17" type="stmt"/>
1364
+ <line num="99" count="9" type="stmt"/>
1365
+ <line num="100" count="9" type="stmt"/>
1366
+ <line num="101" count="9" type="cond" truecount="1" falsecount="0"/>
1367
+ <line num="102" count="9" type="stmt"/>
1368
+ <line num="104" count="9" type="stmt"/>
1369
+ <line num="113" count="17" type="stmt"/>
1370
+ <line num="121" count="92" type="stmt"/>
1371
+ <line num="122" count="92" type="stmt"/>
1372
+ <line num="123" count="92" type="stmt"/>
1373
+ <line num="126" count="92" type="cond" truecount="2" falsecount="0"/>
1374
+ <line num="127" count="90" type="cond" truecount="1" falsecount="1"/>
1375
+ <line num="128" count="2" type="cond" truecount="2" falsecount="0"/>
1376
+ <line num="129" count="1" type="stmt"/>
1377
+ <line num="130" count="1" type="cond" truecount="0" falsecount="1"/>
1378
+ <line num="131" count="0" type="stmt"/>
1379
+ <line num="134" count="92" type="cond" truecount="2" falsecount="0"/>
1380
+ <line num="136" count="92" type="stmt"/>
1381
+ <line num="145" count="92" type="cond" truecount="1" falsecount="0"/>
1382
+ <line num="146" count="1" type="stmt"/>
1383
+ <line num="149" count="92" type="cond" truecount="1" falsecount="0"/>
1384
+ <line num="150" count="81" type="stmt"/>
1385
+ <line num="153" count="92" type="stmt"/>
1386
+ <line num="156" count="88" type="stmt"/>
1387
+ <line num="158" count="88" type="cond" truecount="1" falsecount="0"/>
1388
+ <line num="159" count="88" type="stmt"/>
1389
+ <line num="160" count="88" type="cond" truecount="3" falsecount="0"/>
1390
+ <line num="161" count="1" type="stmt"/>
1391
+ <line num="166" count="87" type="cond" truecount="3" falsecount="0"/>
1392
+ <line num="167" count="87" type="stmt"/>
1393
+ <line num="168" count="87" type="cond" truecount="4" falsecount="0"/>
1394
+ <line num="169" count="1" type="stmt"/>
1395
+ <line num="174" count="17" type="stmt"/>
1396
+ <line num="177" count="91" type="stmt"/>
1397
+ <line num="179" count="91" type="cond" truecount="1" falsecount="0"/>
1398
+ <line num="180" count="84" type="stmt"/>
1399
+ <line num="182" count="91" type="cond" truecount="1" falsecount="0"/>
1400
+ <line num="183" count="84" type="stmt"/>
1401
+ <line num="185" count="91" type="stmt"/>
1402
+ <line num="186" count="91" type="stmt"/>
1403
+ <line num="188" count="91" type="cond" truecount="1" falsecount="0"/>
1404
+ <line num="190" count="91" type="cond" truecount="1" falsecount="2"/>
1405
+ <line num="191" count="0" type="stmt"/>
1406
+ <line num="195" count="91" type="cond" truecount="1" falsecount="0"/>
1407
+ <line num="197" count="13" type="stmt"/>
1408
+ <line num="198" count="13" type="stmt"/>
1409
+ <line num="199" count="12" type="cond" truecount="3" falsecount="0"/>
1407
1410
  <line num="200" count="1" type="stmt"/>
1408
- <line num="205" count="89" type="cond" truecount="3" falsecount="0"/>
1409
- <line num="207" count="79" type="stmt"/>
1410
- <line num="208" count="79" type="cond" truecount="3" falsecount="0"/>
1411
- <line num="209" count="2" type="stmt"/>
1412
- <line num="213" count="87" type="stmt"/>
1413
- <line num="215" count="85" type="stmt"/>
1414
- <line num="219" count="85" type="stmt"/>
1415
- <line num="220" count="85" type="cond" truecount="1" falsecount="0"/>
1416
- <line num="221" count="74" type="stmt"/>
1417
- <line num="223" count="74" type="cond" truecount="0" falsecount="1"/>
1418
- <line num="224" count="0" type="stmt"/>
1419
- <line num="225" count="0" type="stmt"/>
1420
- <line num="230" count="85" type="stmt"/>
1421
- <line num="232" count="85" type="stmt"/>
1422
- <line num="233" count="85" type="stmt"/>
1423
- <line num="235" count="85" type="stmt"/>
1424
- <line num="236" count="85" type="stmt"/>
1425
- <line num="237" count="85" type="stmt"/>
1426
- <line num="239" count="85" type="stmt"/>
1427
- <line num="241" count="85" type="stmt"/>
1428
- <line num="243" count="85" type="stmt"/>
1429
- <line num="249" count="0" type="cond" truecount="0" falsecount="2"/>
1430
- <line num="250" count="0" type="stmt"/>
1431
- <line num="252" count="0" type="stmt"/>
1432
- <line num="257" count="17" type="stmt"/>
1433
- <line num="261" count="91" type="stmt"/>
1434
- <line num="262" count="91" type="cond" truecount="1" falsecount="0"/>
1435
- <line num="263" count="91" type="stmt"/>
1436
- <line num="264" count="40" type="stmt"/>
1437
- <line num="268" count="91" type="stmt"/>
1438
- <line num="272" count="17" type="stmt"/>
1439
- <line num="273" count="16" type="stmt"/>
1440
- <line num="274" count="11" type="stmt"/>
1441
- <line num="279" count="11" type="stmt"/>
1442
- <line num="283" count="11" type="stmt"/>
1443
- <line num="291" count="17" type="stmt"/>
1444
- <line num="293" count="11" type="stmt"/>
1445
- <line num="294" count="16" type="stmt"/>
1446
- <line num="295" count="11" type="stmt"/>
1447
- <line num="300" count="11" type="stmt"/>
1448
- <line num="303" count="11" type="stmt"/>
1449
- <line num="310" count="17" type="stmt"/>
1450
- <line num="312" count="11" type="stmt"/>
1451
- <line num="313" count="16" type="stmt"/>
1452
- <line num="314" count="11" type="stmt"/>
1453
- <line num="319" count="11" type="stmt"/>
1454
- <line num="323" count="11" type="stmt"/>
1455
- <line num="337" count="17" type="stmt"/>
1456
- <line num="338" count="11" type="stmt"/>
1457
- <line num="340" count="11" type="stmt"/>
1458
- <line num="341" count="11" type="stmt"/>
1459
- <line num="343" count="11" type="stmt"/>
1460
- <line num="344" count="11" type="stmt"/>
1461
- <line num="346" count="11" type="stmt"/>
1462
- <line num="347" count="11" type="stmt"/>
1463
- <line num="349" count="11" type="stmt"/>
1464
- <line num="352" count="17" type="stmt"/>
1465
- <line num="355" count="6" type="stmt"/>
1466
- <line num="356" count="6" type="stmt"/>
1467
- <line num="358" count="6" type="stmt"/>
1468
- <line num="359" count="6" type="stmt"/>
1469
- <line num="361" count="10" type="stmt"/>
1470
- <line num="362" count="6" type="stmt"/>
1471
- <line num="363" count="6" type="stmt"/>
1472
- <line num="365" count="6" type="stmt"/>
1473
- <line num="366" count="10" type="cond" truecount="1" falsecount="0"/>
1411
+ <line num="202" count="11" type="stmt"/>
1412
+ <line num="204" count="2" type="cond" truecount="2" falsecount="0"/>
1413
+ <line num="207" count="1" type="stmt"/>
1414
+ <line num="212" count="90" type="cond" truecount="3" falsecount="0"/>
1415
+ <line num="214" count="79" type="stmt"/>
1416
+ <line num="215" count="79" type="cond" truecount="3" falsecount="0"/>
1417
+ <line num="216" count="2" type="stmt"/>
1418
+ <line num="220" count="88" type="stmt"/>
1419
+ <line num="222" count="86" type="stmt"/>
1420
+ <line num="224" count="86" type="cond" truecount="7" falsecount="0"/>
1421
+ <line num="225" count="1" type="stmt"/>
1422
+ <line num="226" count="1" type="stmt"/>
1423
+ <line num="227" count="1" type="stmt"/>
1424
+ <line num="232" count="86" type="stmt"/>
1425
+ <line num="233" count="86" type="cond" truecount="1" falsecount="0"/>
1426
+ <line num="234" count="74" type="stmt"/>
1427
+ <line num="236" count="74" type="cond" truecount="0" falsecount="1"/>
1428
+ <line num="237" count="0" type="stmt"/>
1429
+ <line num="238" count="0" type="stmt"/>
1430
+ <line num="243" count="86" type="stmt"/>
1431
+ <line num="245" count="86" type="stmt"/>
1432
+ <line num="246" count="86" type="stmt"/>
1433
+ <line num="248" count="86" type="stmt"/>
1434
+ <line num="249" count="86" type="stmt"/>
1435
+ <line num="250" count="86" type="stmt"/>
1436
+ <line num="252" count="86" type="stmt"/>
1437
+ <line num="254" count="86" type="stmt"/>
1438
+ <line num="256" count="86" type="stmt"/>
1439
+ <line num="262" count="0" type="cond" truecount="0" falsecount="2"/>
1440
+ <line num="263" count="0" type="stmt"/>
1441
+ <line num="265" count="0" type="stmt"/>
1442
+ <line num="270" count="17" type="stmt"/>
1443
+ <line num="274" count="92" type="stmt"/>
1444
+ <line num="275" count="92" type="cond" truecount="1" falsecount="0"/>
1445
+ <line num="276" count="92" type="stmt"/>
1446
+ <line num="277" count="40" type="stmt"/>
1447
+ <line num="281" count="92" type="stmt"/>
1448
+ <line num="285" count="17" type="stmt"/>
1449
+ <line num="286" count="16" type="stmt"/>
1450
+ <line num="287" count="11" type="stmt"/>
1451
+ <line num="292" count="11" type="stmt"/>
1452
+ <line num="296" count="11" type="stmt"/>
1453
+ <line num="304" count="17" type="stmt"/>
1454
+ <line num="306" count="11" type="stmt"/>
1455
+ <line num="307" count="16" type="stmt"/>
1456
+ <line num="308" count="11" type="stmt"/>
1457
+ <line num="313" count="11" type="stmt"/>
1458
+ <line num="316" count="11" type="stmt"/>
1459
+ <line num="323" count="17" type="stmt"/>
1460
+ <line num="325" count="11" type="stmt"/>
1461
+ <line num="326" count="16" type="stmt"/>
1462
+ <line num="327" count="11" type="stmt"/>
1463
+ <line num="332" count="11" type="stmt"/>
1464
+ <line num="336" count="11" type="stmt"/>
1465
+ <line num="350" count="17" type="stmt"/>
1466
+ <line num="351" count="11" type="stmt"/>
1467
+ <line num="353" count="11" type="stmt"/>
1468
+ <line num="354" count="11" type="stmt"/>
1469
+ <line num="356" count="11" type="stmt"/>
1470
+ <line num="357" count="11" type="stmt"/>
1471
+ <line num="359" count="11" type="stmt"/>
1472
+ <line num="360" count="11" type="stmt"/>
1473
+ <line num="362" count="11" type="stmt"/>
1474
+ <line num="365" count="17" type="stmt"/>
1474
1475
  <line num="368" count="6" type="stmt"/>
1475
- <line num="372" count="4" type="stmt"/>
1476
- <line num="376" count="4" type="stmt"/>
1476
+ <line num="369" count="6" type="stmt"/>
1477
+ <line num="371" count="6" type="stmt"/>
1478
+ <line num="372" count="6" type="stmt"/>
1479
+ <line num="374" count="10" type="stmt"/>
1480
+ <line num="375" count="6" type="stmt"/>
1481
+ <line num="376" count="6" type="stmt"/>
1477
1482
  <line num="378" count="6" type="stmt"/>
1478
- <line num="379" count="6" type="stmt"/>
1479
- <line num="383" count="6" type="stmt"/>
1480
- <line num="384" count="6" type="stmt"/>
1483
+ <line num="379" count="10" type="cond" truecount="1" falsecount="0"/>
1484
+ <line num="381" count="6" type="stmt"/>
1485
+ <line num="385" count="4" type="stmt"/>
1486
+ <line num="389" count="4" type="stmt"/>
1487
+ <line num="391" count="6" type="stmt"/>
1488
+ <line num="392" count="6" type="stmt"/>
1481
1489
  <line num="396" count="6" type="stmt"/>
1482
1490
  <line num="397" count="6" type="stmt"/>
1483
- <line num="400" count="6" type="stmt"/>
1484
- <line num="403" count="6" type="stmt"/>
1485
- <line num="404" count="6" type="stmt"/>
1486
- <line num="405" count="6" type="stmt"/>
1487
- <line num="408" count="6" type="stmt"/>
1488
1491
  <line num="409" count="6" type="stmt"/>
1489
- <line num="416" count="6" type="cond" truecount="3" falsecount="0"/>
1492
+ <line num="410" count="6" type="stmt"/>
1493
+ <line num="413" count="6" type="stmt"/>
1494
+ <line num="416" count="6" type="stmt"/>
1490
1495
  <line num="417" count="6" type="stmt"/>
1491
1496
  <line num="418" count="6" type="stmt"/>
1492
- <line num="419" count="6" type="stmt"/>
1493
- <line num="420" count="0" type="stmt"/>
1497
+ <line num="421" count="6" type="stmt"/>
1494
1498
  <line num="422" count="6" type="stmt"/>
1495
- <line num="425" count="6" type="stmt"/>
1496
- <line num="434" count="17" type="stmt"/>
1497
- <line num="436" count="2" type="stmt"/>
1498
- <line num="437" count="2" type="cond" truecount="3" falsecount="0"/>
1499
- <line num="438" count="2" type="stmt"/>
1500
- <line num="439" count="2" type="stmt"/>
1501
- <line num="440" count="2" type="cond" truecount="0" falsecount="1"/>
1502
- <line num="441" count="0" type="stmt"/>
1503
- <line num="444" count="2" type="stmt"/>
1504
- <line num="445" count="2" type="cond" truecount="1" falsecount="0"/>
1505
- <line num="446" count="1" type="stmt"/>
1506
- <line num="451" count="17" type="stmt"/>
1507
- <line num="453" count="2" type="stmt"/>
1508
- <line num="454" count="2" type="stmt"/>
1509
- <line num="456" count="2" type="stmt"/>
1510
- <line num="462" count="2" type="stmt"/>
1511
- <line num="463" count="2" type="cond" truecount="1" falsecount="0"/>
1512
- <line num="464" count="1" type="stmt"/>
1513
- <line num="466" count="1" type="stmt"/>
1514
- <line num="474" count="2" type="stmt"/>
1515
- <line num="478" count="2" type="stmt"/>
1516
- <line num="480" count="3" type="stmt"/>
1517
- <line num="485" count="3" type="stmt"/>
1518
- <line num="489" count="2" type="stmt"/>
1519
- <line num="490" count="2" type="stmt"/>
1520
- <line num="491" count="3" type="stmt"/>
1521
- <line num="496" count="2" type="stmt"/>
1522
- <line num="497" count="2" type="stmt"/>
1499
+ <line num="429" count="6" type="cond" truecount="3" falsecount="0"/>
1500
+ <line num="430" count="6" type="stmt"/>
1501
+ <line num="431" count="6" type="stmt"/>
1502
+ <line num="432" count="6" type="stmt"/>
1503
+ <line num="433" count="0" type="stmt"/>
1504
+ <line num="435" count="6" type="stmt"/>
1505
+ <line num="438" count="6" type="stmt"/>
1506
+ <line num="447" count="17" type="stmt"/>
1507
+ <line num="449" count="2" type="stmt"/>
1508
+ <line num="450" count="2" type="cond" truecount="3" falsecount="0"/>
1509
+ <line num="451" count="2" type="stmt"/>
1510
+ <line num="452" count="2" type="stmt"/>
1511
+ <line num="453" count="2" type="cond" truecount="0" falsecount="1"/>
1512
+ <line num="454" count="0" type="stmt"/>
1513
+ <line num="457" count="2" type="stmt"/>
1514
+ <line num="458" count="2" type="cond" truecount="1" falsecount="0"/>
1515
+ <line num="459" count="1" type="stmt"/>
1516
+ <line num="464" count="17" type="stmt"/>
1517
+ <line num="466" count="2" type="stmt"/>
1518
+ <line num="467" count="2" type="stmt"/>
1519
+ <line num="469" count="2" type="stmt"/>
1520
+ <line num="475" count="2" type="stmt"/>
1521
+ <line num="476" count="2" type="cond" truecount="1" falsecount="0"/>
1522
+ <line num="477" count="1" type="stmt"/>
1523
+ <line num="479" count="1" type="stmt"/>
1524
+ <line num="487" count="2" type="stmt"/>
1525
+ <line num="491" count="2" type="stmt"/>
1526
+ <line num="493" count="3" type="stmt"/>
1523
1527
  <line num="498" count="3" type="stmt"/>
1524
- <line num="499" count="3" type="stmt"/>
1528
+ <line num="502" count="2" type="stmt"/>
1525
1529
  <line num="503" count="2" type="stmt"/>
1526
1530
  <line num="504" count="3" type="stmt"/>
1527
- <line num="505" count="3" type="cond" truecount="1" falsecount="1"/>
1528
- <line num="506" count="3" type="stmt"/>
1529
- <line num="508" count="0" type="stmt"/>
1531
+ <line num="509" count="2" type="stmt"/>
1532
+ <line num="510" count="2" type="stmt"/>
1533
+ <line num="511" count="3" type="stmt"/>
1534
+ <line num="512" count="3" type="stmt"/>
1530
1535
  <line num="516" count="2" type="stmt"/>
1531
- <line num="519" count="17" type="stmt"/>
1532
- <line num="520" count="4" type="stmt"/>
1533
- <line num="521" count="4" type="stmt"/>
1534
- <line num="522" count="4" type="stmt"/>
1535
- <line num="524" count="4" type="cond" truecount="3" falsecount="0"/>
1536
- <line num="526" count="4" type="stmt"/>
1537
- <line num="527" count="4" type="stmt"/>
1538
- <line num="528" count="4" type="cond" truecount="1" falsecount="0"/>
1539
- <line num="529" count="1" type="cond" truecount="1" falsecount="1"/>
1540
- <line num="530" count="0" type="stmt"/>
1541
- <line num="532" count="1" type="stmt"/>
1542
- <line num="537" count="3" type="stmt"/>
1543
- <line num="539" count="3" type="stmt"/>
1544
- <line num="541" count="3" type="stmt"/>
1545
- <line num="542" count="3" type="stmt"/>
1546
- <line num="543" count="3" type="stmt"/>
1547
- <line num="545" count="3" type="stmt"/>
1548
- <line num="548" count="17" type="stmt"/>
1549
- <line num="549" count="3" type="stmt"/>
1536
+ <line num="517" count="3" type="stmt"/>
1537
+ <line num="518" count="3" type="cond" truecount="1" falsecount="1"/>
1538
+ <line num="519" count="3" type="stmt"/>
1539
+ <line num="521" count="0" type="stmt"/>
1540
+ <line num="529" count="2" type="stmt"/>
1541
+ <line num="532" count="17" type="stmt"/>
1542
+ <line num="533" count="4" type="stmt"/>
1543
+ <line num="534" count="4" type="stmt"/>
1544
+ <line num="535" count="4" type="stmt"/>
1545
+ <line num="537" count="4" type="cond" truecount="3" falsecount="0"/>
1546
+ <line num="539" count="4" type="stmt"/>
1547
+ <line num="540" count="4" type="stmt"/>
1548
+ <line num="541" count="4" type="cond" truecount="1" falsecount="0"/>
1549
+ <line num="542" count="1" type="cond" truecount="1" falsecount="1"/>
1550
+ <line num="543" count="0" type="stmt"/>
1551
+ <line num="545" count="1" type="stmt"/>
1550
1552
  <line num="550" count="3" type="stmt"/>
1551
- <line num="551" count="3" type="stmt"/>
1552
1553
  <line num="552" count="3" type="stmt"/>
1553
- <line num="553" count="3" type="stmt"/>
1554
+ <line num="554" count="3" type="stmt"/>
1554
1555
  <line num="555" count="3" type="stmt"/>
1555
- <line num="558" count="17" type="stmt"/>
1556
- <line num="560" count="5" type="stmt"/>
1557
- <line num="561" count="5" type="stmt"/>
1558
- <line num="566" count="6" type="stmt"/>
1559
- <line num="567" count="5" type="stmt"/>
1560
- <line num="570" count="5" type="stmt"/>
1561
- <line num="571" count="6" type="cond" truecount="2" falsecount="0"/>
1562
- <line num="572" count="2" type="stmt"/>
1563
- <line num="574" count="4" type="stmt"/>
1564
- <line num="578" count="5" type="stmt"/>
1565
- <line num="581" count="5" type="stmt"/>
1566
- <line num="582" count="5" type="stmt"/>
1567
- <line num="583" count="4" type="stmt"/>
1568
- <line num="584" count="4" type="stmt"/>
1569
- <line num="585" count="4" type="cond" truecount="1" falsecount="0"/>
1570
- <line num="586" count="2" type="stmt"/>
1571
- <line num="588" count="4" type="stmt"/>
1572
- <line num="589" count="4" type="stmt"/>
1573
- <line num="593" count="4" type="stmt"/>
1574
- <line num="594" count="4" type="stmt"/>
1575
- <line num="595" count="4" type="stmt"/>
1576
- <line num="597" count="0" type="stmt"/>
1577
- <line num="598" count="0" type="stmt"/>
1578
- <line num="605" count="5" type="stmt"/>
1556
+ <line num="556" count="3" type="stmt"/>
1557
+ <line num="558" count="3" type="stmt"/>
1558
+ <line num="561" count="17" type="stmt"/>
1559
+ <line num="562" count="3" type="stmt"/>
1560
+ <line num="563" count="3" type="stmt"/>
1561
+ <line num="564" count="3" type="stmt"/>
1562
+ <line num="565" count="3" type="stmt"/>
1563
+ <line num="566" count="3" type="stmt"/>
1564
+ <line num="568" count="3" type="stmt"/>
1565
+ <line num="571" count="17" type="stmt"/>
1566
+ <line num="573" count="5" type="stmt"/>
1567
+ <line num="574" count="5" type="stmt"/>
1568
+ <line num="579" count="6" type="stmt"/>
1569
+ <line num="580" count="5" type="stmt"/>
1570
+ <line num="583" count="5" type="stmt"/>
1571
+ <line num="584" count="6" type="cond" truecount="2" falsecount="0"/>
1572
+ <line num="585" count="2" type="stmt"/>
1573
+ <line num="587" count="4" type="stmt"/>
1574
+ <line num="591" count="5" type="stmt"/>
1575
+ <line num="594" count="5" type="stmt"/>
1576
+ <line num="595" count="5" type="stmt"/>
1577
+ <line num="596" count="4" type="stmt"/>
1578
+ <line num="597" count="4" type="stmt"/>
1579
+ <line num="598" count="4" type="cond" truecount="1" falsecount="0"/>
1580
+ <line num="599" count="2" type="stmt"/>
1581
+ <line num="601" count="4" type="stmt"/>
1582
+ <line num="602" count="4" type="stmt"/>
1583
+ <line num="606" count="4" type="stmt"/>
1584
+ <line num="607" count="4" type="stmt"/>
1585
+ <line num="608" count="4" type="stmt"/>
1586
+ <line num="610" count="0" type="stmt"/>
1587
+ <line num="611" count="0" type="stmt"/>
1588
+ <line num="618" count="5" type="stmt"/>
1579
1589
  </file>
1580
1590
  </package>
1581
1591
  <package name="src.tests">
@@ -1643,20 +1653,20 @@
1643
1653
  <line num="137" count="6" type="stmt"/>
1644
1654
  <line num="138" count="6" type="stmt"/>
1645
1655
  <line num="140" count="6" type="stmt"/>
1646
- <line num="144" count="449" type="stmt"/>
1647
- <line num="145" count="449" type="stmt"/>
1648
- <line num="147" count="382" type="stmt"/>
1656
+ <line num="144" count="452" type="stmt"/>
1657
+ <line num="145" count="452" type="stmt"/>
1658
+ <line num="147" count="385" type="stmt"/>
1649
1659
  <line num="160" count="46" type="stmt"/>
1650
1660
  <line num="168" count="46" type="stmt"/>
1651
- <line num="172" count="70" type="cond" truecount="0" falsecount="1"/>
1661
+ <line num="172" count="73" type="cond" truecount="0" falsecount="1"/>
1652
1662
  <line num="173" count="0" type="stmt"/>
1653
- <line num="175" count="70" type="stmt"/>
1654
- <line num="181" count="69" type="stmt"/>
1655
- <line num="186" count="69" type="stmt"/>
1656
- <line num="187" count="69" type="stmt"/>
1657
- <line num="195" count="61" type="stmt"/>
1658
- <line num="196" count="61" type="cond" truecount="2" falsecount="0"/>
1659
- <line num="197" count="59" type="stmt"/>
1663
+ <line num="175" count="73" type="stmt"/>
1664
+ <line num="181" count="72" type="stmt"/>
1665
+ <line num="186" count="72" type="stmt"/>
1666
+ <line num="187" count="72" type="stmt"/>
1667
+ <line num="195" count="64" type="stmt"/>
1668
+ <line num="196" count="64" type="cond" truecount="2" falsecount="0"/>
1669
+ <line num="197" count="62" type="stmt"/>
1660
1670
  <line num="198" count="2" type="cond" truecount="1" falsecount="1"/>
1661
1671
  <line num="199" count="2" type="stmt"/>
1662
1672
  <line num="201" count="0" type="stmt"/>
@@ -1715,7 +1725,7 @@
1715
1725
  </file>
1716
1726
  </package>
1717
1727
  <package name="src.tests.api">
1718
- <metrics statements="147" coveredstatements="147" conditionals="73" coveredconditionals="65" methods="48" coveredmethods="48"/>
1728
+ <metrics statements="147" coveredstatements="147" conditionals="73" coveredconditionals="68" methods="48" coveredmethods="48"/>
1719
1729
  <file name="accounts.ts" path="/home/runner/work/budibase/budibase/packages/worker/src/tests/api/accounts.ts">
1720
1730
  <metrics statements="8" coveredstatements="8" conditionals="0" coveredconditionals="0" methods="4" coveredmethods="4"/>
1721
1731
  <line num="3" count="17" type="stmt"/>
@@ -1859,7 +1869,7 @@
1859
1869
  <line num="10" count="3" type="stmt"/>
1860
1870
  </file>
1861
1871
  <file name="users.ts" path="/home/runner/work/budibase/budibase/packages/worker/src/tests/api/users.ts">
1862
- <metrics statements="41" coveredstatements="41" conditionals="33" coveredconditionals="27" methods="15" coveredmethods="15"/>
1872
+ <metrics statements="41" coveredstatements="41" conditionals="33" coveredconditionals="30" methods="15" coveredmethods="15"/>
1863
1873
  <line num="8" count="17" type="stmt"/>
1864
1874
  <line num="9" count="17" type="stmt"/>
1865
1875
  <line num="11" count="17" type="stmt"/>
@@ -1896,11 +1906,11 @@
1896
1906
  <line num="105" count="6" type="stmt"/>
1897
1907
  <line num="112" count="6" type="stmt"/>
1898
1908
  <line num="118" count="17" type="stmt"/>
1899
- <line num="119" count="22" type="stmt"/>
1909
+ <line num="119" count="23" type="stmt"/>
1900
1910
  <line num="127" count="17" type="stmt"/>
1901
1911
  <line num="128" count="5" type="stmt"/>
1902
1912
  <line num="135" count="17" type="stmt"/>
1903
- <line num="136" count="6" type="stmt"/>
1913
+ <line num="136" count="8" type="stmt"/>
1904
1914
  </file>
1905
1915
  </package>
1906
1916
  <package name="src.tests.mocks">
@@ -1978,8 +1988,8 @@
1978
1988
  <line num="2" count="17" type="stmt"/>
1979
1989
  <line num="3" count="17" type="stmt"/>
1980
1990
  <line num="4" count="17" type="stmt"/>
1981
- <line num="7" count="97" type="cond" truecount="1" falsecount="0"/>
1982
- <line num="8" count="97" type="stmt"/>
1991
+ <line num="7" count="98" type="cond" truecount="1" falsecount="0"/>
1992
+ <line num="8" count="98" type="stmt"/>
1983
1993
  <line num="10" count="0" type="stmt"/>
1984
1994
  <line num="11" count="0" type="stmt"/>
1985
1995
  <line num="12" count="0" type="cond" truecount="0" falsecount="1"/>
@@ -1990,8 +2000,8 @@
1990
2000
  <line num="19" count="0" type="stmt"/>
1991
2001
  <line num="20" count="0" type="stmt"/>
1992
2002
  <line num="23" count="17" type="stmt"/>
1993
- <line num="24" count="97" type="stmt"/>
1994
- <line num="29" count="97" type="cond" truecount="1" falsecount="2"/>
2003
+ <line num="24" count="98" type="stmt"/>
2004
+ <line num="29" count="98" type="cond" truecount="1" falsecount="2"/>
1995
2005
  <line num="30" count="0" type="stmt"/>
1996
2006
  </file>
1997
2007
  <file name="email.ts" path="/home/runner/work/budibase/budibase/packages/worker/src/utilities/email.ts">