@budibase/server 2.0.14 → 2.0.16

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 (157) hide show
  1. package/builder/assets/{index.6851c223.js → index.1c0fb39e.js} +1 -1
  2. package/builder/index.html +1 -1
  3. package/coverage/clover.xml +101 -98
  4. package/coverage/coverage-final.json +1 -1
  5. package/coverage/lcov-report/api/controllers/apikeys.js.html +1 -1
  6. package/coverage/lcov-report/api/controllers/automation.js.html +1 -1
  7. package/coverage/lcov-report/api/controllers/backup.js.html +1 -1
  8. package/coverage/lcov-report/api/controllers/cloud.js.html +1 -1
  9. package/coverage/lcov-report/api/controllers/datasource.js.html +57 -36
  10. package/coverage/lcov-report/api/controllers/dev.js.html +1 -1
  11. package/coverage/lcov-report/api/controllers/index.html +19 -19
  12. package/coverage/lcov-report/api/controllers/integration.js.html +1 -1
  13. package/coverage/lcov-report/api/controllers/layout.js.html +1 -1
  14. package/coverage/lcov-report/api/controllers/metadata.js.html +1 -1
  15. package/coverage/lcov-report/api/controllers/migrations.js.html +1 -1
  16. package/coverage/lcov-report/api/controllers/permission.js.html +1 -1
  17. package/coverage/lcov-report/api/controllers/query/index.html +1 -1
  18. package/coverage/lcov-report/api/controllers/query/validation.js.html +1 -1
  19. package/coverage/lcov-report/api/controllers/role.js.html +1 -1
  20. package/coverage/lcov-report/api/controllers/routing.js.html +1 -1
  21. package/coverage/lcov-report/api/controllers/row/external.js.html +1 -1
  22. package/coverage/lcov-report/api/controllers/row/index.html +1 -1
  23. package/coverage/lcov-report/api/controllers/row/internal.js.html +1 -1
  24. package/coverage/lcov-report/api/controllers/row/internalSearch.js.html +1 -1
  25. package/coverage/lcov-report/api/controllers/row/staticFormula.js.html +1 -1
  26. package/coverage/lcov-report/api/controllers/row/utils.js.html +1 -1
  27. package/coverage/lcov-report/api/controllers/script.js.html +1 -1
  28. package/coverage/lcov-report/api/controllers/table/bulkFormula.js.html +1 -1
  29. package/coverage/lcov-report/api/controllers/table/external.js.html +1 -1
  30. package/coverage/lcov-report/api/controllers/table/index.html +1 -1
  31. package/coverage/lcov-report/api/controllers/table/index.js.html +1 -1
  32. package/coverage/lcov-report/api/controllers/templates.js.html +1 -1
  33. package/coverage/lcov-report/api/controllers/user.js.html +1 -1
  34. package/coverage/lcov-report/api/controllers/view/exporters.js.html +1 -1
  35. package/coverage/lcov-report/api/controllers/view/index.html +1 -1
  36. package/coverage/lcov-report/api/controllers/view/index.js.html +1 -1
  37. package/coverage/lcov-report/api/controllers/view/utils.js.html +1 -1
  38. package/coverage/lcov-report/api/controllers/view/viewBuilder.js.html +1 -1
  39. package/coverage/lcov-report/api/controllers/webhook.js.html +1 -1
  40. package/coverage/lcov-report/api/index.html +1 -1
  41. package/coverage/lcov-report/api/index.js.html +1 -1
  42. package/coverage/lcov-report/api/routes/analytics.js.html +1 -1
  43. package/coverage/lcov-report/api/routes/apikeys.js.html +1 -1
  44. package/coverage/lcov-report/api/routes/automation.js.html +1 -1
  45. package/coverage/lcov-report/api/routes/backup.js.html +1 -1
  46. package/coverage/lcov-report/api/routes/cloud.js.html +1 -1
  47. package/coverage/lcov-report/api/routes/component.js.html +1 -1
  48. package/coverage/lcov-report/api/routes/datasource.js.html +1 -1
  49. package/coverage/lcov-report/api/routes/deploy.js.html +1 -1
  50. package/coverage/lcov-report/api/routes/dev.js.html +1 -1
  51. package/coverage/lcov-report/api/routes/index.html +1 -1
  52. package/coverage/lcov-report/api/routes/integration.js.html +1 -1
  53. package/coverage/lcov-report/api/routes/layout.js.html +1 -1
  54. package/coverage/lcov-report/api/routes/metadata.js.html +1 -1
  55. package/coverage/lcov-report/api/routes/migrations.js.html +1 -1
  56. package/coverage/lcov-report/api/routes/permission.js.html +1 -1
  57. package/coverage/lcov-report/api/routes/query.js.html +1 -1
  58. package/coverage/lcov-report/api/routes/role.js.html +1 -1
  59. package/coverage/lcov-report/api/routes/routing.js.html +1 -1
  60. package/coverage/lcov-report/api/routes/screen.js.html +1 -1
  61. package/coverage/lcov-report/api/routes/script.js.html +1 -1
  62. package/coverage/lcov-report/api/routes/table.js.html +1 -1
  63. package/coverage/lcov-report/api/routes/templates.js.html +1 -1
  64. package/coverage/lcov-report/api/routes/user.js.html +1 -1
  65. package/coverage/lcov-report/api/routes/utils/index.html +1 -1
  66. package/coverage/lcov-report/api/routes/utils/validators.js.html +1 -1
  67. package/coverage/lcov-report/api/routes/view.js.html +1 -1
  68. package/coverage/lcov-report/api/routes/webhook.js.html +1 -1
  69. package/coverage/lcov-report/automations/actions.js.html +1 -1
  70. package/coverage/lcov-report/automations/automationUtils.js.html +1 -1
  71. package/coverage/lcov-report/automations/bullboard.js.html +1 -1
  72. package/coverage/lcov-report/automations/index.html +1 -1
  73. package/coverage/lcov-report/automations/index.js.html +1 -1
  74. package/coverage/lcov-report/automations/steps/bash.js.html +1 -1
  75. package/coverage/lcov-report/automations/steps/delay.js.html +1 -1
  76. package/coverage/lcov-report/automations/steps/discord.js.html +1 -1
  77. package/coverage/lcov-report/automations/steps/executeQuery.js.html +1 -1
  78. package/coverage/lcov-report/automations/steps/executeScript.js.html +1 -1
  79. package/coverage/lcov-report/automations/steps/filter.js.html +1 -1
  80. package/coverage/lcov-report/automations/steps/index.html +1 -1
  81. package/coverage/lcov-report/automations/steps/integromat.js.html +1 -1
  82. package/coverage/lcov-report/automations/steps/loop.js.html +1 -1
  83. package/coverage/lcov-report/automations/steps/outgoingWebhook.js.html +1 -1
  84. package/coverage/lcov-report/automations/steps/queryRows.js.html +1 -1
  85. package/coverage/lcov-report/automations/steps/sendSmtpEmail.js.html +1 -1
  86. package/coverage/lcov-report/automations/steps/serverLog.js.html +1 -1
  87. package/coverage/lcov-report/automations/steps/slack.js.html +1 -1
  88. package/coverage/lcov-report/automations/steps/updateRow.js.html +1 -1
  89. package/coverage/lcov-report/automations/steps/utils.js.html +1 -1
  90. package/coverage/lcov-report/automations/steps/zapier.js.html +1 -1
  91. package/coverage/lcov-report/automations/triggerInfo/app.js.html +1 -1
  92. package/coverage/lcov-report/automations/triggerInfo/cron.js.html +1 -1
  93. package/coverage/lcov-report/automations/triggerInfo/index.html +1 -1
  94. package/coverage/lcov-report/automations/triggerInfo/index.js.html +1 -1
  95. package/coverage/lcov-report/automations/triggerInfo/rowDeleted.js.html +1 -1
  96. package/coverage/lcov-report/automations/triggerInfo/rowSaved.js.html +1 -1
  97. package/coverage/lcov-report/automations/triggerInfo/rowUpdated.js.html +1 -1
  98. package/coverage/lcov-report/automations/triggerInfo/webhook.js.html +1 -1
  99. package/coverage/lcov-report/automations/triggers.js.html +1 -1
  100. package/coverage/lcov-report/constants/index.html +1 -1
  101. package/coverage/lcov-report/constants/index.js.html +1 -1
  102. package/coverage/lcov-report/constants/layouts.js.html +1 -1
  103. package/coverage/lcov-report/constants/screens.js.html +1 -1
  104. package/coverage/lcov-report/db/inMemoryView.js.html +1 -1
  105. package/coverage/lcov-report/db/index.html +1 -1
  106. package/coverage/lcov-report/db/index.js.html +1 -1
  107. package/coverage/lcov-report/db/linkedRows/LinkController.js.html +1 -1
  108. package/coverage/lcov-report/db/linkedRows/index.html +1 -1
  109. package/coverage/lcov-report/db/linkedRows/index.js.html +1 -1
  110. package/coverage/lcov-report/db/linkedRows/linkUtils.js.html +1 -1
  111. package/coverage/lcov-report/db/newid.js.html +1 -1
  112. package/coverage/lcov-report/db/utils.js.html +1 -1
  113. package/coverage/lcov-report/events/AutomationEmitter.js.html +1 -1
  114. package/coverage/lcov-report/events/index.html +1 -1
  115. package/coverage/lcov-report/events/index.js.html +1 -1
  116. package/coverage/lcov-report/events/utils.js.html +1 -1
  117. package/coverage/lcov-report/index.html +18 -18
  118. package/coverage/lcov-report/integrations/tests/TestConfiguration.js.html +1 -1
  119. package/coverage/lcov-report/integrations/tests/index.html +1 -1
  120. package/coverage/lcov-report/middleware/appInfo.js.html +1 -1
  121. package/coverage/lcov-report/middleware/builder.js.html +1 -1
  122. package/coverage/lcov-report/middleware/currentapp.js.html +1 -1
  123. package/coverage/lcov-report/middleware/index.html +1 -1
  124. package/coverage/lcov-report/middleware/joi-validator.js.html +1 -1
  125. package/coverage/lcov-report/middleware/publicApi.js.html +1 -1
  126. package/coverage/lcov-report/middleware/resourceId.js.html +1 -1
  127. package/coverage/lcov-report/middleware/selfhost.js.html +1 -1
  128. package/coverage/lcov-report/middleware/utils.js.html +1 -1
  129. package/coverage/lcov-report/utilities/budibaseDir.js.html +1 -1
  130. package/coverage/lcov-report/utilities/centralPath.js.html +1 -1
  131. package/coverage/lcov-report/utilities/csvParser.js.html +1 -1
  132. package/coverage/lcov-report/utilities/global.js.html +1 -1
  133. package/coverage/lcov-report/utilities/index.html +1 -1
  134. package/coverage/lcov-report/utilities/index.js.html +1 -1
  135. package/coverage/lcov-report/utilities/queue/inMemoryQueue.js.html +1 -1
  136. package/coverage/lcov-report/utilities/queue/index.html +1 -1
  137. package/coverage/lcov-report/utilities/routing/index.html +1 -1
  138. package/coverage/lcov-report/utilities/routing/index.js.html +1 -1
  139. package/coverage/lcov-report/utilities/rowProcessor/index.html +1 -1
  140. package/coverage/lcov-report/utilities/rowProcessor/index.js.html +1 -1
  141. package/coverage/lcov-report/utilities/rowProcessor/utils.js.html +1 -1
  142. package/coverage/lcov-report/utilities/scriptRunner.js.html +1 -1
  143. package/coverage/lcov-report/utilities/security.js.html +1 -1
  144. package/coverage/lcov-report/utilities/statusCodes.js.html +1 -1
  145. package/coverage/lcov-report/utilities/usageQuota/index.html +1 -1
  146. package/coverage/lcov-report/utilities/usageQuota/rows.js.html +1 -1
  147. package/coverage/lcov-report/utilities/usageQuota/usageQuoteReset.js.html +1 -1
  148. package/coverage/lcov-report/utilities/users.js.html +1 -1
  149. package/coverage/lcov-report/utilities/workerRequests.js.html +1 -1
  150. package/coverage/lcov.info +170 -167
  151. package/dist/api/controllers/datasource.js +17 -11
  152. package/dist/api/controllers/public/rows.js +4 -2
  153. package/dist/package.json +6 -6
  154. package/dist/tsconfig.build.tsbuildinfo +1 -1
  155. package/package.json +7 -7
  156. package/src/api/controllers/datasource.js +20 -13
  157. package/src/api/controllers/public/rows.ts +7 -2
