@budibase/server 1.0.211 → 1.0.212-alpha.0

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 (218) hide show
  1. package/builder/assets/index.7060ea99.js +1311 -0
  2. package/builder/assets/index.c6912819.css +6 -0
  3. package/builder/index.html +2 -2
  4. package/coverage/clover.xml +132 -122
  5. package/coverage/coverage-final.json +5 -5
  6. package/coverage/lcov-report/api/controllers/apikeys.js.html +1 -1
  7. package/coverage/lcov-report/api/controllers/auth.js.html +1 -1
  8. package/coverage/lcov-report/api/controllers/automation.js.html +1 -1
  9. package/coverage/lcov-report/api/controllers/backup.js.html +9 -6
  10. package/coverage/lcov-report/api/controllers/cloud.js.html +1 -1
  11. package/coverage/lcov-report/api/controllers/component.js.html +1 -1
  12. package/coverage/lcov-report/api/controllers/datasource.js.html +1 -1
  13. package/coverage/lcov-report/api/controllers/dev.js.html +1 -1
  14. package/coverage/lcov-report/api/controllers/index.html +7 -7
  15. package/coverage/lcov-report/api/controllers/integration.js.html +1 -1
  16. package/coverage/lcov-report/api/controllers/layout.js.html +1 -1
  17. package/coverage/lcov-report/api/controllers/metadata.js.html +1 -1
  18. package/coverage/lcov-report/api/controllers/migrations.js.html +1 -1
  19. package/coverage/lcov-report/api/controllers/permission.js.html +1 -1
  20. package/coverage/lcov-report/api/controllers/query/index.html +1 -1
  21. package/coverage/lcov-report/api/controllers/query/validation.js.html +1 -1
  22. package/coverage/lcov-report/api/controllers/role.js.html +1 -1
  23. package/coverage/lcov-report/api/controllers/routing.js.html +1 -1
  24. package/coverage/lcov-report/api/controllers/row/external.js.html +47 -17
  25. package/coverage/lcov-report/api/controllers/row/index.html +22 -22
  26. package/coverage/lcov-report/api/controllers/row/internal.js.html +1 -1
  27. package/coverage/lcov-report/api/controllers/row/internalSearch.js.html +1 -1
  28. package/coverage/lcov-report/api/controllers/row/staticFormula.js.html +1 -1
  29. package/coverage/lcov-report/api/controllers/row/utils.js.html +17 -8
  30. package/coverage/lcov-report/api/controllers/screen.js.html +1 -1
  31. package/coverage/lcov-report/api/controllers/script.js.html +1 -1
  32. package/coverage/lcov-report/api/controllers/table/bulkFormula.js.html +1 -1
  33. package/coverage/lcov-report/api/controllers/table/external.js.html +1 -1
  34. package/coverage/lcov-report/api/controllers/table/index.html +1 -1
  35. package/coverage/lcov-report/api/controllers/table/index.js.html +1 -1
  36. package/coverage/lcov-report/api/controllers/templates.js.html +1 -1
  37. package/coverage/lcov-report/api/controllers/user.js.html +1 -1
  38. package/coverage/lcov-report/api/controllers/view/exporters.js.html +1 -1
  39. package/coverage/lcov-report/api/controllers/view/index.html +1 -1
  40. package/coverage/lcov-report/api/controllers/view/index.js.html +1 -1
  41. package/coverage/lcov-report/api/controllers/view/utils.js.html +1 -1
  42. package/coverage/lcov-report/api/controllers/view/viewBuilder.js.html +1 -1
  43. package/coverage/lcov-report/api/controllers/webhook.js.html +1 -1
  44. package/coverage/lcov-report/api/index.html +1 -1
  45. package/coverage/lcov-report/api/index.js.html +1 -1
  46. package/coverage/lcov-report/api/routes/analytics.js.html +1 -1
  47. package/coverage/lcov-report/api/routes/apikeys.js.html +1 -1
  48. package/coverage/lcov-report/api/routes/auth.js.html +1 -1
  49. package/coverage/lcov-report/api/routes/automation.js.html +1 -1
  50. package/coverage/lcov-report/api/routes/backup.js.html +1 -1
  51. package/coverage/lcov-report/api/routes/cloud.js.html +1 -1
  52. package/coverage/lcov-report/api/routes/component.js.html +1 -1
  53. package/coverage/lcov-report/api/routes/datasource.js.html +1 -1
  54. package/coverage/lcov-report/api/routes/deploy.js.html +1 -1
  55. package/coverage/lcov-report/api/routes/dev.js.html +1 -1
  56. package/coverage/lcov-report/api/routes/index.html +1 -1
  57. package/coverage/lcov-report/api/routes/integration.js.html +1 -1
  58. package/coverage/lcov-report/api/routes/layout.js.html +1 -1
  59. package/coverage/lcov-report/api/routes/metadata.js.html +1 -1
  60. package/coverage/lcov-report/api/routes/migrations.js.html +1 -1
  61. package/coverage/lcov-report/api/routes/permission.js.html +1 -1
  62. package/coverage/lcov-report/api/routes/query.js.html +1 -1
  63. package/coverage/lcov-report/api/routes/role.js.html +1 -1
  64. package/coverage/lcov-report/api/routes/routing.js.html +1 -1
  65. package/coverage/lcov-report/api/routes/screen.js.html +1 -1
  66. package/coverage/lcov-report/api/routes/script.js.html +1 -1
  67. package/coverage/lcov-report/api/routes/table.js.html +1 -1
  68. package/coverage/lcov-report/api/routes/templates.js.html +1 -1
  69. package/coverage/lcov-report/api/routes/user.js.html +1 -1
  70. package/coverage/lcov-report/api/routes/utils/index.html +1 -1
  71. package/coverage/lcov-report/api/routes/utils/validators.js.html +1 -1
  72. package/coverage/lcov-report/api/routes/view.js.html +1 -1
  73. package/coverage/lcov-report/api/routes/webhook.js.html +1 -1
  74. package/coverage/lcov-report/automations/actions.js.html +1 -1
  75. package/coverage/lcov-report/automations/automationUtils.js.html +1 -1
  76. package/coverage/lcov-report/automations/bullboard.js.html +1 -1
  77. package/coverage/lcov-report/automations/index.html +5 -5
  78. package/coverage/lcov-report/automations/index.js.html +1 -1
  79. package/coverage/lcov-report/automations/steps/bash.js.html +1 -1
  80. package/coverage/lcov-report/automations/steps/delay.js.html +1 -1
  81. package/coverage/lcov-report/automations/steps/discord.js.html +1 -1
  82. package/coverage/lcov-report/automations/steps/executeQuery.js.html +1 -1
  83. package/coverage/lcov-report/automations/steps/executeScript.js.html +1 -1
  84. package/coverage/lcov-report/automations/steps/filter.js.html +1 -1
  85. package/coverage/lcov-report/automations/steps/index.html +1 -1
  86. package/coverage/lcov-report/automations/steps/integromat.js.html +1 -1
  87. package/coverage/lcov-report/automations/steps/loop.js.html +1 -1
  88. package/coverage/lcov-report/automations/steps/outgoingWebhook.js.html +1 -1
  89. package/coverage/lcov-report/automations/steps/queryRows.js.html +1 -1
  90. package/coverage/lcov-report/automations/steps/sendSmtpEmail.js.html +1 -1
  91. package/coverage/lcov-report/automations/steps/serverLog.js.html +1 -1
  92. package/coverage/lcov-report/automations/steps/slack.js.html +1 -1
  93. package/coverage/lcov-report/automations/steps/updateRow.js.html +1 -1
  94. package/coverage/lcov-report/automations/steps/utils.js.html +1 -1
  95. package/coverage/lcov-report/automations/steps/zapier.js.html +1 -1
  96. package/coverage/lcov-report/automations/triggerInfo/app.js.html +1 -1
  97. package/coverage/lcov-report/automations/triggerInfo/cron.js.html +1 -1
  98. package/coverage/lcov-report/automations/triggerInfo/index.html +1 -1
  99. package/coverage/lcov-report/automations/triggerInfo/index.js.html +1 -1
  100. package/coverage/lcov-report/automations/triggerInfo/rowDeleted.js.html +1 -1
  101. package/coverage/lcov-report/automations/triggerInfo/rowSaved.js.html +1 -1
  102. package/coverage/lcov-report/automations/triggerInfo/rowUpdated.js.html +1 -1
  103. package/coverage/lcov-report/automations/triggerInfo/webhook.js.html +1 -1
  104. package/coverage/lcov-report/automations/triggers.js.html +4 -4
  105. package/coverage/lcov-report/constants/index.html +1 -1
  106. package/coverage/lcov-report/constants/index.js.html +1 -1
  107. package/coverage/lcov-report/constants/layouts.js.html +1 -1
  108. package/coverage/lcov-report/constants/screens.js.html +1 -1
  109. package/coverage/lcov-report/db/inMemoryView.js.html +1 -1
  110. package/coverage/lcov-report/db/index.html +10 -10
  111. package/coverage/lcov-report/db/index.js.html +1 -1
  112. package/coverage/lcov-report/db/linkedRows/LinkController.js.html +1 -1
  113. package/coverage/lcov-report/db/linkedRows/index.html +1 -1
  114. package/coverage/lcov-report/db/linkedRows/index.js.html +1 -1
  115. package/coverage/lcov-report/db/linkedRows/linkUtils.js.html +1 -1
  116. package/coverage/lcov-report/db/newid.js.html +1 -1
  117. package/coverage/lcov-report/db/utils.js.html +9 -6
  118. package/coverage/lcov-report/events/AutomationEmitter.js.html +1 -1
  119. package/coverage/lcov-report/events/index.html +1 -1
  120. package/coverage/lcov-report/events/index.js.html +1 -1
  121. package/coverage/lcov-report/events/utils.js.html +1 -1
  122. package/coverage/lcov-report/index.html +27 -27
  123. package/coverage/lcov-report/integrations/tests/TestConfiguration.js.html +1 -1
  124. package/coverage/lcov-report/integrations/tests/index.html +1 -1
  125. package/coverage/lcov-report/middleware/appInfo.js.html +1 -1
  126. package/coverage/lcov-report/middleware/builder.js.html +1 -1
  127. package/coverage/lcov-report/middleware/currentapp.js.html +1 -1
  128. package/coverage/lcov-report/middleware/index.html +1 -1
  129. package/coverage/lcov-report/middleware/joi-validator.js.html +1 -1
  130. package/coverage/lcov-report/middleware/publicApi.js.html +1 -1
  131. package/coverage/lcov-report/middleware/resourceId.js.html +1 -1
  132. package/coverage/lcov-report/middleware/selfhost.js.html +1 -1
  133. package/coverage/lcov-report/middleware/utils.js.html +1 -1
  134. package/coverage/lcov-report/threads/automation.js.html +1 -1
  135. package/coverage/lcov-report/threads/index.html +1 -1
  136. package/coverage/lcov-report/threads/query.js.html +1 -1
  137. package/coverage/lcov-report/threads/utils.js.html +1 -1
  138. package/coverage/lcov-report/utilities/budibaseDir.js.html +1 -1
  139. package/coverage/lcov-report/utilities/centralPath.js.html +1 -1
  140. package/coverage/lcov-report/utilities/csvParser.js.html +1 -1
  141. package/coverage/lcov-report/utilities/global.js.html +1 -1
  142. package/coverage/lcov-report/utilities/index.html +1 -1
  143. package/coverage/lcov-report/utilities/index.js.html +1 -1
  144. package/coverage/lcov-report/utilities/queue/inMemoryQueue.js.html +1 -1
  145. package/coverage/lcov-report/utilities/queue/index.html +1 -1
  146. package/coverage/lcov-report/utilities/routing/index.html +1 -1
  147. package/coverage/lcov-report/utilities/routing/index.js.html +1 -1
  148. package/coverage/lcov-report/utilities/rowProcessor/index.html +1 -1
  149. package/coverage/lcov-report/utilities/rowProcessor/index.js.html +1 -1
  150. package/coverage/lcov-report/utilities/rowProcessor/utils.js.html +1 -1
  151. package/coverage/lcov-report/utilities/scriptRunner.js.html +1 -1
  152. package/coverage/lcov-report/utilities/security.js.html +1 -1
  153. package/coverage/lcov-report/utilities/statusCodes.js.html +1 -1
  154. package/coverage/lcov-report/utilities/usageQuota/index.html +1 -1
  155. package/coverage/lcov-report/utilities/usageQuota/rows.js.html +1 -1
  156. package/coverage/lcov-report/utilities/usageQuota/usageQuoteReset.js.html +1 -1
  157. package/coverage/lcov-report/utilities/users.js.html +1 -1
  158. package/coverage/lcov-report/utilities/workerRequests.js.html +1 -1
  159. package/coverage/lcov.info +238 -220
  160. package/dist/api/controllers/backup.js +3 -2
  161. package/dist/api/controllers/row/external.js +19 -7
  162. package/dist/api/controllers/row/utils.js +3 -0
  163. package/dist/automations/triggers.js +1 -1
  164. package/dist/db/utils.js +1 -0
  165. package/dist/definitions/datasource.js +1 -0
  166. package/dist/integrations/airtable.js +1 -0
  167. package/dist/integrations/arangodb.js +1 -0
  168. package/dist/integrations/base/sql.js +20 -3
  169. package/dist/integrations/couchdb.js +1 -0
  170. package/dist/integrations/dynamodb.js +1 -0
  171. package/dist/integrations/elasticsearch.js +1 -0
  172. package/dist/integrations/firebase.js +1 -0
  173. package/dist/integrations/googlesheets.js +1 -0
  174. package/dist/integrations/index.js +4 -0
  175. package/dist/integrations/microsoftSqlServer.js +2 -1
  176. package/dist/integrations/mongodb.js +1 -0
  177. package/dist/integrations/mysql.js +2 -1
  178. package/dist/integrations/oracle.js +1 -0
  179. package/dist/integrations/postgres.js +2 -1
  180. package/dist/integrations/redis.js +1 -0
  181. package/dist/integrations/rest.js +1 -0
  182. package/dist/integrations/s3.js +1 -0
  183. package/dist/integrations/snowflake.js +102 -0
  184. package/dist/package.json +7 -6
  185. package/dist/tsconfig.build.tsbuildinfo +1 -1
  186. package/dist/utilities/fileSystem/index.js +16 -6
  187. package/package.json +8 -7
  188. package/scripts/integrations/oracle/instantclient/linux/arm64/basiclite-19.10.zip +0 -0
  189. package/scripts/integrations/oracle/instantclient/linux/arm64/install.sh +23 -0
  190. package/scripts/integrations/oracle/instantclient/linux/install.sh +10 -0
  191. package/src/api/controllers/backup.js +3 -2
  192. package/src/api/controllers/row/external.js +19 -9
  193. package/src/api/controllers/row/utils.js +3 -0
  194. package/src/automations/triggers.js +1 -1
  195. package/src/db/utils.js +1 -0
  196. package/src/definitions/common.ts +1 -0
  197. package/src/definitions/datasource.ts +2 -0
  198. package/src/integrations/airtable.ts +1 -0
  199. package/src/integrations/arangodb.ts +1 -0
  200. package/src/integrations/base/sql.ts +25 -11
  201. package/src/integrations/couchdb.ts +1 -0
  202. package/src/integrations/dynamodb.ts +1 -0
  203. package/src/integrations/elasticsearch.ts +1 -0
  204. package/src/integrations/firebase.ts +1 -0
  205. package/src/integrations/googlesheets.ts +1 -0
  206. package/src/integrations/index.ts +4 -0
  207. package/src/integrations/microsoftSqlServer.ts +2 -0
  208. package/src/integrations/mongodb.ts +1 -0
  209. package/src/integrations/mysql.ts +2 -0
  210. package/src/integrations/oracle.ts +1 -0
  211. package/src/integrations/postgres.ts +2 -0
  212. package/src/integrations/redis.ts +1 -0
  213. package/src/integrations/rest.ts +1 -0
  214. package/src/integrations/s3.ts +1 -0
  215. package/src/integrations/snowflake.ts +99 -0
  216. package/src/utilities/fileSystem/index.js +22 -8
  217. package/builder/assets/index.24307ca0.css +0 -6
  218. package/builder/assets/index.4c5e5a40.js +0 -1315
