@budibase/server 1.0.219-alpha.13 → 1.0.219-alpha.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 (168) hide show
  1. package/builder/assets/{index.3f761849.js → index.455dc625.js} +1 -1
  2. package/builder/index.html +1 -1
  3. package/coverage/clover.xml +107 -103
  4. package/coverage/coverage-final.json +2 -2
  5. package/coverage/lcov-report/api/controllers/apikeys.js.html +1 -1
  6. package/coverage/lcov-report/api/controllers/auth.js.html +1 -1
  7. package/coverage/lcov-report/api/controllers/automation.js.html +1 -1
  8. package/coverage/lcov-report/api/controllers/backup.js.html +1 -1
  9. package/coverage/lcov-report/api/controllers/cloud.js.html +1 -1
  10. package/coverage/lcov-report/api/controllers/component.js.html +1 -1
  11. package/coverage/lcov-report/api/controllers/datasource.js.html +1 -1
  12. package/coverage/lcov-report/api/controllers/dev.js.html +1 -1
  13. package/coverage/lcov-report/api/controllers/index.html +1 -1
  14. package/coverage/lcov-report/api/controllers/integration.js.html +1 -1
  15. package/coverage/lcov-report/api/controllers/layout.js.html +1 -1
  16. package/coverage/lcov-report/api/controllers/metadata.js.html +1 -1
  17. package/coverage/lcov-report/api/controllers/migrations.js.html +1 -1
  18. package/coverage/lcov-report/api/controllers/permission.js.html +1 -1
  19. package/coverage/lcov-report/api/controllers/query/index.html +1 -1
  20. package/coverage/lcov-report/api/controllers/query/validation.js.html +1 -1
  21. package/coverage/lcov-report/api/controllers/role.js.html +1 -1
  22. package/coverage/lcov-report/api/controllers/routing.js.html +1 -1
  23. package/coverage/lcov-report/api/controllers/row/external.js.html +1 -1
  24. package/coverage/lcov-report/api/controllers/row/index.html +1 -1
  25. package/coverage/lcov-report/api/controllers/row/internal.js.html +1 -1
  26. package/coverage/lcov-report/api/controllers/row/internalSearch.js.html +1 -1
  27. package/coverage/lcov-report/api/controllers/row/staticFormula.js.html +1 -1
  28. package/coverage/lcov-report/api/controllers/row/utils.js.html +1 -1
  29. package/coverage/lcov-report/api/controllers/screen.js.html +1 -1
  30. package/coverage/lcov-report/api/controllers/script.js.html +1 -1
  31. package/coverage/lcov-report/api/controllers/table/bulkFormula.js.html +1 -1
  32. package/coverage/lcov-report/api/controllers/table/external.js.html +1 -1
  33. package/coverage/lcov-report/api/controllers/table/index.html +1 -1
  34. package/coverage/lcov-report/api/controllers/table/index.js.html +1 -1
  35. package/coverage/lcov-report/api/controllers/templates.js.html +1 -1
  36. package/coverage/lcov-report/api/controllers/user.js.html +1 -1
  37. package/coverage/lcov-report/api/controllers/view/exporters.js.html +1 -1
  38. package/coverage/lcov-report/api/controllers/view/index.html +1 -1
  39. package/coverage/lcov-report/api/controllers/view/index.js.html +1 -1
  40. package/coverage/lcov-report/api/controllers/view/utils.js.html +1 -1
  41. package/coverage/lcov-report/api/controllers/view/viewBuilder.js.html +1 -1
  42. package/coverage/lcov-report/api/controllers/webhook.js.html +1 -1
  43. package/coverage/lcov-report/api/index.html +1 -1
  44. package/coverage/lcov-report/api/index.js.html +1 -1
  45. package/coverage/lcov-report/api/routes/analytics.js.html +1 -1
  46. package/coverage/lcov-report/api/routes/apikeys.js.html +1 -1
  47. package/coverage/lcov-report/api/routes/auth.js.html +1 -1
  48. package/coverage/lcov-report/api/routes/automation.js.html +1 -1
  49. package/coverage/lcov-report/api/routes/backup.js.html +1 -1
  50. package/coverage/lcov-report/api/routes/cloud.js.html +1 -1
  51. package/coverage/lcov-report/api/routes/component.js.html +1 -1
  52. package/coverage/lcov-report/api/routes/datasource.js.html +1 -1
  53. package/coverage/lcov-report/api/routes/deploy.js.html +1 -1
  54. package/coverage/lcov-report/api/routes/dev.js.html +1 -1
  55. package/coverage/lcov-report/api/routes/index.html +1 -1
  56. package/coverage/lcov-report/api/routes/integration.js.html +1 -1
  57. package/coverage/lcov-report/api/routes/layout.js.html +1 -1
  58. package/coverage/lcov-report/api/routes/metadata.js.html +1 -1
  59. package/coverage/lcov-report/api/routes/migrations.js.html +1 -1
  60. package/coverage/lcov-report/api/routes/permission.js.html +1 -1
  61. package/coverage/lcov-report/api/routes/query.js.html +1 -1
  62. package/coverage/lcov-report/api/routes/role.js.html +1 -1
  63. package/coverage/lcov-report/api/routes/routing.js.html +1 -1
  64. package/coverage/lcov-report/api/routes/screen.js.html +1 -1
  65. package/coverage/lcov-report/api/routes/script.js.html +1 -1
  66. package/coverage/lcov-report/api/routes/table.js.html +1 -1
  67. package/coverage/lcov-report/api/routes/templates.js.html +1 -1
  68. package/coverage/lcov-report/api/routes/user.js.html +1 -1
  69. package/coverage/lcov-report/api/routes/utils/index.html +1 -1
  70. package/coverage/lcov-report/api/routes/utils/validators.js.html +1 -1
  71. package/coverage/lcov-report/api/routes/view.js.html +1 -1
  72. package/coverage/lcov-report/api/routes/webhook.js.html +1 -1
  73. package/coverage/lcov-report/automations/actions.js.html +1 -1
  74. package/coverage/lcov-report/automations/automationUtils.js.html +1 -1
  75. package/coverage/lcov-report/automations/bullboard.js.html +1 -1
  76. package/coverage/lcov-report/automations/index.html +1 -1
  77. package/coverage/lcov-report/automations/index.js.html +1 -1
  78. package/coverage/lcov-report/automations/steps/bash.js.html +1 -1
  79. package/coverage/lcov-report/automations/steps/delay.js.html +1 -1
  80. package/coverage/lcov-report/automations/steps/discord.js.html +1 -1
  81. package/coverage/lcov-report/automations/steps/executeQuery.js.html +2 -2
  82. package/coverage/lcov-report/automations/steps/executeScript.js.html +1 -1
  83. package/coverage/lcov-report/automations/steps/filter.js.html +1 -1
  84. package/coverage/lcov-report/automations/steps/index.html +1 -1
  85. package/coverage/lcov-report/automations/steps/integromat.js.html +1 -1
  86. package/coverage/lcov-report/automations/steps/loop.js.html +1 -1
  87. package/coverage/lcov-report/automations/steps/outgoingWebhook.js.html +1 -1
  88. package/coverage/lcov-report/automations/steps/queryRows.js.html +1 -1
  89. package/coverage/lcov-report/automations/steps/sendSmtpEmail.js.html +1 -1
  90. package/coverage/lcov-report/automations/steps/serverLog.js.html +1 -1
  91. package/coverage/lcov-report/automations/steps/slack.js.html +1 -1
  92. package/coverage/lcov-report/automations/steps/updateRow.js.html +1 -1
  93. package/coverage/lcov-report/automations/steps/utils.js.html +1 -1
  94. package/coverage/lcov-report/automations/steps/zapier.js.html +1 -1
  95. package/coverage/lcov-report/automations/triggerInfo/app.js.html +1 -1
  96. package/coverage/lcov-report/automations/triggerInfo/cron.js.html +1 -1
  97. package/coverage/lcov-report/automations/triggerInfo/index.html +1 -1
  98. package/coverage/lcov-report/automations/triggerInfo/index.js.html +1 -1
  99. package/coverage/lcov-report/automations/triggerInfo/rowDeleted.js.html +1 -1
  100. package/coverage/lcov-report/automations/triggerInfo/rowSaved.js.html +1 -1
  101. package/coverage/lcov-report/automations/triggerInfo/rowUpdated.js.html +1 -1
  102. package/coverage/lcov-report/automations/triggerInfo/webhook.js.html +1 -1
  103. package/coverage/lcov-report/automations/triggers.js.html +1 -1
  104. package/coverage/lcov-report/constants/index.html +1 -1
  105. package/coverage/lcov-report/constants/index.js.html +1 -1
  106. package/coverage/lcov-report/constants/layouts.js.html +1 -1
  107. package/coverage/lcov-report/constants/screens.js.html +1 -1
  108. package/coverage/lcov-report/db/inMemoryView.js.html +1 -1
  109. package/coverage/lcov-report/db/index.html +1 -1
  110. package/coverage/lcov-report/db/index.js.html +1 -1
  111. package/coverage/lcov-report/db/linkedRows/LinkController.js.html +1 -1
  112. package/coverage/lcov-report/db/linkedRows/index.html +1 -1
  113. package/coverage/lcov-report/db/linkedRows/index.js.html +1 -1
  114. package/coverage/lcov-report/db/linkedRows/linkUtils.js.html +1 -1
  115. package/coverage/lcov-report/db/newid.js.html +1 -1
  116. package/coverage/lcov-report/db/utils.js.html +1 -1
  117. package/coverage/lcov-report/events/AutomationEmitter.js.html +1 -1
  118. package/coverage/lcov-report/events/index.html +1 -1
  119. package/coverage/lcov-report/events/index.js.html +1 -1
  120. package/coverage/lcov-report/events/utils.js.html +1 -1
  121. package/coverage/lcov-report/index.html +13 -13
  122. package/coverage/lcov-report/integrations/tests/TestConfiguration.js.html +1 -1
  123. package/coverage/lcov-report/integrations/tests/index.html +1 -1
  124. package/coverage/lcov-report/middleware/appInfo.js.html +1 -1
  125. package/coverage/lcov-report/middleware/builder.js.html +1 -1
  126. package/coverage/lcov-report/middleware/currentapp.js.html +1 -1
  127. package/coverage/lcov-report/middleware/index.html +1 -1
  128. package/coverage/lcov-report/middleware/joi-validator.js.html +1 -1
  129. package/coverage/lcov-report/middleware/publicApi.js.html +1 -1
  130. package/coverage/lcov-report/middleware/resourceId.js.html +1 -1
  131. package/coverage/lcov-report/middleware/selfhost.js.html +1 -1
  132. package/coverage/lcov-report/middleware/utils.js.html +1 -1
  133. package/coverage/lcov-report/threads/automation.js.html +1 -1
  134. package/coverage/lcov-report/threads/index.html +14 -14
  135. package/coverage/lcov-report/threads/query.js.html +40 -25
  136. package/coverage/lcov-report/threads/utils.js.html +1 -1
  137. package/coverage/lcov-report/utilities/budibaseDir.js.html +1 -1
  138. package/coverage/lcov-report/utilities/centralPath.js.html +1 -1
  139. package/coverage/lcov-report/utilities/csvParser.js.html +1 -1
  140. package/coverage/lcov-report/utilities/global.js.html +1 -1
  141. package/coverage/lcov-report/utilities/index.html +1 -1
  142. package/coverage/lcov-report/utilities/index.js.html +1 -1
  143. package/coverage/lcov-report/utilities/queue/inMemoryQueue.js.html +1 -1
  144. package/coverage/lcov-report/utilities/queue/index.html +1 -1
  145. package/coverage/lcov-report/utilities/routing/index.html +1 -1
  146. package/coverage/lcov-report/utilities/routing/index.js.html +1 -1
  147. package/coverage/lcov-report/utilities/rowProcessor/index.html +1 -1
  148. package/coverage/lcov-report/utilities/rowProcessor/index.js.html +1 -1
  149. package/coverage/lcov-report/utilities/rowProcessor/utils.js.html +1 -1
  150. package/coverage/lcov-report/utilities/scriptRunner.js.html +1 -1
  151. package/coverage/lcov-report/utilities/security.js.html +1 -1
  152. package/coverage/lcov-report/utilities/statusCodes.js.html +1 -1
  153. package/coverage/lcov-report/utilities/usageQuota/index.html +1 -1
  154. package/coverage/lcov-report/utilities/usageQuota/rows.js.html +1 -1
  155. package/coverage/lcov-report/utilities/usageQuota/usageQuoteReset.js.html +1 -1
  156. package/coverage/lcov-report/utilities/users.js.html +1 -1
  157. package/coverage/lcov-report/utilities/workerRequests.js.html +1 -1
  158. package/coverage/lcov.info +167 -161
  159. package/dist/api/controllers/query/index.js +7 -4
  160. package/dist/automations/steps/executeQuery.js +1 -1
  161. package/dist/package.json +6 -6
  162. package/dist/threads/query.js +20 -13
  163. package/dist/tsconfig.build.tsbuildinfo +1 -1
  164. package/package.json +7 -7
  165. package/src/api/controllers/query/index.ts +13 -5
  166. package/src/api/routes/tests/query.spec.js +0 -1
  167. package/src/automations/steps/executeQuery.js +1 -1
  168. package/src/threads/query.js +20 -15