@@ -589,7 +589,7 @@ exports.generateApiKey = <span class="fstat-no" title="function not covered" >as
589
589
  <div class='footer quiet pad2 space-top1 center small'>
590
590
  Code coverage generated by
591
591
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
592
- at Mon Oct 03 2022 09:01:42 GMT+0000 (Coordinated Universal Time)
592
+ at Tue Oct 04 2022 11:03:26 GMT+0000 (Coordinated Universal Time)
593
593
  </div>
594
594
  <script src="../prettify.js"></script>
595
595
  <script>
@@ -465,43 +465,45 @@ FN:24,(anonymous_1)
465
465
  FN:38,(anonymous_2)
466
466
  FN:50,(anonymous_3)
467
467
  FN:62,(anonymous_4)
468
- FN:84,(anonymous_5)
469
- FN:98,(anonymous_6)
470
- FN:100,(anonymous_7)
471
- FN:113,(anonymous_8)
472
- FN:142,(anonymous_9)
473
- FN:179,(anonymous_10)
474
- FN:187,(anonymous_11)
475
- FN:202,(anonymous_12)
476
- FN:208,(anonymous_13)
477
- FN:217,getErrorTables
478
- FN:219,(anonymous_15)
479
- FN:220,(anonymous_16)
480
- FN:223,updateError
481
- FN:234,(anonymous_18)
482
- FN:247,(anonymous_19)
483
- FNF:20
468
+ FN:85,(anonymous_5)
469
+ FN:92,(anonymous_6)
470
+ FN:103,(anonymous_7)
471
+ FN:117,(anonymous_8)
472
+ FN:119,(anonymous_9)
473
+ FN:132,(anonymous_10)
474
+ FN:161,(anonymous_11)
475
+ FN:199,(anonymous_12)
476
+ FN:207,(anonymous_13)
477
+ FN:222,(anonymous_14)
478
+ FN:228,(anonymous_15)
479
+ FN:237,getErrorTables
480
+ FN:239,(anonymous_17)
481
+ FN:240,(anonymous_18)
482
+ FN:243,updateError
483
+ FN:254,(anonymous_20)
484
+ FNF:21
484
485
  FNH:11