@@ -347,7 +347,7 @@ end_of_record
347
347
  TN:
348
348
  SF:src/api/controllers/backup.js
349
349
  FN:5,(anonymous_0)
350
- FN:12,(anonymous_1)
350
+ FN:13,(anonymous_1)
351
351
  FNF:2
352
352
  FNH:2
353
353
  FNDA:1,(anonymous_0)
@@ -361,12 +361,13 @@ DA:7,1
361
361
  DA:8,1
362
362
  DA:9,1
363
363
  DA:10,1
364
- DA:12,1
364
+ DA:11,1
365
365
  DA:13,1
366
366
  DA:14,1
367
367
  DA:15,1
368
- LF:13
369
- LH:13
368
+ DA:16,1
369
+ LF:14
370
+ LH:14
370
371
  BRF:0
371
372
  BRH:0
372
373
  end_of_record
@@ -1773,9 +1774,9 @@ FN:98,(anonymous_8)
1773
1774
  FN:101,(anonymous_9)
1774
1775
  FN:152,(anonymous_10)
1775
1776
  FN:157,(anonymous_11)
1776
- FN:171,(anonymous_12)
1777
- FN:188,(anonymous_13)
1778
- FN:218,(anonymous_14)
1777
+ FN:169,(anonymous_12)
1778
+ FN:198,(anonymous_13)
1779
+ FN:228,(anonymous_14)
1779
1780
  FNF:15