@@ -7091,19 +7091,19 @@ BRH:20
7091
7091
  end_of_record
7092
7092
  TN:
7093
7093
  SF:src/threads/query.js
7094
- FN:21,(anonymous_0)
7095
- FN:41,(anonymous_1)
7096
- FN:51,(anonymous_2)
7097
- FN:137,(anonymous_3)
7098
- FN:138,(anonymous_4)
7099
- FN:151,(anonymous_5)
7100
- FN:167,(anonymous_6)
7101
- FN:198,(anonymous_7)
7102
- FN:216,(anonymous_8)
7103
- FN:231,(anonymous_9)
7104
- FN:240,(anonymous_10)
7105
- FN:262,(anonymous_11)
7106
- FN:263,(anonymous_12)
7094
+ FN:22,(anonymous_0)
7095
+ FN:42,(anonymous_1)
7096
+ FN:55,(anonymous_2)
7097
+ FN:141,(anonymous_3)
7098
+ FN:142,(anonymous_4)
7099
+ FN:155,(anonymous_5)
7100
+ FN:171,(anonymous_6)
7101
+ FN:203,(anonymous_7)
7102
+ FN:221,(anonymous_8)
7103
+ FN:236,(anonymous_9)
7104
+ FN:245,(anonymous_10)
7105
+ FN:267,(anonymous_11)
7106
+ FN:268,(anonymous_12)
7107
7107
  FNF:13