485
486
  FNDA:2,(anonymous_0)
486
487
  FNDA:2,(anonymous_1)
487
488
  FNDA:1,(anonymous_2)
488
489
  FNDA:0,(anonymous_3)
489
490
  FNDA:0,(anonymous_4)
490
- FNDA:6,(anonymous_5)
491
- FNDA:1,(anonymous_6)
492
- FNDA:0,(anonymous_7)
493
- FNDA:6,(anonymous_8)
494
- FNDA:64,(anonymous_9)
495
- FNDA:1,(anonymous_10)
496
- FNDA:1,(anonymous_11)
491
+ FNDA:0,(anonymous_5)
492
+ FNDA:0,(anonymous_6)
493
+ FNDA:6,(anonymous_7)
494
+ FNDA:1,(anonymous_8)
495
+ FNDA:0,(anonymous_9)
496
+ FNDA:6,(anonymous_10)
497
+ FNDA:64,(anonymous_11)
497
498
  FNDA:1,(anonymous_12)
498
499
  FNDA:1,(anonymous_13)
500
+ FNDA:1,(anonymous_14)
501
+ FNDA:1,(anonymous_15)
499
502
  FNDA:0,getErrorTables
500
- FNDA:0,(anonymous_15)
501
- FNDA:0,(anonymous_16)
502
- FNDA:0,updateError
503
+ FNDA:0,(anonymous_17)
503
504
  FNDA:0,(anonymous_18)