1780
1781
  FNH:0
1781
1782
  FNDA:0,handleRequest
@@ -1872,38 +1873,44 @@ DA:160,0
1872
1873
  DA:161,0
1873
1874
  DA:162,0
1874
1875
  DA:163,0
1875
- DA:165,0
1876
+ DA:164,0
1876
1877
  DA:166,0
1877
- DA:167,0
1878
- DA:171,0
1879
- DA:177,0
1878
+ DA:169,0
1879
+ DA:174,0
1880
+ DA:175,0
1881
+ DA:178,0
1880
1882
  DA:179,0
1881
1883
  DA:180,0
1882
1884
  DA:181,0
1883
- DA:184,0
1884
- DA:185,0
1885
- DA:188,44
1885
+ DA:182,0
1886
+ DA:186,0
1886
1887
  DA:189,0
1887
1888
  DA:190,0
1888
1889
  DA:191,0
1889
- DA:192,0
1890
- DA:193,0
1891
1890
  DA:194,0
1892
1891
  DA:195,0
1893
- DA:197,0
1894
- DA:198,0
1892
+ DA:198,44
1893
+ DA:199,0
1894
+ DA:200,0
1895
+ DA:201,0
1895
1896
  DA:202,0
1896
1897
  DA:203,0
1897
- DA:206,0
1898
+ DA:204,0
1899
+ DA:205,0
1898
1900
  DA:207,0