7108
7108
  FNH:10
7109
7109
  FNDA:22,(anonymous_0)
@@ -7128,9 +7128,9 @@ DA:6,2
7128
7128
  DA:10,2
7129
7129
  DA:11,2
7130
7130
  DA:12,2
7131
- DA:14,2
7132
- DA:18,2
7133
- DA:22,22
7131
+ DA:13,2
7132
+ DA:15,2
7133
+ DA:19,2
7134
7134
  DA:23,22
7135
7135
  DA:24,22
7136
7136
  DA:25,22
@@ -7139,172 +7139,178 @@ DA:27,22
7139
7139
  DA:28,22
7140
7140
  DA:29,22
7141
7141
  DA:30,22
7142
- DA:32,22
7143
- DA:36,22
7142
+ DA:31,22
7143
+ DA:33,22
7144
7144
  DA:37,22
7145
7145
  DA:38,22
7146
- DA:42,23
7147
- DA:44,23
7146
+ DA:39,22
7147
+ DA:43,23
7148
7148
  DA:45,23
7149
- DA:46,2
7150
- DA:49,21
7151
- DA:50,0
7152
- DA:52,0
7153
- DA:57,21
7149
+ DA:46,23
7150
+ DA:48,23
7151
+ DA:49,23
7152
+ DA:50,2
7153
+ DA:53,21
7154
+ DA:54,0
7155
+ DA:56,0
7154
7156
  DA:60,21