504
- FNDA:0,(anonymous_19)
505
+ FNDA:0,updateError
506
+ FNDA:0,(anonymous_20)
505
507
  DA:8,45
506
508
  DA:9,45
507
509
  DA:10,45
@@ -535,116 +537,119 @@ DA:64,0
535
537
  DA:68,0
536
538
  DA:71,0
537
539
  DA:72,0
538
- DA:74,0
540
+ DA:73,0
539
541
  DA:75,0
540
542
  DA:76,0
541
- DA:78,0
542
- DA:84,45
543
- DA:85,6
544
- DA:86,6
545
- DA:87,6
546
- DA:89,6
547
- DA:90,5
548
- DA:93,1
543
+ DA:77,0
544
+ DA:79,0
545
+ DA:85,45
546
+ DA:87,0
547
+ DA:88,0
548
+ DA:89,0
549
+ DA:91,0
550
+ DA:92,0
551
+ DA:94,0
549
552
  DA:95,0
550
- DA:98,1
551
- DA:99,1
552
- DA:101,0
553
- DA:105,1
554
- DA:106,1
555
- DA:110,1
556
- DA:113,45
557
- DA:114,6
558
- DA:115,6
559
- DA:116,6
560
- DA:117,6
561
- DA:118,6
562
- DA:119,6
563
- DA:120,6
564
- DA:122,0
565
- DA:125,6
566
- DA:126,6
567
- DA:127,6
568
- DA:130,6
569
- DA:131,6
570
- DA:132,6
571
- DA:133,0
553
+ DA:103,45
554
+ DA:104,6
555
+ DA:105,6
556
+ DA:106,6
557
+ DA:108,6
558
+ DA:109,5
559
+ DA:112,1
560
+ DA:114,0
561
+ DA:117,1
562
+ DA:118,1
563
+ DA:120,0
564
+ DA:124,1
565
+ DA:125,1
566
+ DA:129,1
567
+ DA:132,45
568
+ DA:133,6
569
+ DA:134,6
570
+ DA:135,6
571
+ DA:136,6
572
572
  DA:137,6