1901
+ DA:208,0
1899
1902
  DA:212,0
1900
- DA:214,0
1901
- DA:215,0
1903
+ DA:213,0
1902
1904
  DA:216,0
1903
- DA:218,0
1904
- DA:219,0
1905
- DA:232,0
1906
- LF:110
1905
+ DA:217,0
1906
+ DA:222,0
1907
+ DA:224,0
1908
+ DA:225,0
1909
+ DA:226,0
1910
+ DA:228,0
1911
+ DA:229,0
1912
+ DA:242,0
1913
+ LF:116
1907
1914
  LH:18
1908
1915
  BRDA:16,0,0,0
1909
1916
  BRDA:18,1,0,0
@@ -1938,20 +1945,24 @@ BRDA:137,15,0,0
1938
1945
  BRDA:137,15,1,0
1939
1946
  BRDA:137,16,0,0
1940
1947
  BRDA:137,16,1,0
1941
- BRDA:162,17,0,0
1942
- BRDA:162,17,1,0
1943
- BRDA:162,18,0,0
1944
- BRDA:162,18,1,0
1945
- BRDA:194,19,0,0
1946
- BRDA:194,19,1,0
1947
- BRDA:194,20,0,0
1948
- BRDA:194,20,1,0
1949
- BRDA:207,21,0,0
1950
- BRDA:207,21,1,0
1951
- BRDA:208,22,0,0
1952
- BRDA:208,22,1,0
1953
- BRDA:208,22,2,0
1954
- BRF:46
1948
+ BRDA:163,17,0,0
1949
+ BRDA:163,17,1,0
1950
+ BRDA:163,18,0,0
1951
+ BRDA:163,18,1,0
1952
+ BRDA:178,19,0,0
1953
+ BRDA:178,19,1,0
1954
+ BRDA:178,20,0,0
1955
+ BRDA:178,20,1,0
1956
+ BRDA:204,21,0,0
1957
+ BRDA:204,21,1,0
1958
+ BRDA:204,22,0,0
1959
+ BRDA:204,22,1,0
1960
+ BRDA:217,23,0,0
1961
+ BRDA:217,23,1,0
1962
+ BRDA:218,24,0,0
1963
+ BRDA:218,24,1,0
1964
+ BRDA:218,24,2,0
1965
+ BRF:50
1955
1966
  BRH:0
1956
1967
  end_of_record
1957
1968
  TN:
@@ -2737,7 +2748,7 @@ FN:14,(anonymous_1)
2737
2748
  FN:19,(anonymous_2)
2738
2749
  FN:26,(anonymous_3)
2739
2750
  FN:45,(anonymous_4)
2740
- FN:67,(anonymous_5)
2751
+ FN:70,(anonymous_5)
2741
2752
  FNF:6
2742
2753
  FNH:4
2743
2754
  FNDA:2,(anonymous_0)
