@budibase/server 1.0.145 → 1.0.148

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (177) hide show
  1. package/__mocks__/@google-cloud/firestore.ts +36 -0
  2. package/__mocks__/pg.ts +1 -9
  3. package/builder/assets/{index.6b7d3283.js → index.63d4b14b.js} +2 -2
  4. package/builder/index.html +1 -1
  5. package/coverage/clover.xml +94 -101
  6. package/coverage/coverage-final.json +2 -2
  7. package/coverage/lcov-report/api/controllers/analytics.js.html +1 -1
  8. package/coverage/lcov-report/api/controllers/apikeys.js.html +1 -1
  9. package/coverage/lcov-report/api/controllers/auth.js.html +1 -1
  10. package/coverage/lcov-report/api/controllers/automation.js.html +1 -1
  11. package/coverage/lcov-report/api/controllers/backup.js.html +1 -1
  12. package/coverage/lcov-report/api/controllers/cloud.js.html +1 -1
  13. package/coverage/lcov-report/api/controllers/component.js.html +1 -1
  14. package/coverage/lcov-report/api/controllers/datasource.js.html +1 -1
  15. package/coverage/lcov-report/api/controllers/dev.js.html +1 -1
  16. package/coverage/lcov-report/api/controllers/index.html +1 -1
  17. package/coverage/lcov-report/api/controllers/integration.js.html +1 -1
  18. package/coverage/lcov-report/api/controllers/layout.js.html +1 -1
  19. package/coverage/lcov-report/api/controllers/metadata.js.html +1 -1
  20. package/coverage/lcov-report/api/controllers/migrations.js.html +1 -1
  21. package/coverage/lcov-report/api/controllers/permission.js.html +1 -1
  22. package/coverage/lcov-report/api/controllers/query/index.html +1 -1
  23. package/coverage/lcov-report/api/controllers/query/validation.js.html +1 -1
  24. package/coverage/lcov-report/api/controllers/role.js.html +1 -1
  25. package/coverage/lcov-report/api/controllers/routing.js.html +1 -1
  26. package/coverage/lcov-report/api/controllers/row/external.js.html +1 -1
  27. package/coverage/lcov-report/api/controllers/row/index.html +1 -1
  28. package/coverage/lcov-report/api/controllers/row/internal.js.html +1 -1
  29. package/coverage/lcov-report/api/controllers/row/internalSearch.js.html +1 -1
  30. package/coverage/lcov-report/api/controllers/row/staticFormula.js.html +1 -1
  31. package/coverage/lcov-report/api/controllers/row/utils.js.html +1 -1
  32. package/coverage/lcov-report/api/controllers/screen.js.html +1 -1
  33. package/coverage/lcov-report/api/controllers/script.js.html +1 -1
  34. package/coverage/lcov-report/api/controllers/table/bulkFormula.js.html +1 -1
  35. package/coverage/lcov-report/api/controllers/table/external.js.html +1 -1
  36. package/coverage/lcov-report/api/controllers/table/index.html +1 -1
  37. package/coverage/lcov-report/api/controllers/table/index.js.html +1 -1
  38. package/coverage/lcov-report/api/controllers/templates.js.html +1 -1
  39. package/coverage/lcov-report/api/controllers/user.js.html +1 -1
  40. package/coverage/lcov-report/api/controllers/view/exporters.js.html +1 -1
  41. package/coverage/lcov-report/api/controllers/view/index.html +1 -1
  42. package/coverage/lcov-report/api/controllers/view/index.js.html +1 -1
  43. package/coverage/lcov-report/api/controllers/view/utils.js.html +1 -1
  44. package/coverage/lcov-report/api/controllers/view/viewBuilder.js.html +1 -1
  45. package/coverage/lcov-report/api/controllers/webhook.js.html +1 -1
  46. package/coverage/lcov-report/api/index.html +1 -1
  47. package/coverage/lcov-report/api/index.js.html +1 -1
  48. package/coverage/lcov-report/api/routes/analytics.js.html +1 -1
  49. package/coverage/lcov-report/api/routes/apikeys.js.html +1 -1
  50. package/coverage/lcov-report/api/routes/auth.js.html +1 -1
  51. package/coverage/lcov-report/api/routes/automation.js.html +1 -1
  52. package/coverage/lcov-report/api/routes/backup.js.html +1 -1
  53. package/coverage/lcov-report/api/routes/cloud.js.html +1 -1
  54. package/coverage/lcov-report/api/routes/component.js.html +1 -1
  55. package/coverage/lcov-report/api/routes/datasource.js.html +1 -1
  56. package/coverage/lcov-report/api/routes/deploy.js.html +1 -1
  57. package/coverage/lcov-report/api/routes/dev.js.html +1 -1
  58. package/coverage/lcov-report/api/routes/index.html +1 -1
  59. package/coverage/lcov-report/api/routes/integration.js.html +1 -1
  60. package/coverage/lcov-report/api/routes/layout.js.html +1 -1
  61. package/coverage/lcov-report/api/routes/metadata.js.html +1 -1
  62. package/coverage/lcov-report/api/routes/migrations.js.html +1 -1
  63. package/coverage/lcov-report/api/routes/permission.js.html +1 -1
  64. package/coverage/lcov-report/api/routes/query.js.html +1 -1
  65. package/coverage/lcov-report/api/routes/role.js.html +1 -1
  66. package/coverage/lcov-report/api/routes/routing.js.html +1 -1
  67. package/coverage/lcov-report/api/routes/screen.js.html +1 -1
  68. package/coverage/lcov-report/api/routes/script.js.html +1 -1
  69. package/coverage/lcov-report/api/routes/table.js.html +1 -1
  70. package/coverage/lcov-report/api/routes/templates.js.html +1 -1
  71. package/coverage/lcov-report/api/routes/user.js.html +1 -1
  72. package/coverage/lcov-report/api/routes/utils/index.html +1 -1
  73. package/coverage/lcov-report/api/routes/utils/validators.js.html +1 -1
  74. package/coverage/lcov-report/api/routes/view.js.html +1 -1
  75. package/coverage/lcov-report/api/routes/webhook.js.html +1 -1
  76. package/coverage/lcov-report/automations/actions.js.html +1 -1
  77. package/coverage/lcov-report/automations/automationUtils.js.html +1 -1
  78. package/coverage/lcov-report/automations/bullboard.js.html +1 -1
  79. package/coverage/lcov-report/automations/index.html +1 -1
  80. package/coverage/lcov-report/automations/index.js.html +1 -1
  81. package/coverage/lcov-report/automations/steps/bash.js.html +1 -1
  82. package/coverage/lcov-report/automations/steps/delay.js.html +1 -1
  83. package/coverage/lcov-report/automations/steps/discord.js.html +1 -1
  84. package/coverage/lcov-report/automations/steps/executeQuery.js.html +1 -1
  85. package/coverage/lcov-report/automations/steps/executeScript.js.html +1 -1
  86. package/coverage/lcov-report/automations/steps/filter.js.html +1 -1
  87. package/coverage/lcov-report/automations/steps/index.html +1 -1
  88. package/coverage/lcov-report/automations/steps/integromat.js.html +1 -1
  89. package/coverage/lcov-report/automations/steps/loop.js.html +1 -1
  90. package/coverage/lcov-report/automations/steps/outgoingWebhook.js.html +1 -1
  91. package/coverage/lcov-report/automations/steps/queryRows.js.html +1 -1
  92. package/coverage/lcov-report/automations/steps/sendSmtpEmail.js.html +1 -1
  93. package/coverage/lcov-report/automations/steps/serverLog.js.html +1 -1
  94. package/coverage/lcov-report/automations/steps/slack.js.html +1 -1
  95. package/coverage/lcov-report/automations/steps/updateRow.js.html +1 -1
  96. package/coverage/lcov-report/automations/steps/utils.js.html +1 -1
  97. package/coverage/lcov-report/automations/steps/zapier.js.html +1 -1
  98. package/coverage/lcov-report/automations/triggerInfo/app.js.html +1 -1
  99. package/coverage/lcov-report/automations/triggerInfo/cron.js.html +1 -1
  100. package/coverage/lcov-report/automations/triggerInfo/index.html +1 -1
  101. package/coverage/lcov-report/automations/triggerInfo/index.js.html +1 -1
  102. package/coverage/lcov-report/automations/triggerInfo/rowDeleted.js.html +1 -1
  103. package/coverage/lcov-report/automations/triggerInfo/rowSaved.js.html +1 -1
  104. package/coverage/lcov-report/automations/triggerInfo/rowUpdated.js.html +1 -1
  105. package/coverage/lcov-report/automations/triggerInfo/webhook.js.html +1 -1
  106. package/coverage/lcov-report/automations/triggers.js.html +1 -1
  107. package/coverage/lcov-report/constants/index.html +1 -1
  108. package/coverage/lcov-report/constants/index.js.html +1 -1
  109. package/coverage/lcov-report/constants/layouts.js.html +1 -1
  110. package/coverage/lcov-report/constants/screens.js.html +1 -1
  111. package/coverage/lcov-report/db/inMemoryView.js.html +1 -1
  112. package/coverage/lcov-report/db/index.html +18 -18
  113. package/coverage/lcov-report/db/index.js.html +1 -1
  114. package/coverage/lcov-report/db/linkedRows/LinkController.js.html +1 -1
  115. package/coverage/lcov-report/db/linkedRows/index.html +1 -1
  116. package/coverage/lcov-report/db/linkedRows/index.js.html +1 -1
  117. package/coverage/lcov-report/db/linkedRows/linkUtils.js.html +1 -1
  118. package/coverage/lcov-report/db/newid.js.html +2 -2
  119. package/coverage/lcov-report/db/utils.js.html +18 -72
  120. package/coverage/lcov-report/events/AutomationEmitter.js.html +1 -1
  121. package/coverage/lcov-report/events/index.html +1 -1
  122. package/coverage/lcov-report/events/index.js.html +1 -1
  123. package/coverage/lcov-report/events/utils.js.html +1 -1
  124. package/coverage/lcov-report/index.html +19 -19
  125. package/coverage/lcov-report/integrations/tests/TestConfiguration.js.html +1 -1
  126. package/coverage/lcov-report/integrations/tests/index.html +1 -1
  127. package/coverage/lcov-report/middleware/appInfo.js.html +1 -1
  128. package/coverage/lcov-report/middleware/builder.js.html +1 -1
  129. package/coverage/lcov-report/middleware/currentapp.js.html +1 -1
  130. package/coverage/lcov-report/middleware/index.html +1 -1
  131. package/coverage/lcov-report/middleware/joi-validator.js.html +1 -1
  132. package/coverage/lcov-report/middleware/publicApi.js.html +1 -1
  133. package/coverage/lcov-report/middleware/resourceId.js.html +1 -1
  134. package/coverage/lcov-report/middleware/selfhost.js.html +1 -1
  135. package/coverage/lcov-report/middleware/utils.js.html +1 -1
  136. package/coverage/lcov-report/threads/automation.js.html +1 -1
  137. package/coverage/lcov-report/threads/index.html +1 -1
  138. package/coverage/lcov-report/threads/query.js.html +1 -1
  139. package/coverage/lcov-report/threads/utils.js.html +1 -1
  140. package/coverage/lcov-report/utilities/bcrypt.js.html +1 -1
  141. package/coverage/lcov-report/utilities/budibaseDir.js.html +1 -1
  142. package/coverage/lcov-report/utilities/centralPath.js.html +1 -1
  143. package/coverage/lcov-report/utilities/csvParser.js.html +1 -1
  144. package/coverage/lcov-report/utilities/global.js.html +1 -1
  145. package/coverage/lcov-report/utilities/index.html +1 -1
  146. package/coverage/lcov-report/utilities/index.js.html +1 -1
  147. package/coverage/lcov-report/utilities/queue/inMemoryQueue.js.html +1 -1
  148. package/coverage/lcov-report/utilities/queue/index.html +1 -1
  149. package/coverage/lcov-report/utilities/routing/index.html +1 -1
  150. package/coverage/lcov-report/utilities/routing/index.js.html +1 -1
  151. package/coverage/lcov-report/utilities/rowProcessor/index.html +1 -1
  152. package/coverage/lcov-report/utilities/rowProcessor/index.js.html +1 -1
  153. package/coverage/lcov-report/utilities/rowProcessor/utils.js.html +1 -1
  154. package/coverage/lcov-report/utilities/scriptRunner.js.html +1 -1
  155. package/coverage/lcov-report/utilities/security.js.html +1 -1
  156. package/coverage/lcov-report/utilities/statusCodes.js.html +1 -1
  157. package/coverage/lcov-report/utilities/usageQuota/index.html +1 -1
  158. package/coverage/lcov-report/utilities/usageQuota/rows.js.html +1 -1
  159. package/coverage/lcov-report/utilities/usageQuota/usageQuoteReset.js.html +1 -1
  160. package/coverage/lcov-report/utilities/users.js.html +1 -1
  161. package/coverage/lcov-report/utilities/workerRequests.js.html +1 -1
  162. package/coverage/lcov.info +187 -201
  163. package/dist/api/controllers/row/ExternalRequest.js +3 -2
  164. package/dist/db/utils.js +3 -21
  165. package/dist/integrations/firebase.js +9 -9
  166. package/dist/integrations/index.js +1 -0
  167. package/dist/integrations/postgres.js +15 -11
  168. package/dist/package.json +5 -5
  169. package/dist/tsconfig.build.tsbuildinfo +1 -1
  170. package/package.json +6 -6
  171. package/src/api/controllers/row/ExternalRequest.ts +3 -2
  172. package/src/db/utils.js +4 -22
  173. package/src/integrations/firebase.ts +10 -10
  174. package/src/integrations/index.ts +1 -0
  175. package/src/integrations/postgres.ts +9 -11
  176. package/src/integrations/tests/firebase.spec.js +92 -0
  177. package/src/integrations/tests/postgres.spec.js +0 -4