7155
- DA:64,21
7156
- DA:65,21
7157
+ DA:63,21
7158
+ DA:67,21
7157
7159
  DA:68,21
7158
- DA:69,1
7159
- DA:77,21
7160
- DA:78,2
7161
- DA:80,19
7162
- DA:84,21
7163
- DA:85,0
7164
- DA:88,21
7165
- DA:89,21
7166
- DA:90,21
7160
+ DA:71,21
7161
+ DA:72,1
7162
+ DA:80,21
7163
+ DA:81,2
7164
+ DA:83,19
7165
+ DA:87,21
7166
+ DA:88,0
7167
7167
  DA:91,21
7168
7168
  DA:92,21
7169
7169
  DA:93,21
7170
- DA:94,19
7171
- DA:95,19
7172
- DA:96,19
7170
+ DA:94,21
7171
+ DA:95,21
7172
+ DA:96,21
7173
7173
  DA:97,19
7174
- DA:101,21
7175
- DA:102,0
7176
- DA:106,0
7177
- DA:110,21
7178
- DA:111,1
7179
- DA:116,0
7180
- DA:118,0
7181
- DA:121,1
7182
- DA:122,1
7174
+ DA:98,19
7175
+ DA:99,19
7176
+ DA:100,19
7177
+ DA:104,21
7178
+ DA:105,0
7179
+ DA:109,0
7180
+ DA:113,21
7181
+ DA:114,1
7182
+ DA:119,0
7183
+ DA:121,0
7183
7184
  DA:123,1