573
573
  DA:138,6
574
574
  DA:139,6
575
- DA:142,45
576
- DA:143,64
577
- DA:144,64
578
- DA:145,64
579
- DA:147,64
580
- DA:153,64
581
- DA:154,64
582
- DA:155,0
583
- DA:156,0
584
- DA:157,0
585
- DA:160,64
586
- DA:161,64
575
+ DA:141,0
576
+ DA:144,6
577
+ DA:145,6
578
+ DA:146,6
579
+ DA:149,6
580
+ DA:150,6
581
+ DA:151,6
582
+ DA:152,0
583
+ DA:156,6
584
+ DA:157,6
585
+ DA:158,6
586
+ DA:161,45
587
587
  DA:162,64
588
- DA:165,64
588
+ DA:163,64
589
+ DA:164,64
589
590
  DA:166,64
590
- DA:167,63
591
- DA:168,0
592
- DA:172,63
593
- DA:173,63
591
+ DA:172,64
592
+ DA:173,64
594
593
  DA:174,0
595
- DA:176,63
596
- DA:179,45
597
- DA:180,1
598
- DA:181,1
599
- DA:183,1
600
- DA:185,1
601
- DA:186,1
602
- DA:187,1
603
- DA:195,1
604
- DA:196,1
605
- DA:198,1
606
- DA:199,1
607
- DA:202,45
594
+ DA:175,0
595
+ DA:176,0
596
+ DA:177,0
597
+ DA:180,64
598
+ DA:181,64
599
+ DA:182,64
600
+ DA:185,64
601
+ DA:186,64
602
+ DA:187,63
603
+ DA:188,0
604
+ DA:192,63
605
+ DA:193,63
606
+ DA:194,0
607
+ DA:196,63
608
+ DA:199,45
609
+ DA:200,1
610
+ DA:201,1
608
611
  DA:203,1