@@ -2787,17 +2798,19 @@ DA:65,224
2787
2798
  DA:66,0
2788
2799
  DA:67,0
2789
2800
  DA:68,0
2790
- DA:72,0
2801
+ DA:70,0
2802
+ DA:71,0
2791
2803
  DA:75,0
2792
- DA:77,0
2793
- DA:79,224
2794
- DA:81,0
2795
- DA:82,0
2804
+ DA:78,0
2805
+ DA:80,0
2806
+ DA:82,224
2796
2807
  DA:84,0
2797
- DA:87,224
2798
- DA:89,224
2799
- DA:91,83
2800
- LF:51
2808
+ DA:85,0
2809
+ DA:87,0
2810
+ DA:90,224
2811
+ DA:92,224
2812
+ DA:94,83
2813
+ LF:53
2801
2814
  LH:35
2802
2815
  BRDA:30,0,0,0
2803
2816
  BRDA:30,0,1,26
@@ -2817,21 +2830,23 @@ BRDA:65,7,0,224
2817
2830
  BRDA:65,7,1,0
2818
2831
  BRDA:66,8,0,0
2819
2832
  BRDA:66,8,1,0
2820
- BRDA:68,9,0,0
2821
- BRDA:68,9,1,0
2822
- BRDA:69,10,0,0
2823
- BRDA:69,10,1,0
2824
- BRDA:75,11,0,0
2825
- BRDA:75,11,1,0
2826
- BRDA:75,12,0,0
2827
- BRDA:75,12,1,0
2828
- BRDA:79,13,0,0
2829
- BRDA:79,13,1,224
2830
- BRDA:79,14,0,224
2831
- BRDA:79,14,1,0
2832
- BRDA:89,15,0,2
2833
- BRDA:89,15,1,222
2834
- BRF:32
2833
+ BRDA:67,9,0,0
2834
+ BRDA:67,9,1,0
2835
+ BRDA:71,10,0,0
2836
+ BRDA:71,10,1,0
2837
+ BRDA:72,11,0,0
2838
+ BRDA:72,11,1,0
2839
+ BRDA:78,12,0,0
2840
+ BRDA:78,12,1,0
2841
+ BRDA:78,13,0,0
2842
+ BRDA:78,13,1,0
2843
+ BRDA:82,14,0,0
2844
+ BRDA:82,14,1,224
2845
+ BRDA:82,15,0,224
2846
+ BRDA:82,15,1,0
2847
+ BRDA:92,16,0,2
2848
+ BRDA:92,16,1,222
2849
+ BRF:34
2835
2850
  BRH:13
2836
2851
  end_of_record
2837
2852
  TN:
@@ -4653,10 +4668,12 @@ BRDA:91,9,1,6
4653
4668
  BRDA:91,9,2,6
4654
4669
  BRDA:91,9,3,1
4655
4670
  BRDA:91,9,4,1
4656
- BRDA:106,10,0,2
4657
- BRDA:106,10,1,4
4658
- BRF:25
4659
- BRH:21
4671
+ BRDA:100,10,0,1
4672
+ BRDA:100,10,1,0
4673
+ BRDA:106,11,0,2
4674
+ BRDA:106,11,1,4
4675
+ BRF:27
4676
+ BRH:22
4660
4677
  end_of_record
4661
4678
  TN:
4662
4679
  SF:src/automations/steps/bash.js
@@ -5362,36 +5379,36 @@ BRH:0
5362
5379
  end_of_record
5363
5380
  TN:
5364
5381
  SF:src/db/utils.js
5365
- FN:91,(anonymous_0)
5366
- FN:107,getDocParams
5367
- FN:123,(anonymous_2)
5368
- FN:131,(anonymous_3)
5369
- FN:143,(anonymous_4)
5370
- FN:158,(anonymous_5)
5371
- FN:171,(anonymous_6)
5372
- FN:179,(anonymous_7)
5373
- FN:188,(anonymous_8)
5374
- FN:195,(anonymous_9)
5375
- FN:206,(anonymous_10)
5376
- FN:214,(anonymous_11)
5377
- FN:229,(anonymous_12)
5378
- FN:246,(anonymous_13)
5379
- FN:254,(anonymous_14)
5380
- FN:261,(anonymous_15)
5381
- FN:269,(anonymous_16)
5382
- FN:276,(anonymous_17)
5383
- FN:284,(anonymous_18)
5384
- FN:291,(anonymous_19)
5385
- FN:299,(anonymous_20)
5386
- FN:308,(anonymous_21)
5387
- FN:316,(anonymous_22)
5388
- FN:325,(anonymous_23)
5389
- FN:341,(anonymous_24)
5390
- FN:345,(anonymous_25)
5391
- FN:349,(anonymous_26)
5392
- FN:357,(anonymous_27)
5393
- FN:361,(anonymous_28)
5394
- FN:368,(anonymous_29)
5382
+ FN:92,(anonymous_0)
5383
+ FN:108,getDocParams
5384
+ FN:124,(anonymous_2)
5385
+ FN:132,(anonymous_3)
5386
+ FN:144,(anonymous_4)
5387
+ FN:159,(anonymous_5)
5388
+ FN:172,(anonymous_6)
5389
+ FN:180,(anonymous_7)
5390
+ FN:189,(anonymous_8)
5391
+ FN:196,(anonymous_9)
5392
+ FN:207,(anonymous_10)
5393
+ FN:215,(anonymous_11)
5394
+ FN:230,(anonymous_12)
5395
+ FN:247,(anonymous_13)
5396
+ FN:255,(anonymous_14)
5397
+ FN:262,(anonymous_15)
5398
+ FN:270,(anonymous_16)
5399
+ FN:277,(anonymous_17)
5400
+ FN:285,(anonymous_18)
5401
+ FN:292,(anonymous_19)
5402
+ FN:300,(anonymous_20)
5403
+ FN:309,(anonymous_21)
5404
+ FN:317,(anonymous_22)
5405
+ FN:326,(anonymous_23)
5406
+ FN:342,(anonymous_24)
5407
+ FN:346,(anonymous_25)
5408
+ FN:350,(anonymous_26)
5409
+ FN:358,(anonymous_27)
5410
+ FN:362,(anonymous_28)
5411
+ FN:369,(anonymous_29)
5395
5412
  FNF:30