7184
- DA:127,20
7185
- DA:128,0
7186
- DA:132,20
7187
- DA:133,18
7188
- DA:137,20
7189
- DA:138,0
7190
- DA:142,20
7191
- DA:144,20
7192
- DA:145,0
7185
+ DA:126,1
7186
+ DA:127,1
7187
+ DA:131,20
7188
+ DA:132,0
7189
+ DA:136,20
7190
+ DA:137,18
7191
+ DA:141,20
7192
+ DA:142,0
7193
+ DA:146,20
7193
7194
  DA:148,20
7194
- DA:152,5
7195
- DA:153,5
7196
- DA:154,5
7197
- DA:155,5
7198
- DA:168,0
7199
- DA:169,0
7200
- DA:171,0
7195
+ DA:149,0
7196
+ DA:152,20
7197
+ DA:156,5
7198
+ DA:157,5
7199
+ DA:158,5
7200
+ DA:159,5
7201
7201
  DA:172,0
7202
+ DA:173,0
7202
7203
  DA:175,0
7203
- DA:183,0
7204
- DA:184,0
7205
- DA:185,0
7206
- DA:186,0
7204
+ DA:176,0
7205
+ DA:179,0
7206
+ DA:187,0
7207
+ DA:188,0
7208
+ DA:189,0
7207
7209
  DA:190,0
7210
+ DA:194,0
7208
7211
  DA:195,0
7209
- DA:199,6
7210
- DA:200,6
7211
- DA:201,6
7212
- DA:202,6
7213
- DA:203,6
7214
- DA:204,5
7215
- DA:208,5
7212
+ DA:200,0
7213
+ DA:204,6
7214
+ DA:205,6
7215
+ DA:206,6
7216
+ DA:207,6
7217
+ DA:208,6
7216
7218
  DA:209,5
7217
- DA:211,1
7218
- DA:213,6
7219
- DA:217,21
7220
- DA:218,21
7221
- DA:219,0
7222
- DA:221,21
7219
+ DA:213,5
7220
+ DA:214,5
7221
+ DA:216,1
7222
+ DA:218,6
7223
7223
  DA:222,21
7224
7224
  DA:223,21
7225
- DA:224,2
7226
- DA:225,2
7225
+ DA:224,0
7226
+ DA:226,21
7227
+ DA:227,21
7227
7228
  DA:228,21
7228
- DA:230,16
7229
- DA:231,16
7230
- DA:233,6
7231
- DA:234,0
7232
- DA:237,6
7229
+ DA:229,2
7230
+ DA:230,2
7231
+ DA:233,21
7232
+ DA:235,16
7233
+ DA:236,16
7233
7234
  DA:238,6
7234
- DA:240,16
7235
- DA:241,16
7236
- DA:242,16
7235
+ DA:239,0
7236
+ DA:242,6
7237
7237
  DA:243,6