609
- DA:204,1
610
- DA:208,45
611
- DA:209,1
612
- DA:210,1
613
- DA:211,1
614
- DA:213,0
615
- DA:218,0
616
- DA:219,0
617
- DA:220,0
618
- DA:224,0
619
- DA:225,0
620
- DA:227,0
621
- DA:228,0
622
- DA:230,0
623
- DA:231,0
624
- DA:234,45
625
- DA:235,0
612
+ DA:205,1
613
+ DA:206,1
614
+ DA:207,1
615
+ DA:215,1
616
+ DA:216,1
617
+ DA:218,1
618
+ DA:219,1
619
+ DA:222,45
620
+ DA:223,1
621
+ DA:224,1
622
+ DA:228,45
623
+ DA:229,1
624
+ DA:230,1
625
+ DA:231,1
626
+ DA:233,0
626
627
  DA:238,0
627
628
  DA:239,0
628
- DA:242,0
629
- DA:243,0
629
+ DA:240,0
630
630
  DA:244,0
631
- DA:246,0
631
+ DA:245,0
632
632
  DA:247,0
633
- DA:249,0
633
+ DA:248,0
634
634
  DA:250,0
635
- DA:254,0
635
+ DA:251,0
636
+ DA:254,45
636
637
  DA:255,0
637
- DA:256,0
638
- DA:257,0
639
638
  DA:258,0
640
639
  DA:259,0
641
- DA:260,0
640
+ DA:261,0
641
+ DA:262,0
642
+ DA:263,0
643
+ DA:264,0
644
+ DA:265,0
642
645
  DA:266,0
643
646
  DA:267,0
644
- DA:268,0
647
+ DA:273,0
648
+ DA:274,0
645
649
  DA:275,0
646
- LF:141
647
- LH:82
650
+ DA:282,0
651
+ LF:144
652
+ LH:83
648
653
  BRDA:41,0,0,0
649
654
  BRDA:41,0,1,1
650
655
  BRDA:41,1,0,1
@@ -655,58 +660,56 @@ BRDA:57,3,0,0
655
660
  BRDA:57,3,1,0
656
661
  BRDA:61,4,0,0
657
662
  BRDA:61,4,1,0
658
- BRDA:75,5,0,0
659
- BRDA:75,5,1,0
660
- BRDA:89,6,0,5
661
- BRDA:89,6,1,1
662
- BRDA:93,7,0,0
663
- BRDA:93,7,1,1
664
- BRDA:101,8,0,0
665
- BRDA:101,8,1,0
666
- BRDA:101,8,2,0
667
- BRDA:105,9,0,1
668
- BRDA:105,9,1,0
663
+ BRDA:76,5,0,0
664
+ BRDA:76,5,1,0
665
+ BRDA:88,6,0,0
666
+ BRDA:88,6,1,0
667
+ BRDA:94,7,0,0
668
+ BRDA:94,7,1,0
669
+ BRDA:108,8,0,5
670
+ BRDA:108,8,1,1
671
+ BRDA:112,9,0,0
672
+ BRDA:112,9,1,1
669
673
  BRDA:120,10,0,0