@@ -91,7 +91,7 @@
91
91
  <div class='footer quiet pad2 space-top1 center small'>
92
92
  Code coverage generated by
93
93
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
94
- at Thu May 05 2022 23:48:40 GMT+0000 (Coordinated Universal Time)
94
+ at Mon May 09 2022 13:23:15 GMT+0000 (Coordinated Universal Time)
95
95
  </div>
96
96
  <script src="../prettify.js"></script>
97
97
  <script>
@@ -116,7 +116,7 @@
116
116
  <div class='footer quiet pad2 space-top1 center small'>
117
117
  Code coverage generated by
118
118
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
119
- at Thu May 05 2022 23:48:40 GMT+0000 (Coordinated Universal Time)
119
+ at Mon May 09 2022 13:23:15 GMT+0000 (Coordinated Universal Time)
120
120
  </div>
121
121
  <script src="../../prettify.js"></script>
122
122
  <script>
@@ -307,7 +307,7 @@ exports.getUniqueRows = async appIds =&gt; {
307
307
  <div class='footer quiet pad2 space-top1 center small'>
308
308
  Code coverage generated by
309
309
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
310
- at Thu May 05 2022 23:48:40 GMT+0000 (Coordinated Universal Time)
310
+ at Mon May 09 2022 13:23:15 GMT+0000 (Coordinated Universal Time)
311
311
  </div>
312
312
  <script src="../../prettify.js"></script>
313
313
  <script>
@@ -124,7 +124,7 @@ function <span class="fstat-no" title="function not covered" >resetQuotasIfRequi
124
124
  <div class='footer quiet pad2 space-top1 center small'>
125
125
  Code coverage generated by
126
126
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
127
- at Thu May 05 2022 23:48:40 GMT+0000 (Coordinated Universal Time)
127
+ at Mon May 09 2022 13:23:15 GMT+0000 (Coordinated Universal Time)
128
128
  </div>
129
129
  <script src="../../prettify.js"></script>
130
130
  <script>
@@ -142,7 +142,7 @@ exports.getFullUser = async (ctx, userId) =&gt; {
142
142
  <div class='footer quiet pad2 space-top1 center small'>
143
143
  Code coverage generated by
144
144
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
145
- at Thu May 05 2022 23:48:40 GMT+0000 (Coordinated Universal Time)
145
+ at Mon May 09 2022 13:23:15 GMT+0000 (Coordinated Universal Time)
146
146
  </div>
147
147
  <script src="../prettify.js"></script>
148
148
  <script>
@@ -487,7 +487,7 @@ exports.readGlobalUser = <span class="fstat-no" title="function not covered" >as
487
487
  <div class='footer quiet pad2 space-top1 center small'>
488
488
  Code coverage generated by
489
489
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
490
- at Thu May 05 2022 23:48:40 GMT+0000 (Coordinated Universal Time)
490
+ at Mon May 09 2022 13:23:15 GMT+0000 (Coordinated Universal Time)
491
491
  </div>
492
492
  <script src="../prettify.js"></script>
493
493
  <script>
@@ -5173,10 +5173,10 @@ SF:src/db/newid.js
5173
5173
  FN:3,(anonymous_0)
5174
5174
  FNF:1
5175
5175
  FNH:1
5176
- FNDA:996,(anonymous_0)
5176
+ FNDA:797,(anonymous_0)
5177
5177
  DA:1,54
5178
5178
  DA:3,54
5179
- DA:4,996
5179
+ DA:4,797
5180
5180
  LF:3
5181
5181
  LH:3
5182
5182
  BRF:0
@@ -5184,40 +5184,38 @@ BRH:0
5184
5184
  end_of_record
5185
5185
  TN:
5186
5186
  SF:src/db/utils.js
5187
- FN:87,(anonymous_0)
5188
- FN:103,getDocParams
5189
- FN:119,(anonymous_2)
5190
- FN:127,(anonymous_3)
5191
- FN:139,(anonymous_4)
5192
- FN:154,(anonymous_5)
5193
- FN:167,(anonymous_6)
5194
- FN:175,(anonymous_7)
5195
- FN:184,(anonymous_8)
5196
- FN:191,(anonymous_9)
5197
- FN:202,(anonymous_10)
5198
- FN:210,(anonymous_11)
5199
- FN:225,(anonymous_12)
5200
- FN:242,(anonymous_13)
5201
- FN:250,(anonymous_14)
5202
- FN:262,(anonymous_15)
5203
- FN:272,(anonymous_16)
5204
- FN:279,(anonymous_17)
5205
- FN:287,(anonymous_18)
5206
- FN:294,(anonymous_19)
5207
- FN:302,(anonymous_20)
5208
- FN:309,(anonymous_21)
5209
- FN:317,(anonymous_22)
5210
- FN:326,(anonymous_23)
5211
- FN:334,(anonymous_24)
5212
- FN:343,(anonymous_25)
5213
- FN:359,(anonymous_26)
5214
- FN:363,(anonymous_27)
5215
- FN:367,(anonymous_28)
5216
- FN:375,(anonymous_29)
5217
- FN:379,(anonymous_30)
5218
- FN:386,(anonymous_31)
5219
- FNF:32
5220
- FNH:27
5187
+ FN:91,(anonymous_0)
5188
+ FN:107,getDocParams
5189
+ FN:123,(anonymous_2)
5190
+ FN:131,(anonymous_3)
5191
+ FN:143,(anonymous_4)
5192
+ FN:158,(anonymous_5)
5193
+ FN:171,(anonymous_6)
5194
+ FN:179,(anonymous_7)
5195
+ FN:188,(anonymous_8)
5196
+ FN:195,(anonymous_9)
5197
+ FN:206,(anonymous_10)
5198
+ FN:214,(anonymous_11)
5199
+ FN:229,(anonymous_12)
5200
+ FN:246,(anonymous_13)
5201
+ FN:254,(anonymous_14)
5202
+ FN:261,(anonymous_15)
5203
+ FN:269,(anonymous_16)
5204
+ FN:276,(anonymous_17)
5205
+ FN:284,(anonymous_18)
5206
+ FN:291,(anonymous_19)
5207
+ FN:299,(anonymous_20)
5208
+ FN:308,(anonymous_21)
5209
+ FN:316,(anonymous_22)
5210
+ FN:325,(anonymous_23)
5211
+ FN:341,(anonymous_24)
5212
+ FN:345,(anonymous_25)
5213
+ FN:349,(anonymous_26)
5214
+ FN:357,(anonymous_27)
5215
+ FN:361,(anonymous_28)
5216
+ FN:368,(anonymous_29)
5217
+ FNF:30
5218
+ FNH:25
5221
5219
  FNDA:74,(anonymous_0)
5222
5220
  FNDA:908,getDocParams
5223
5221
  FNDA:220,(anonymous_2)
@@ -5232,36 +5230,32 @@ FNDA:225,(anonymous_10)
5232
5230
  FNDA:20,(anonymous_11)
5233
5231
  FNDA:9,(anonymous_12)
5234
5232
  FNDA:0,(anonymous_13)
5235
- FNDA:199,(anonymous_14)
5236
- FNDA:199,(anonymous_15)
5237
- FNDA:5,(anonymous_16)
5238
- FNDA:212,(anonymous_17)
5239
- FNDA:19,(anonymous_18)
5240
- FNDA:214,(anonymous_19)
5241
- FNDA:10,(anonymous_20)
5242
- FNDA:2,(anonymous_21)
5243
- FNDA:39,(anonymous_22)
5233
+ FNDA:5,(anonymous_14)
5234
+ FNDA:212,(anonymous_15)
5235
+ FNDA:19,(anonymous_16)
5236
+ FNDA:214,(anonymous_17)
5237
+ FNDA:10,(anonymous_18)
5238
+ FNDA:2,(anonymous_19)
5239
+ FNDA:39,(anonymous_20)
5240
+ FNDA:4,(anonymous_21)
5241
+ FNDA:131,(anonymous_22)
5244
5242
  FNDA:4,(anonymous_23)
5245
- FNDA:131,(anonymous_24)
5246
- FNDA:4,(anonymous_25)
5243
+ FNDA:0,(anonymous_24)
5244
+ FNDA:10,(anonymous_25)
5247
5245
  FNDA:0,(anonymous_26)
5248
- FNDA:10,(anonymous_27)
5246
+ FNDA:1,(anonymous_27)
5249
5247
  FNDA:0,(anonymous_28)
5250
- FNDA:1,(anonymous_29)
5251
- FNDA:0,(anonymous_30)
5252
- FNDA:60,(anonymous_31)
5248
+ FNDA:60,(anonymous_29)
5253
5249
  DA:1,54
5254
- DA:12,54
5255
5250
  DA:14,54
5256
5251
  DA:16,54
5257
- DA:22,54
5258
- DA:46,54
5259
- DA:51,54
5260
- DA:55,54
5261
- DA:59,54
5252
+ DA:18,54
5253
+ DA:24,54
5254
+ DA:48,54
5255
+ DA:53,54
5256
+ DA:57,54
5262
5257
  DA:61,54
5263
- DA:69,54
5264
- DA:70,54
5258
+ DA:63,54
5265
5259
  DA:71,54
5266
5260
  DA:72,54
5267
5261
  DA:73,54
@@ -5274,150 +5268,142 @@ DA:79,54
5274
5268
  DA:80,54
5275
5269
  DA:81,54
5276
5270
  DA:82,54
5271
+ DA:83,54
5277
5272
  DA:84,54
5278
5273
  DA:85,54
5279
- DA:87,54
5280
- DA:88,74
5281
- DA:104,908
5282
- DA:105,893
5283
- DA:107,908
5284
- DA:114,54
5285
- DA:119,54
5286
- DA:120,220
5287
- DA:127,54
5288
- DA:128,105
5289
- DA:139,54
5290
- DA:140,27
5291
- DA:141,15
5292
- DA:144,12
5293
- DA:146,12
5294
- DA:154,54
5295
- DA:155,0
5296
- DA:158,0
5297
- DA:167,54
5298
- DA:168,264
5299
- DA:169,264
5300
- DA:175,54
5301
- DA:176,3
5302
- DA:184,54
5303
- DA:185,193
5304
- DA:191,54
5305
- DA:192,2
5306
- DA:193,2
5307
- DA:194,1
5308
- DA:196,1
5309
- DA:202,54
5310
- DA:203,225
5311
- DA:210,54
5312
- DA:211,20
5313
- DA:225,54
5314
- DA:233,9
5315
- DA:234,9
5316
- DA:235,9
5317
- DA:236,9
5318
- DA:242,54
5319
- DA:243,0
5320
- DA:250,54
5321
- DA:251,199
5322
- DA:252,199
5323
- DA:253,0
5324
- DA:255,199
5325
- DA:262,54
5326
- DA:263,199
5327
- DA:264,199
5328
- DA:265,199
5329
- DA:272,54
5330
- DA:273,5
5331
- DA:279,54
5332
- DA:280,212
5333
- DA:287,54
5334
- DA:288,19
5335
- DA:294,54
5336
- DA:295,214
5337
- DA:302,54
5338
- DA:303,10
5339
- DA:309,54
5340
- DA:310,2
5341
- DA:317,54
5342
- DA:318,39
5343
- DA:326,54
5344
- DA:327,4
5345
- DA:334,54
5346
- DA:335,131
5347
- DA:343,54
5348
- DA:344,4
5349
- DA:345,3
5350
- DA:348,1
5351
- DA:359,54
5352
- DA:360,0
5353
- DA:363,54
5354
- DA:364,10
5355
- DA:367,54
5356
- DA:368,0
5357
- DA:369,0
5358
- DA:370,0
5359
- DA:372,0
5360
- DA:375,54
5361
- DA:376,1
5362
- DA:379,54
5363
- DA:380,0
5364
- DA:386,54
5365
- DA:387,60
5366
- LF:113
5367
- LH:103
5368
- BRDA:103,0,0,0
5369
- BRDA:103,1,0,0
5370
- BRDA:104,2,0,893
5371
- BRDA:104,2,1,15
5372
- BRDA:119,3,0,0
5373
- BRDA:119,4,0,0
5374
- BRDA:139,5,0,0
5375
- BRDA:139,6,0,0
5376
- BRDA:139,7,0,0
5377
- BRDA:140,8,0,15
5378
- BRDA:140,8,1,12
5379
- BRDA:144,9,0,12
5380
- BRDA:144,9,1,0
5381
- BRDA:167,10,0,71
5382
- BRDA:168,11,0,264
5383
- BRDA:168,11,1,71
5384
- BRDA:175,12,0,0
5385
- BRDA:175,13,0,0
5386
- BRDA:193,14,0,1
5387
- BRDA:193,14,1,1
5388
- BRDA:193,15,0,2
5389
- BRDA:193,15,1,2
5390
- BRDA:202,16,0,0
5391
- BRDA:202,17,0,0
5392
- BRDA:242,18,0,0
5393
- BRDA:250,19,0,0
5394
- BRDA:252,20,0,0
5395
- BRDA:252,20,1,199
5396
- BRDA:273,21,0,5
5397
- BRDA:273,21,1,5
5398
- BRDA:279,22,0,0
5399
- BRDA:279,23,0,0
5400
- BRDA:294,24,0,0
5401
- BRDA:294,25,0,0
5402
- BRDA:309,26,0,0
5403
- BRDA:309,27,0,0
5404
- BRDA:317,28,0,0
5405
- BRDA:317,29,0,39
5406
- BRDA:319,30,0,0
5407
- BRDA:319,30,1,39
5408
- BRDA:326,31,0,0
5409
- BRDA:326,32,0,0
5410
- BRDA:343,33,0,0
5411
- BRDA:343,34,0,0
5412
- BRDA:344,35,0,3
5413
- BRDA:344,35,1,1
5414
- BRDA:367,36,0,0
5415
- BRDA:367,37,0,0
5416
- BRDA:369,38,0,0
5417
- BRDA:369,38,1,0
5418
- BRDA:379,39,0,0
5419
- BRF:51
5420
- BRH:19
5274
+ DA:86,54
5275
+ DA:88,54
5276
+ DA:89,54
5277
+ DA:91,54
5278
+ DA:92,74
5279
+ DA:108,908
5280
+ DA:109,893
5281
+ DA:111,908
5282
+ DA:118,54
5283
+ DA:123,54
5284
+ DA:124,220
5285
+ DA:131,54
5286
+ DA:132,105
5287
+ DA:143,54
5288
+ DA:144,27
5289
+ DA:145,15
5290
+ DA:148,12
5291
+ DA:150,12
5292
+ DA:158,54
5293
+ DA:159,0
5294
+ DA:162,0
5295
+ DA:171,54
5296
+ DA:172,264
5297
+ DA:173,264
5298
+ DA:179,54
5299
+ DA:180,3
5300
+ DA:188,54
5301
+ DA:189,193
5302
+ DA:195,54
5303
+ DA:196,2
5304
+ DA:197,2
5305
+ DA:198,1
5306
+ DA:200,1
5307
+ DA:206,54
5308
+ DA:207,225
5309
+ DA:214,54
5310
+ DA:215,20
5311
+ DA:229,54
5312
+ DA:237,9
5313
+ DA:238,9
5314
+ DA:239,9
5315
+ DA:240,9
5316
+ DA:246,54
5317
+ DA:247,0
5318
+ DA:254,54
5319
+ DA:255,5
5320
+ DA:261,54
5321
+ DA:262,212
5322
+ DA:269,54
5323
+ DA:270,19
5324
+ DA:276,54
5325
+ DA:277,214
5326
+ DA:284,54
5327
+ DA:285,10
5328
+ DA:291,54
5329
+ DA:292,2
5330
+ DA:299,54
5331
+ DA:300,39
5332
+ DA:308,54
5333
+ DA:309,4
5334
+ DA:316,54
5335
+ DA:317,131
5336
+ DA:325,54
5337
+ DA:326,4
5338
+ DA:327,3
5339
+ DA:330,1
5340
+ DA:341,54
5341
+ DA:342,0
5342
+ DA:345,54
5343
+ DA:346,10
5344
+ DA:349,54
5345
+ DA:350,0
5346
+ DA:351,0
5347
+ DA:352,0
5348
+ DA:354,0
5349
+ DA:357,54
5350
+ DA:358,1
5351
+ DA:361,54
5352
+ DA:362,0
5353
+ DA:368,54
5354
+ DA:369,60
5355
+ LF:106
5356
+ LH:97
5357
+ BRDA:107,0,0,0
5358
+ BRDA:107,1,0,0
5359
+ BRDA:108,2,0,893
5360
+ BRDA:108,2,1,15
5361
+ BRDA:123,3,0,0
5362
+ BRDA:123,4,0,0
5363
+ BRDA:143,5,0,0
5364
+ BRDA:143,6,0,0
5365
+ BRDA:143,7,0,0
5366
+ BRDA:144,8,0,15
5367
+ BRDA:144,8,1,12
5368
+ BRDA:148,9,0,12
5369
+ BRDA:148,9,1,0
5370
+ BRDA:171,10,0,71
5371
+ BRDA:172,11,0,264
5372
+ BRDA:172,11,1,71
5373
+ BRDA:179,12,0,0
5374
+ BRDA:179,13,0,0
5375
+ BRDA:197,14,0,1
5376
+ BRDA:197,14,1,1
5377
+ BRDA:197,15,0,2
5378
+ BRDA:197,15,1,2
5379
+ BRDA:206,16,0,0
5380
+ BRDA:206,17,0,0
5381
+ BRDA:246,18,0,0
5382
+ BRDA:255,19,0,5
5383
+ BRDA:255,19,1,5
5384
+ BRDA:261,20,0,0
5385
+ BRDA:261,21,0,0
5386
+ BRDA:276,22,0,0
5387
+ BRDA:276,23,0,0
5388
+ BRDA:291,24,0,0
5389
+ BRDA:291,25,0,0
5390
+ BRDA:299,26,0,0
5391
+ BRDA:299,27,0,39
5392
+ BRDA:301,28,0,0
5393
+ BRDA:301,28,1,39
5394
+ BRDA:308,29,0,0
5395
+ BRDA:308,30,0,0
5396
+ BRDA:325,31,0,0
5397
+ BRDA:325,32,0,0
5398
+ BRDA:326,33,0,3
5399
+ BRDA:326,33,1,1
5400
+ BRDA:349,34,0,0
5401
+ BRDA:349,35,0,0
5402
+ BRDA:351,36,0,0
5403
+ BRDA:351,36,1,0
5404
+ BRDA:361,37,0,0
5405
+ BRF:48
5406
+ BRH:18
5421
5407
  end_of_record
5422
5408
  TN:
5423
5409
  SF:src/db/linkedRows/LinkController.js
@@ -146,9 +146,10 @@ var External;
146
146
  const thisRow = {};
147
147
  // filter the row down to what is actually the row (not joined)
148
148
  for (let fieldName of Object.keys(table.schema)) {
149
- const value = row[`${table.name}.${fieldName}`] || row[fieldName];
149
+ const pathValue = row[`${table.name}.${fieldName}`];
150
+ const value = pathValue != null ? pathValue : row[fieldName];
150
151
  // all responses include "select col as table.col" so that overlaps are handled
151
- if (value) {
152
+ if (value != null) {
152
153
  thisRow[fieldName] = value;
153
154
  }
154
155
  }
package/dist/db/utils.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  const newid = require("./newid");
3
- const { DocumentTypes: CoreDocTypes, getRoleParams, generateRoleID, APP_DEV_PREFIX, APP_PREFIX, SEPARATOR, StaticDatabases, isDevAppID, isProdAppID, } = require("@budibase/backend-core/db");
3
+ const { DocumentTypes: CoreDocTypes, getRoleParams, generateRoleID, APP_DEV_PREFIX, APP_PREFIX, SEPARATOR, StaticDatabases, isDevAppID, isProdAppID, getDevelopmentAppID, generateAppID, } = require("@budibase/backend-core/db");
4
4
  const UNICODE_MAX = "\ufff0";
5
5
  const AppStatus = {
6
6
  DEV: "development",
@@ -62,6 +62,8 @@ exports.UNICODE_MAX = UNICODE_MAX;
62
62
  exports.SearchIndexes = SearchIndexes;
63
63
  exports.AppStatus = AppStatus;
64
64
  exports.BudibaseInternalDB = BudibaseInternalDB;
65
+ exports.generateAppID = generateAppID;
66
+ exports.generateDevAppID = getDevelopmentAppID;
65
67
  exports.generateRoleID = generateRoleID;
66
68
  exports.getRoleParams = getRoleParams;
67
69
  exports.getQueryIndex = viewName => {
@@ -195,26 +197,6 @@ exports.generateLinkID = (tableId1, tableId2, rowId1, rowId2, fieldName1, fieldN
195
197
  exports.getLinkParams = (otherProps = {}) => {
196
198
  return getDocParams(DocumentTypes.LINK, null, otherProps);
197
199
  };
198
- /**
199
- * Generates a new app ID.
200
- * @returns {string} The new app ID which the app doc can be stored under.
201
- */
202
- exports.generateAppID = (tenantId = null) => {
203
- let id = `${DocumentTypes.APP}${SEPARATOR}`;
204
- if (tenantId) {
205
- id += `${tenantId}${SEPARATOR}`;
206
- }
207
- return `${id}${newid()}`;
208
- };
209
- /**
210
- * Generates a development app ID from a real app ID.
211
- * @returns {string} the dev app ID which can be used for dev database.
212
- */
213
- exports.generateDevAppID = appId => {
214
- const prefix = `${DocumentTypes.APP}${SEPARATOR}`;
215
- const rest = appId.split(prefix)[1];
216
- return `${DocumentTypes.APP_DEV}${SEPARATOR}${rest}`;
217
- };
218
200
  /**
219
201
  * Generates a new layout ID.
220
202
  * @returns {string} The new layout ID which the layout doc can be stored under.
@@ -92,7 +92,7 @@ var Firebase;
92
92
  this.config = config;
93
93
  if (config.serviceAccount) {
94
94
  const serviceAccount = JSON.parse(config.serviceAccount);
95
- this.db = new firestore_1.Firestore({
95
+ this.client = new firestore_1.Firestore({
96
96
  projectId: serviceAccount.project_id,
97
97
  credentials: {
98
98
  client_email: serviceAccount.client_email,
@@ -101,7 +101,7 @@ var Firebase;
101
101
  });
102
102
  }
103
103
  else {
104
- this.db = new firestore_1.Firestore({
104
+ this.client = new firestore_1.Firestore({
105
105
  projectId: config.projectId,
106
106
  credentials: {
107
107
  client_email: config.email,
@@ -113,7 +113,7 @@ var Firebase;
113
113
  create(query) {
114
114
  return __awaiter(this, void 0, void 0, function* () {
115
115
  try {
116
- const documentReference = this.db
116
+ const documentReference = this.client
117
117
  .collection(query.extra.collection)
118
118
  .doc();
119
119
  yield documentReference.set(Object.assign(Object.assign({}, query.json), { id: documentReference.id }));
@@ -130,7 +130,7 @@ var Firebase;
130
130
  return __awaiter(this, void 0, void 0, function* () {
131
131
  try {
132
132
  let snapshot;
133
- const collectionRef = this.db.collection(query.extra.collection);
133
+ const collectionRef = this.client.collection(query.extra.collection);
134
134
  if (query.extra.filterField &&
135
135
  query.extra.filter &&
136
136
  query.extra.filterValue) {
@@ -154,17 +154,17 @@ var Firebase;
154
154
  update(query) {
155
155
  return __awaiter(this, void 0, void 0, function* () {
156
156
  try {
157
- yield this.db
157
+ yield this.client
158
158
  .collection(query.extra.collection)
159
159
  .doc(query.json.id)
160
160
  .update(query.json);
161
- return (yield this.db
161
+ return (yield this.client
162
162
  .collection(query.extra.collection)
163
163
  .doc(query.json.id)
164
164
  .get()).data();
165
165
  }
166
166
  catch (err) {
167
- console.error("Error writing to firebase", err);
167
+ console.error("Error writing to Firestore", err);
168
168
  throw err;
169
169
  }
170
170
  });
@@ -172,14 +172,14 @@ var Firebase;
172
172
  delete(query) {
173
173
  return __awaiter(this, void 0, void 0, function* () {
174
174
  try {
175
- yield this.db
175
+ yield this.client
176
176
  .collection(query.extra.collection)
177
177
  .doc(query.json.id)
178
178
  .delete();
179
179
  return true;
180
180
  }
181
181
  catch (err) {
182
- console.error("Error writing to mongodb", err);
182
+ console.error("Error deleting from Firestore", err);
183
183
  throw err;
184
184
  }
185
185
  });
@@ -45,6 +45,7 @@ const INTEGRATIONS = {
45
45
  [SourceNames.FIREBASE]: firebase.integration,
46
46
  [SourceNames.GOOGLE_SHEETS]: googlesheets.integration,
47
47
  [SourceNames.REDIS]: redis.integration,
48
+ [SourceNames.FIREBASE]: firebase.integration,
48
49
  };
49
50
  // optionally add oracle integration if the oracle binary can be installed
50
51
  if (!(process.arch === "arm64" && process.platform === "darwin")) {