7238
- DA:244,6
7239
- DA:255,6
7240
- DA:258,21
7241
- DA:262,2
7242
- DA:263,17
7243
- DA:264,17
7244
- DA:265,17
7245
- DA:266,17
7246
- DA:267,15
7247
- DA:269,2
7248
- LF:126
7249
- LH:103
7250
- BRDA:21,0,0,17
7251
- BRDA:45,1,0,2
7252
- BRDA:45,1,1,21
7253
- BRDA:49,2,0,0
7254
- BRDA:49,2,1,21
7255
- BRDA:68,3,0,1
7256
- BRDA:68,3,1,20
7257
- BRDA:77,4,0,2
7258
- BRDA:77,4,1,19
7259
- BRDA:84,5,0,0
7260
- BRDA:84,5,1,21
7261
- BRDA:93,6,0,19
7262
- BRDA:93,6,1,2
7263
- BRDA:101,7,0,0
7264
- BRDA:101,7,1,21
7265
- BRDA:110,8,0,1
7266
- BRDA:110,8,1,20
7267
- BRDA:110,9,0,21
7268
- BRDA:110,9,1,19
7269
- BRDA:110,9,2,1
7270
- BRDA:111,10,0,0
7271
- BRDA:111,10,1,1
7272
- BRDA:112,11,0,1
7273
- BRDA:112,11,1,0
7274
- BRDA:112,11,2,0
7275
- BRDA:127,12,0,0
7276
- BRDA:127,12,1,20
7277
- BRDA:132,13,0,18
7278
- BRDA:132,13,1,2
7279
- BRDA:137,14,0,0
7280
- BRDA:137,14,1,20
7281
- BRDA:144,15,0,0
7282
- BRDA:144,15,1,20
7283
- BRDA:171,16,0,0
7284
- BRDA:171,16,1,0
7285
- BRDA:171,17,0,0
7286
- BRDA:171,17,1,0
7287
- BRDA:183,18,0,0
7288
- BRDA:183,18,1,0
7289
- BRDA:203,19,0,5
7290
- BRDA:203,19,1,1
7291
- BRDA:204,20,0,0
7292
- BRDA:204,20,1,5
7293
- BRDA:218,21,0,0
7294
- BRDA:218,21,1,21
7295
- BRDA:218,22,0,21
7296
- BRDA:218,22,1,21
7297
- BRDA:221,23,0,21
7298
- BRDA:221,23,1,20
7299
- BRDA:222,24,0,21
7300
- BRDA:222,24,1,10
7301
- BRDA:224,25,0,2
7302
- BRDA:224,25,1,0
7303
- BRDA:228,26,0,16
7304
- BRDA:228,26,1,5
7305
- BRDA:233,27,0,0
7306
- BRDA:233,27,1,6
7307
- BRF:57
7238
+ DA:245,16
7239
+ DA:246,16
7240
+ DA:247,16
7241
+ DA:248,6
7242
+ DA:249,6
7243
+ DA:260,6
7244
+ DA:263,21
7245
+ DA:267,2
7246
+ DA:268,17
7247
+ DA:269,17
7248
+ DA:270,17
7249
+ DA:271,17
7250
+ DA:272,15
7251
+ DA:274,2
7252
+ LF:130
7253
+ LH:106
7254
+ BRDA:22,0,0,17
7255
+ BRDA:49,1,0,2
7256
+ BRDA:49,1,1,21
7257
+ BRDA:53,2,0,0
7258
+ BRDA:53,2,1,21
7259
+ BRDA:71,3,0,1
7260
+ BRDA:71,3,1,20
7261
+ BRDA:80,4,0,2
7262
+ BRDA:80,4,1,19
7263
+ BRDA:87,5,0,0
7264
+ BRDA:87,5,1,21
7265
+ BRDA:96,6,0,19
7266
+ BRDA:96,6,1,2
7267
+ BRDA:104,7,0,0
7268
+ BRDA:104,7,1,21
7269
+ BRDA:113,8,0,1
7270
+ BRDA:113,8,1,20
7271
+ BRDA:113,9,0,21
7272
+ BRDA:113,9,1,19
7273
+ BRDA:113,9,2,1
7274
+ BRDA:114,10,0,0
7275
+ BRDA:114,10,1,1
7276
+ BRDA:115,11,0,1
7277
+ BRDA:115,11,1,0
7278
+ BRDA:115,11,2,0
7279
+ BRDA:131,12,0,0
7280
+ BRDA:131,12,1,20
7281
+ BRDA:136,13,0,18
7282
+ BRDA:136,13,1,2
7283
+ BRDA:141,14,0,0
7284
+ BRDA:141,14,1,20
7285
+ BRDA:148,15,0,0
7286
+ BRDA:148,15,1,20
7287
+ BRDA:175,16,0,0
7288
+ BRDA:175,16,1,0
7289
+ BRDA:175,17,0,0
7290
+ BRDA:175,17,1,0
7291
+ BRDA:187,18,0,0
7292
+ BRDA:187,18,1,0
7293
+ BRDA:194,19,0,0
7294
+ BRDA:194,19,1,0
7295
+ BRDA:208,20,0,5
7296
+ BRDA:208,20,1,1
7297
+ BRDA:209,21,0,0
7298
+ BRDA:209,21,1,5
7299
+ BRDA:223,22,0,0
7300
+ BRDA:223,22,1,21
7301
+ BRDA:223,23,0,21
7302
+ BRDA:223,23,1,21
7303
+ BRDA:226,24,0,21
7304
+ BRDA:226,24,1,20
7305
+ BRDA:227,25,0,21
7306
+ BRDA:227,25,1,10
7307
+ BRDA:229,26,0,2
7308
+ BRDA:229,26,1,0
7309
+ BRDA:233,27,0,16
7310
+ BRDA:233,27,1,5
7311
+ BRDA:238,28,0,0
7312
+ BRDA:238,28,1,6
7313
+ BRF:59
7308
7314
  BRH:38