670
- BRDA:120,10,1,6
671
- BRDA:120,11,0,6
672
- BRDA:120,11,1,0
673
- BRDA:130,12,0,6
674
- BRDA:130,12,1,0
675
- BRDA:132,13,0,0
676
- BRDA:132,13,1,6
677
- BRDA:132,14,0,6
678
- BRDA:132,14,1,6
679
- BRDA:149,15,0,0
680
- BRDA:149,15,1,64
681
- BRDA:154,16,0,0
682
- BRDA:154,16,1,64
683
- BRDA:165,17,0,64
684
- BRDA:165,17,1,0
685
- BRDA:167,18,0,0
686
- BRDA:167,18,1,63
687
- BRDA:167,19,0,63
688
- BRDA:167,19,1,63
689
- BRDA:173,20,0,0
690
- BRDA:173,20,1,63
691
- BRDA:224,21,0,0
692
- BRDA:224,21,1,0
693
- BRDA:227,22,0,0
694
- BRDA:227,22,1,0
695
- BRDA:242,23,0,0
696
- BRDA:242,23,1,0
697
- BRDA:243,24,0,0
698
- BRDA:243,24,1,0
699
- BRDA:249,25,0,0
700
- BRDA:249,25,1,0
701
- BRDA:256,26,0,0
702
- BRDA:256,26,1,0
703
- BRDA:256,27,0,0
704
- BRDA:256,27,1,0
705
- BRDA:259,28,0,0
706
- BRDA:259,28,1,0
707
- BRDA:266,29,0,0
708
- BRDA:266,29,1,0
709
- BRF:61
674
+ BRDA:120,10,1,0
675
+ BRDA:120,10,2,0
676
+ BRDA:124,11,0,1
677
+ BRDA:124,11,1,0
678
+ BRDA:139,12,0,0
679
+ BRDA:139,12,1,6
680
+ BRDA:139,13,0,6
681
+ BRDA:139,13,1,0
682
+ BRDA:149,14,0,6
683
+ BRDA:149,14,1,0
684
+ BRDA:151,15,0,0
685
+ BRDA:151,15,1,6
686
+ BRDA:151,16,0,6
687
+ BRDA:151,16,1,6
688
+ BRDA:168,17,0,0
689
+ BRDA:168,17,1,64
690
+ BRDA:173,18,0,0
691
+ BRDA:173,18,1,64
692
+ BRDA:185,19,0,64
693
+ BRDA:185,19,1,0
694
+ BRDA:187,20,0,0
695
+ BRDA:187,20,1,63
696
+ BRDA:187,21,0,63
697
+ BRDA:187,21,1,63
698
+ BRDA:193,22,0,0
699
+ BRDA:193,22,1,63
700
+ BRDA:244,23,0,0
701
+ BRDA:244,23,1,0
702
+ BRDA:247,24,0,0
703
+ BRDA:247,24,1,0
704
+ BRDA:263,25,0,0
705
+ BRDA:263,25,1,0
706
+ BRDA:263,26,0,0
707
+ BRDA:263,26,1,0
708
+ BRDA:266,27,0,0
709
+ BRDA:266,27,1,0
710
+ BRDA:273,28,0,0
711
+ BRDA:273,28,1,0
712
+ BRF:59
710
713
  BRH:20
711
714
  end_of_record
712
715
  TN:
@@ -56,6 +56,7 @@ exports.buildSchemaFromDb = function (ctx) {
56
56
  else {
57
57
  datasource.entities = tables;
58
58
  }
59
+ setDefaultDisplayColumns(datasource);
59
60
  const dbResp = yield db.put(datasource);
60
61
  datasource._rev = dbResp.rev;
61
62
  const response = { datasource };
@@ -65,6 +66,21 @@ exports.buildSchemaFromDb = function (ctx) {
65
66
  ctx.body = response;
66
67
  });
67
68
  };
69
+ /**
70
+ * Make sure all datasource entities have a display name selected
71
+ */
72
+ const setDefaultDisplayColumns = datasource => {
73
+ //
74
+ for (let entity of Object.values(datasource.entities)) {
75
+ if (entity.primaryDisplay) {
76
+ continue;
77
+ }
78
+ const notAutoColumn = Object.values(entity.schema).find(schema => !schema.autocolumn);
79
+ if (notAutoColumn) {
80
+ entity.primaryDisplay = notAutoColumn.name;
81
+ }
82
+ }
83
+ };
68
84
  /**
69
85
  * Check for variables that have been updated or removed and invalidate them.
70
86
  */