5396
5413
  FNH:25
5397
5414
  FNDA:74,(anonymous_0)
@@ -5450,136 +5467,137 @@ DA:83,57
5450
5467
  DA:84,57
5451
5468
  DA:85,57
5452
5469
  DA:86,57
5453
- DA:88,57
5470
+ DA:87,57
5454
5471
  DA:89,57
5455
- DA:91,57
5456
- DA:92,74
5457
- DA:108,1077
5458
- DA:109,1060
5459
- DA:111,1077
5460
- DA:118,57
5461
- DA:123,57
5462
- DA:124,267
5463
- DA:131,57
5464
- DA:132,128
5465
- DA:143,57
5466
- DA:144,41
5467
- DA:145,27
5468
- DA:148,14
5469
- DA:150,14
5470
- DA:158,57
5471
- DA:159,0
5472
- DA:162,0
5473
- DA:171,57
5474
- DA:172,309
5472
+ DA:90,57
5473
+ DA:92,57
5474
+ DA:93,74
5475
+ DA:109,1077
5476
+ DA:110,1060
5477
+ DA:112,1077
5478
+ DA:119,57
5479
+ DA:124,57
5480
+ DA:125,267
5481
+ DA:132,57
5482
+ DA:133,128
5483
+ DA:144,57
5484
+ DA:145,41
5485
+ DA:146,27
5486
+ DA:149,14
5487
+ DA:151,14
5488
+ DA:159,57
5489
+ DA:160,0
5490
+ DA:163,0
5491
+ DA:172,57
5475
5492
  DA:173,309
5476
- DA:179,57
5477
- DA:180,3
5478
- DA:188,57
5479
- DA:189,231
5480
- DA:195,57
5481
- DA:196,3
5493
+ DA:174,309
5494
+ DA:180,57
5495
+ DA:181,3
5496
+ DA:189,57
5497
+ DA:190,231
5498
+ DA:196,57
5482
5499
  DA:197,3
5483
- DA:198,1
5484
- DA:200,2
5485
- DA:206,57
5486
- DA:207,261
5487
- DA:214,57
5488
- DA:215,27
5489
- DA:229,57
5490
- DA:237,9
5500
+ DA:198,3
5501
+ DA:199,1
5502
+ DA:201,2
5503
+ DA:207,57
5504
+ DA:208,261
5505
+ DA:215,57
5506
+ DA:216,27
5507
+ DA:230,57
5491
5508
  DA:238,9
5492
5509
  DA:239,9
5493
5510
  DA:240,9
5494
- DA:246,57
5495
- DA:247,0
5496
- DA:254,57
5497
- DA:255,6
5498
- DA:261,57
5499
- DA:262,247
5500
- DA:269,57
5501
- DA:270,23
5502
- DA:276,57
5503
- DA:277,249
5504
- DA:284,57
5505
- DA:285,10
5506
- DA:291,57
5507
- DA:292,2
5508
- DA:299,57
5509
- DA:300,52
5510
- DA:308,57
5511
- DA:309,5
5512
- DA:316,57
5513
- DA:317,135
5514
- DA:325,57
5515
- DA:326,5
5516
- DA:327,4
5517
- DA:330,1
5518
- DA:341,57
5519
- DA:342,0
5520
- DA:345,57
5521
- DA:346,10
5522
- DA:349,57
5523
- DA:350,0
5511
+ DA:241,9
5512
+ DA:247,57
5513
+ DA:248,0
5514
+ DA:255,57
5515
+ DA:256,6
5516
+ DA:262,57
5517
+ DA:263,247
5518
+ DA:270,57
5519
+ DA:271,23
5520
+ DA:277,57
5521
+ DA:278,249
5522
+ DA:285,57
5523
+ DA:286,10
5524
+ DA:292,57
5525
+ DA:293,2
5526
+ DA:300,57
5527
+ DA:301,52
5528
+ DA:309,57
5529
+ DA:310,5
5530
+ DA:317,57
5531
+ DA:318,135
5532
+ DA:326,57
5533
+ DA:327,5
5534
+ DA:328,4
5535
+ DA:331,1
5536
+ DA:342,57
5537
+ DA:343,0
5538
+ DA:346,57
5539
+ DA:347,10
5540
+ DA:350,57
5524
5541
  DA:351,0
5525
5542
  DA:352,0