7309
7315
  end_of_record
7310
7316
  TN:
@@ -164,12 +164,15 @@ function preview(ctx) {
164
164
  });
165
165
  }
166
166
  exports.preview = preview;
167
- function execute(ctx, opts = { rowsOnly: false }) {
167
+ function execute(ctx, opts = { rowsOnly: false, isAutomation: false }) {
168
168
  return __awaiter(this, void 0, void 0, function* () {
169
169
  const db = (0, context_1.getAppDB)();
170
170
  const query = yield db.get(ctx.params.queryId);
171
171
  const datasource = yield db.get(query.datasourceId);
172
- const authConfigCtx = getAuthConfig(ctx);
172
+ let authConfigCtx = {};
173
+ if (!opts.isAutomation) {
174
+ authConfigCtx = getAuthConfig(ctx);
175
+ }
173
176
  const enrichedParameters = ctx.request.body.parameters || {};
174
177
  // make sure parameters are fully enriched with defaults
175
178
  if (query && query.parameters) {
@@ -214,9 +217,9 @@ function executeV1(ctx) {
214
217
  });
215
218
  }
216
219
  exports.executeV1 = executeV1;
217
- function executeV2(ctx) {
220
+ function executeV2(ctx, { isAutomation } = {}) {
218
221
  return __awaiter(this, void 0, void 0, function* () {
219
- return execute(ctx, { rowsOnly: false });
222
+ return execute(ctx, { rowsOnly: false, isAutomation });
220
223
  });
221
224
  }
222
225
  exports.executeV2 = executeV2;
@@ -88,7 +88,7 @@ exports.run = function ({ inputs, appId, emitter }) {
88
88
  },
89
89
  });
90
90
  try {
91
- yield queryController.executeV2(ctx);
91
+ yield queryController.executeV2(ctx, { isAutomation: true });
92
92
  const _b = ctx.body, { data } = _b, rest = __rest(_b, ["data"]);
93
93
  return {
94
94
  response: data,
package/dist/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@budibase/server",
3
3
  "email": "hi@budibase.com",
4
- "version": "1.0.219-alpha.12",
4
+ "version": "1.0.219-alpha.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": "^1.0.219-alpha.12",
81
- "@budibase/client": "^1.0.219-alpha.12",
82
- "@budibase/pro": "1.0.219-alpha.12",
83
- "@budibase/string-templates": "^1.0.219-alpha.12",
84
- "@budibase/types": "^1.0.219-alpha.12",
80
+ "@budibase/backend-core": "^1.0.219-alpha.15",
81
+ "@budibase/client": "^1.0.219-alpha.15",
82
+ "@budibase/pro": "1.0.219-alpha.15",
83
+ "@budibase/string-templates": "^1.0.219-alpha.15",
84
+ "@budibase/types": "^1.0.219-alpha.15",
85
85
  "@bull-board/api": "3.7.0",
86
86
  "@bull-board/koa": "3.9.4",
87
87
  "@elastic/elasticsearch": "7.10.0",
@@ -17,6 +17,7 @@ const { doInAppContext, getAppDB } = require("@budibase/backend-core/context");
17
17
  const { refreshOAuthToken, updateUserOAuth, } = require("@budibase/backend-core/auth");
18
18
  const { user: userCache } = require("@budibase/backend-core/cache");
19
19
  const { getGlobalIDFromUserMetadataID } = require("../db/utils");
20
+ const { cloneDeep } = require("lodash/fp");
20
21
  const { isSQL } = require("../integrations/utils");
21
22
  const { enrichQueryFields, interpolateSQL, } = require("../integrations/queries/sql");
22
23
  class QueryRunner {
@@ -43,16 +44,19 @@ class QueryRunner {
43
44
  var _a;
44
45
  return __awaiter(this, void 0, void 0, function* () {
45
46
  let { datasource, fields, queryVerb, transformer } = this;
46
- const Integration = integrations[datasource.source];
47
+ let datasourceClone = cloneDeep(datasource);
48
+ let fieldsClone = cloneDeep(fields);
49
+ const Integration = integrations[datasourceClone.source];
47
50
  if (!Integration) {
48
51
  throw "Integration type does not exist.";
49
52
  }
50
- if (datasource.config.authConfigs) {
51
- datasource.config.authConfigs = datasource.config.authConfigs.map(config => {
52
- return enrichQueryFields(config, this.ctx);
53
- });
53
+ if (datasourceClone.config.authConfigs) {
54
+ datasourceClone.config.authConfigs =
55
+ datasourceClone.config.authConfigs.map(config => {
56
+ return enrichQueryFields(config, this.ctx);
57
+ });
54
58
  }
55
- const integration = new Integration(datasource.config);
59
+ const integration = new Integration(datasourceClone.config);
56
60
  // pre-query, make sure datasource variables are added to parameters
57
61
  const parameters = yield this.addDatasourceVariables();
58
62
  // Enrich the parameters with the addition context items.
@@ -60,16 +64,16 @@ class QueryRunner {
60
64
  const enrichedParameters = enrichQueryFields(parameters, this.ctx);
61
65
  const enrichedContext = Object.assign(Object.assign({}, enrichedParameters), this.ctx);
62
66
  // Parse global headers
63
- if (datasource.config.defaultHeaders) {
64
- datasource.config.defaultHeaders = enrichQueryFields(datasource.config.defaultHeaders, enrichedContext);
67
+ if (datasourceClone.config.defaultHeaders) {
68
+ datasourceClone.config.defaultHeaders = enrichQueryFields(datasourceClone.config.defaultHeaders, enrichedContext);
65
69
  }
66
70
  let query;
67
71
  // handle SQL injections by interpolating the variables
68
- if (isSQL(datasource)) {
69
- query = interpolateSQL(fields, enrichedParameters, integration);
72
+ if (isSQL(datasourceClone)) {
73
+ query = interpolateSQL(fieldsClone, enrichedParameters, integration);
70
74
  }
71
75
  else {
72
- query = enrichQueryFields(fields, enrichedContext);
76
+ query = enrichQueryFields(fieldsClone, enrichedContext);
73
77
  }
74
78
  // Add pagination values for REST queries
75
79
  if (this.pagination) {
@@ -100,7 +104,9 @@ class QueryRunner {
100
104
  // Attempt to refresh the access token from the provider
101
105
  this.hasRefreshedOAuth = true;
102
106
  }
103
- this.hasRerun = true;
107
+ else {
108
+ this.hasRerun = true;
109
+ }
104
110
  yield threadUtils.invalidateDynamicVariables(this.cachedVariables);
105
111
  return this.execute();
106
112
  }
@@ -156,7 +162,8 @@ class QueryRunner {
156
162
  else {
157
163
  // In this event the user may have oAuth issues that
158
164
  // could require re-authenticating with their provider.
159
- throw new Error("OAuth2 access token could not be refreshed: " + resp.err.toString());
165
+ let errorMessage = resp.err.data ? resp.err.data : resp.err.toString();
166
+ throw new Error("OAuth2 access token could not be refreshed: " + errorMessage);
160
167
  }
161
168
  return resp;
162
169
  });