@@ -130,6 +146,7 @@ exports.save = function (ctx) {
130
146
  const { tables, error } = yield buildSchemaHelper(datasource);
131
147
  schemaError = error;
132
148
  datasource.entities = tables;
149
+ setDefaultDisplayColumns(datasource);
133
150
  }
134
151
  const dbResp = yield db.put(datasource);
135
152
  yield events.datasource.created(datasource);
@@ -201,21 +218,10 @@ function updateError(error, newError, tables) {
201
218
  return error;
202
219
  }
203
220
  const buildSchemaHelper = (datasource) => __awaiter(void 0, void 0, void 0, function* () {
204
- var _a;
205
221
  const Connector = yield getIntegration(datasource.source);
206
222
  // Connect to the DB and build the schema
207
223
  const connector = new Connector(datasource.config);
208
224
  yield connector.buildSchema(datasource._id, datasource.entities);
209
- // make sure they all have a display name selected
210
- for (let entity of Object.values((_a = datasource.entities) !== null && _a !== void 0 ? _a : {})) {
211
- if (entity.primaryDisplay) {
212
- continue;
213
- }
214
- const notAutoColumn = Object.values(entity.schema).find(schema => !schema.autocolumn);
215
- if (notAutoColumn) {
216
- entity.primaryDisplay = notAutoColumn.name;
217
- }
218
- }
219
225
  const errors = connector.schemaErrors;
220
226
  let error = null;
221
227
  if (errors && Object.keys(errors).length > 0) {
@@ -91,7 +91,8 @@ function read(ctx, next) {
91
91
  exports.read = read;
92
92
  function update(ctx, next) {
93
93
  return __awaiter(this, void 0, void 0, function* () {
94
- ctx.request.body = yield (0, utils_1.addRev)(fixRow(ctx.request.body, ctx.params));
94
+ const { tableId } = ctx.params;
95
+ ctx.request.body = yield (0, utils_1.addRev)(fixRow(ctx.request.body, ctx.params), tableId);
95
96
  yield rowController.save(ctx);
96
97
  yield next();
97
98
  });
@@ -99,8 +100,9 @@ function update(ctx, next) {
99
100
  exports.update = update;
100
101
  function destroy(ctx, next) {
101
102
  return __awaiter(this, void 0, void 0, function* () {
103
+ const { tableId } = ctx.params;
102
104
  // set the body as expected, with the _id and _rev fields
103
- ctx.request.body = yield (0, utils_1.addRev)(fixRow({ _id: ctx.params.rowId }, ctx.params));
105
+ ctx.request.body = yield (0, utils_1.addRev)(fixRow({ _id: ctx.params.rowId }, ctx.params), tableId);
104
106
  yield rowController.destroy(ctx);
105
107
  // destroy controller doesn't currently return the row as the body, need to adjust this
106
108
  // in the public API to be correct
package/dist/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@budibase/server",
3
3
  "email": "hi@budibase.com",
4
- "version": "2.0.13",
4
+ "version": "2.0.15",
5
5
  "description": "Budibase Web Server",
6
6
  "main": "src/index.ts",
7
7
  "repository": {
@@ -77,11 +77,11 @@
77
77
  "license": "GPL-3.0",
78
78
  "dependencies": {
79
79
  "@apidevtools/swagger-parser": "10.0.3",
80
- "@budibase/backend-core": "^2.0.13",
81
- "@budibase/client": "^2.0.13",
82
- "@budibase/pro": "2.0.13",
83
- "@budibase/string-templates": "^2.0.13",
84
- "@budibase/types": "^2.0.13",
80
+ "@budibase/backend-core": "^2.0.15",
81
+ "@budibase/client": "^2.0.15",
82
+ "@budibase/pro": "2.0.15",
83
+ "@budibase/string-templates": "^2.0.15",
84
+ "@budibase/types": "^2.0.15",
85
85
  "@bull-board/api": "3.7.0",
86
86
  "@bull-board/koa": "3.9.4",
87
87
  "@elastic/elasticsearch": "7.10.0",