5526
- DA:354,0
5527
- DA:357,57
5528
- DA:358,1
5529
- DA:361,57
5530
- DA:362,0
5531
- DA:368,57
5532
- DA:369,60
5533
- LF:106
5534
- LH:97
5535
- BRDA:107,0,0,0
5536
- BRDA:107,1,0,0
5537
- BRDA:108,2,0,1060
5538
- BRDA:108,2,1,17
5539
- BRDA:123,3,0,0
5540
- BRDA:123,4,0,0
5541
- BRDA:143,5,0,0
5542
- BRDA:143,6,0,0
5543
- BRDA:143,7,0,0
5544
- BRDA:144,8,0,27
5545
- BRDA:144,8,1,14
5546
- BRDA:148,9,0,14
5547
- BRDA:148,9,1,0
5548
- BRDA:171,10,0,78
5549
- BRDA:172,11,0,309
5550
- BRDA:172,11,1,78
5551
- BRDA:179,12,0,0
5552
- BRDA:179,13,0,0
5553
- BRDA:197,14,0,1
5554
- BRDA:197,14,1,2
5555
- BRDA:197,15,0,3
5556
- BRDA:197,15,1,3
5557
- BRDA:206,16,0,0
5558
- BRDA:206,17,0,0
5559
- BRDA:246,18,0,0
5560
- BRDA:255,19,0,6
5561
- BRDA:255,19,1,6
5562
- BRDA:261,20,0,0
5563
- BRDA:261,21,0,0
5564
- BRDA:276,22,0,0
5565
- BRDA:276,23,0,0
5566
- BRDA:291,24,0,0
5567
- BRDA:291,25,0,0
5568
- BRDA:299,26,0,0
5569
- BRDA:299,27,0,52
5570
- BRDA:301,28,0,0
5571
- BRDA:301,28,1,52
5572
- BRDA:308,29,0,0
5573
- BRDA:308,30,0,0
5574
- BRDA:325,31,0,0
5575
- BRDA:325,32,0,0
5576
- BRDA:326,33,0,4
5577
- BRDA:326,33,1,1
5578
- BRDA:349,34,0,0
5579
- BRDA:349,35,0,0
5580
- BRDA:351,36,0,0
5581
- BRDA:351,36,1,0
5582
- BRDA:361,37,0,0
5543
+ DA:353,0
5544
+ DA:355,0
5545
+ DA:358,57
5546
+ DA:359,1
5547
+ DA:362,57
5548
+ DA:363,0
5549
+ DA:369,57
5550
+ DA:370,60
5551
+ LF:107
5552
+ LH:98
5553
+ BRDA:108,0,0,0
5554
+ BRDA:108,1,0,0
5555
+ BRDA:109,2,0,1060
5556
+ BRDA:109,2,1,17
5557
+ BRDA:124,3,0,0
5558
+ BRDA:124,4,0,0
5559
+ BRDA:144,5,0,0
5560
+ BRDA:144,6,0,0
5561
+ BRDA:144,7,0,0
5562
+ BRDA:145,8,0,27
5563
+ BRDA:145,8,1,14
5564
+ BRDA:149,9,0,14
5565
+ BRDA:149,9,1,0
5566
+ BRDA:172,10,0,78
5567
+ BRDA:173,11,0,309
5568
+ BRDA:173,11,1,78
5569
+ BRDA:180,12,0,0
5570
+ BRDA:180,13,0,0
5571
+ BRDA:198,14,0,1
5572
+ BRDA:198,14,1,2
5573
+ BRDA:198,15,0,3
5574
+ BRDA:198,15,1,3
5575
+ BRDA:207,16,0,0
5576
+ BRDA:207,17,0,0
5577
+ BRDA:247,18,0,0
5578
+ BRDA:256,19,0,6
5579
+ BRDA:256,19,1,6
5580
+ BRDA:262,20,0,0
5581
+ BRDA:262,21,0,0
5582
+ BRDA:277,22,0,0
5583
+ BRDA:277,23,0,0
5584
+ BRDA:292,24,0,0
5585
+ BRDA:292,25,0,0
5586
+ BRDA:300,26,0,0
5587
+ BRDA:300,27,0,52
5588
+ BRDA:302,28,0,0
5589
+ BRDA:302,28,1,52
5590
+ BRDA:309,29,0,0
5591
+ BRDA:309,30,0,0
5592
+ BRDA:326,31,0,0
5593
+ BRDA:326,32,0,0
5594
+ BRDA:327,33,0,4
5595
+ BRDA:327,33,1,1
5596
+ BRDA:350,34,0,0
5597
+ BRDA:350,35,0,0
5598
+ BRDA:352,36,0,0
5599
+ BRDA:352,36,1,0
5600
+ BRDA:362,37,0,0
5583
5601
  BRF:48
5584
5602
  BRH:18
5585
5603
  end_of_record
@@ -13,11 +13,12 @@ const { events, context } = require("@budibase/backend-core");
13
13
  const { DocumentTypes } = require("../../db/utils");
14
14
  exports.exportAppDump = function (ctx) {
15
15
  return __awaiter(this, void 0, void 0, function* () {
16
- const { appId } = ctx.query;
16
+ let { appId, excludeRows } = ctx.query;
17
17
  const appName = decodeURI(ctx.query.appname);
18
+ excludeRows = excludeRows === "true";
18
19
  const backupIdentifier = `${appName}-export-${new Date().getTime()}.txt`;
19
20
  ctx.attachment(backupIdentifier);
20
- ctx.body = yield streamBackup(appId);
21
+ ctx.body = yield streamBackup(appId, excludeRows);
21
22
  yield context.doInAppContext(appId, () => __awaiter(this, void 0, void 0, function* () {
22
23
  const appDb = context.getAppDB();
23
24
  const app = yield appDb.get(DocumentTypes.APP_METADATA);
@@ -155,29 +155,41 @@ exports.validate = () => __awaiter(void 0, void 0, void 0, function* () {
155
155
  return { valid: true };
156
156
  });
157
157
  exports.exportRows = (ctx) => __awaiter(void 0, void 0, void 0, function* () {
158
- const { datasourceId, tableName } = breakExternalTableId(ctx.params.tableId);
158
+ const { datasourceId } = breakExternalTableId(ctx.params.tableId);
159
159
  const db = getAppDB();
160
- let format = ctx.query.format;
160
+ const format = ctx.query.format;
161
+ const { columns } = ctx.request.body;
161
162
  const datasource = yield db.get(datasourceId);
162
163
  if (!datasource || !datasource.entities) {
163
164
  ctx.throw(400, "Datasource has not been configured for plus API.");
164
165
  }
165
- const tables = datasource.entities;
166
- const table = tables[tableName];
167
166
  ctx.request.body = {
168
167
  query: {
169
168
  oneOf: {
170
- [table.primaryDisplay]: ctx.request.body.rows.map(id => breakRowIdField(id)[0]),
169
+ _id: ctx.request.body.rows.map(row => JSON.parse(decodeURI(row))[0]),
171
170
  },
172
171
  },
173
172
  };
174
173
  let result = yield exports.search(ctx);
175
- let headers = Object.keys(result.rows[0]);
174
+ let rows = [];
175
+ // Filter data to only specified columns if required
176
+ if (columns && columns.length) {
177
+ for (let i = 0; i < result.rows.length; i++) {
178
+ rows[i] = {};
179
+ for (let column of columns) {
180
+ rows[i][column] = result.rows[i][column];
181
+ }
182
+ }
183
+ }
184
+ else {
185
+ rows = result.rows;
186
+ }
187
+ let headers = Object.keys(rows[0]);
176
188
  const exporter = exporters[format];
177
189
  const filename = `export.${format}`;
178
190
  // send down the file
179
191
  ctx.attachment(filename);
180
- return apiFileReturn(exporter(headers, result.rows));
192
+ return apiFileReturn(exporter(headers, rows));
181
193
  });
182
194
  exports.fetchEnrichedRow = (ctx) => __awaiter(void 0, void 0, void 0, function* () {
183
195
  const id = ctx.params.rowId;
@@ -70,6 +70,9 @@ exports.validate = ({ tableId, row, table }) => __awaiter(void 0, void 0, void 0
70
70
  // Validate.js doesn't seem to handle array
71
71
  if (type === FieldTypes.ARRAY && row[fieldName]) {
72
72
  if (row[fieldName].length) {
73
+ if (!Array.isArray(row[fieldName])) {
74
+ row[fieldName] = row[fieldName].split(",");
75
+ }
73
76
  row[fieldName].map(val => {
74
77
  if (!constraints.inclusion.includes(val) &&
75
78
  constraints.inclusion.length !== 0) {
@@ -95,7 +95,7 @@ exports.externalTrigger = function (automation, params, { getResponses } = {}) {
95
95
  // values are likely to be submitted as strings, so we shall convert to correct type
96
96
  const coercedFields = {};
97
97
  const fields = automation.definition.trigger.inputs.fields;
98
- for (let key of Object.keys(fields)) {
98
+ for (let key of Object.keys(fields || {})) {
99
99
  coercedFields[key] = coerce(params.fields[key], fields[key]);
100
100
  }
101
101
  params.fields = coercedFields;
package/dist/db/utils.js CHANGED
@@ -54,6 +54,7 @@ exports.isDevAppID = isDevAppID;
54
54
  exports.isProdAppID = isProdAppID;
55
55
  exports.USER_METDATA_PREFIX = `${DocumentTypes.ROW}${SEPARATOR}${InternalTables.USER_METADATA}${SEPARATOR}`;
56
56
  exports.LINK_USER_METADATA_PREFIX = `${DocumentTypes.LINK}${SEPARATOR}${InternalTables.USER_METADATA}${SEPARATOR}`;
57
+ exports.TABLE_ROW_PREFIX = `${DocumentTypes.ROW}${SEPARATOR}${DocumentTypes.TABLE}`;
57
58
  exports.ViewNames = ViewNames;
58
59
  exports.InternalTables = InternalTables;
59
60
  exports.DocumentTypes = DocumentTypes;
@@ -52,6 +52,7 @@ var SourceNames;
52
52
  SourceNames["GOOGLE_SHEETS"] = "GOOGLE_SHEETS";
53
53
  SourceNames["FIRESTORE"] = "FIRESTORE";
54
54
  SourceNames["REDIS"] = "REDIS";
55
+ SourceNames["SNOWFLAKE"] = "SNOWFLAKE";
55
56
  })(SourceNames = exports.SourceNames || (exports.SourceNames = {}));
56
57
  var IncludeRelationships;
57
58
  (function (IncludeRelationships) {
@@ -17,6 +17,7 @@ var AirtableModule;
17
17
  docs: "https://airtable.com/api",
18
18
  description: "Airtable is a spreadsheet-database hybrid, with the features of a database but applied to a spreadsheet.",
19
19
  friendlyName: "Airtable",
20
+ type: "Spreadsheet",
20
21
  datasource: {
21
22
  apiKey: {
22
23
  type: datasource_1.DatasourceFieldTypes.PASSWORD,
@@ -16,6 +16,7 @@ var ArangoModule;
16
16
  const SCHEMA = {
17
17
  docs: "https://github.com/arangodb/arangojs",
18
18
  friendlyName: "ArangoDB",
19
+ type: "Non-relational",
19
20
  description: "ArangoDB is a scalable open-source multi-model database natively supporting graph, document and search. All supported data models & access patterns can be combined in queries allowing for maximal flexibility. ",
20
21
  datasource: {
21
22
  url: {