@budibase/server 1.0.219-alpha.1 → 1.0.219-alpha.4

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 (163) hide show
  1. package/builder/assets/{index.832d3790.js → index.7069d123.js} +1 -1
  2. package/builder/index.html +1 -1
  3. package/coverage/clover.xml +90 -90
  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/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 +1 -1
  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 +14 -14
  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 +15 -15
  135. package/coverage/lcov-report/threads/query.js.html +28 -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 +148 -152
  159. package/dist/package.json +6 -6
  160. package/dist/threads/query.js +10 -9
  161. package/dist/tsconfig.build.tsbuildinfo +1 -1
  162. package/package.json +7 -7
  163. package/src/threads/query.js +11 -10
@@ -7091,19 +7091,19 @@ BRH:20
7091
7091
  end_of_record
7092
7092
  TN:
7093
7093
  SF:src/threads/query.js
7094
- FN:20,(anonymous_0)
7095
- FN:40,(anonymous_1)
7096
- FN:50,(anonymous_2)
7097
- FN:142,(anonymous_3)
7098
- FN:143,(anonymous_4)
7099
- FN:156,(anonymous_5)
7100
- FN:172,(anonymous_6)
7101
- FN:197,(anonymous_7)
7102
- FN:215,(anonymous_8)
7103
- FN:230,(anonymous_9)
7104
- FN:239,(anonymous_10)
7105
- FN:261,(anonymous_11)
7106
- FN:262,(anonymous_12)
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)
7107
7107
  FNF:13
7108
7108
  FNH:10
7109
7109
  FNDA:22,(anonymous_0)
@@ -7127,9 +7127,9 @@ DA:5,2
7127
7127
  DA:6,2
7128
7128
  DA:10,2
7129
7129
  DA:11,2
7130
- DA:13,2
7131
- DA:17,2
7132
- DA:21,22
7130
+ DA:12,2
7131
+ DA:14,2
7132
+ DA:18,2
7133
7133
  DA:22,22
7134
7134
  DA:23,22
7135
7135
  DA:24,22
@@ -7138,177 +7138,173 @@ DA:26,22
7138
7138
  DA:27,22
7139
7139
  DA:28,22
7140
7140
  DA:29,22
7141
- DA:31,22
7142
- DA:35,22
7141
+ DA:30,22
7142
+ DA:32,22
7143
7143
  DA:36,22
7144
7144
  DA:37,22
7145
- DA:41,23
7146
- DA:43,23
7145
+ DA:38,22
7146
+ DA:42,23
7147
7147
  DA:44,23
7148
- DA:45,2
7149
- DA:48,21
7150
- DA:49,0
7151
- DA:51,0
7152
- DA:56,21
7153
- DA:59,21
7154
- DA:63,21
7148
+ DA:45,23
7149
+ DA:46,2
7150
+ DA:49,21
7151
+ DA:50,0
7152
+ DA:52,0
7153
+ DA:57,21
7154
+ DA:60,21
7155
7155
  DA:64,21
7156
- DA:67,21
7157
- DA:68,1
7158
- DA:76,21
7159
- DA:77,2
7160
- DA:79,19
7161
- DA:83,21
7162
- DA:84,0
7163
- DA:87,21
7156
+ DA:65,21
7157
+ 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
7164
  DA:88,21
7165
7165
  DA:89,21
7166
7166
  DA:90,21
7167
7167
  DA:91,21
7168
7168
  DA:92,21
7169
- DA:93,19
7169
+ DA:93,21
7170
7170
  DA:94,19
7171
7171
  DA:95,19
7172
7172
  DA:96,19
7173
- DA:100,21
7174
- DA:101,0
7175
- DA:105,0
7176
- DA:109,21
7177
- DA:110,1
7173
+ DA:97,19
7174
+ DA:101,21
7175
+ DA:102,0
7176
+ DA:106,0
7177
+ DA:110,21
7178
+ DA:111,1
7178
7179
  DA:116,0
7179
- DA:117,0
7180
- DA:119,0
7181
- DA:122,0
7182
- DA:126,1
7183
- DA:127,1
7184
- DA:128,1
7180
+ DA:118,0
7181
+ DA:121,1
7182
+ DA:122,1
7183
+ DA:123,1
7184
+ DA:127,20
7185
+ DA:128,0
7185
7186
  DA:132,20
7186
- DA:133,0
7187
+ DA:133,18
7187
7188
  DA:137,20
7188
- DA:138,18
7189
+ DA:138,0
7189
7190
  DA:142,20
7190
- DA:143,0
7191
- DA:147,20
7192
- DA:149,20
7193
- DA:150,0
7194
- DA:153,20
7195
- DA:157,5
7196
- DA:158,5
7197
- DA:159,5
7198
- DA:160,5
7199
- DA:173,0
7200
- DA:174,0
7201
- DA:176,0
7202
- DA:177,0
7203
- DA:178,0
7204
- DA:181,0
7205
- DA:189,0
7191
+ DA:144,20
7192
+ DA:145,0
7193
+ 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
7201
+ DA:172,0
7202
+ DA:175,0
7203
+ DA:183,0
7204
+ DA:184,0
7205
+ DA:185,0
7206
+ DA:186,0
7206
7207
  DA:190,0
7207
- DA:191,0
7208
- DA:194,0
7209
- DA:198,6
7208
+ DA:195,0
7210
7209
  DA:199,6
7211
7210
  DA:200,6
7212
7211
  DA:201,6
7213
7212
  DA:202,6
7214
- DA:203,5
7215
- DA:207,5
7213
+ DA:203,6
7214
+ DA:204,5
7216
7215
  DA:208,5
7217
- DA:210,1
7218
- DA:212,6
7219
- DA:216,21
7216
+ DA:209,5
7217
+ DA:211,1
7218
+ DA:213,6
7220
7219
  DA:217,21
7221
- DA:218,0
7222
- DA:220,21
7220
+ DA:218,21
7221
+ DA:219,0
7223
7222
  DA:221,21
7224
7223
  DA:222,21
7225
- DA:223,2
7224
+ DA:223,21
7226
7225
  DA:224,2
7227
- DA:227,21
7228
- DA:229,16
7226
+ DA:225,2
7227
+ DA:228,21
7229
7228
  DA:230,16
7230
- DA:232,6
7231
- DA:233,0
7232
- DA:236,6
7229
+ DA:231,16
7230
+ DA:233,6
7231
+ DA:234,0
7233
7232
  DA:237,6
7234
- DA:239,16
7233
+ DA:238,6
7235
7234
  DA:240,16
7236
7235
  DA:241,16
7237
- DA:242,6
7236
+ DA:242,16
7238
7237
  DA:243,6
7239
- DA:254,6
7240
- DA:257,21
7241
- DA:261,2
7242
- DA:262,17
7238
+ DA:244,6
7239
+ DA:255,6
7240
+ DA:258,21
7241
+ DA:262,2
7243
7242
  DA:263,17
7244
7243
  DA:264,17
7245
7244
  DA:265,17
7246
- DA:266,15
7247
- DA:268,2
7245
+ DA:266,17
7246
+ DA:267,15
7247
+ DA:269,2
7248
7248
  LF:126
7249
- LH:102
7250
- BRDA:20,0,0,17
7251
- BRDA:44,1,0,2
7252
- BRDA:44,1,1,21
7253
- BRDA:48,2,0,0
7254
- BRDA:48,2,1,21
7255
- BRDA:67,3,0,1
7256
- BRDA:67,3,1,20
7257
- BRDA:76,4,0,2
7258
- BRDA:76,4,1,19
7259
- BRDA:83,5,0,0
7260
- BRDA:83,5,1,21
7261
- BRDA:92,6,0,19
7262
- BRDA:92,6,1,2
7263
- BRDA:100,7,0,0
7264
- BRDA:100,7,1,21
7265
- BRDA:109,8,0,1
7266
- BRDA:109,8,1,20
7267
- BRDA:109,9,0,21
7268
- BRDA:109,9,1,19
7269
- BRDA:109,9,2,1
7270
- BRDA:110,10,0,0
7271
- BRDA:110,10,1,1
7272
- BRDA:111,11,0,1
7273
- BRDA:111,11,1,0
7274
- BRDA:111,11,2,0
7275
- BRDA:119,12,0,0
7276
- BRDA:119,12,1,0
7277
- BRDA:119,13,0,0
7278
- BRDA:119,13,1,0
7279
- BRDA:132,14,0,0
7280
- BRDA:132,14,1,20
7281
- BRDA:137,15,0,18
7282
- BRDA:137,15,1,2
7283
- BRDA:142,16,0,0
7284
- BRDA:142,16,1,20
7285
- BRDA:149,17,0,0
7286
- BRDA:149,17,1,20
7287
- BRDA:176,18,0,0
7288
- BRDA:176,18,1,0
7289
- BRDA:176,19,0,0
7290
- BRDA:176,19,1,0
7291
- BRDA:189,20,0,0
7292
- BRDA:189,20,1,0
7293
- BRDA:202,21,0,5
7294
- BRDA:202,21,1,1
7295
- BRDA:203,22,0,0
7296
- BRDA:203,22,1,5
7297
- BRDA:217,23,0,0
7298
- BRDA:217,23,1,21
7299
- BRDA:217,24,0,21
7300
- BRDA:217,24,1,21
7301
- BRDA:220,25,0,21
7302
- BRDA:220,25,1,20
7303
- BRDA:221,26,0,21
7304
- BRDA:221,26,1,10
7305
- BRDA:223,27,0,2
7306
- BRDA:223,27,1,0
7307
- BRDA:227,28,0,16
7308
- BRDA:227,28,1,5
7309
- BRDA:232,29,0,0
7310
- BRDA:232,29,1,6
7311
- BRF:61
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
7312
7308
  BRH:38
7313
7309
  end_of_record
7314
7310
  TN:
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.0",
4
+ "version": "1.0.219-alpha.3",
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.0",
81
- "@budibase/client": "^1.0.219-alpha.0",
82
- "@budibase/pro": "1.0.219-alpha.0",
83
- "@budibase/string-templates": "^1.0.219-alpha.0",
84
- "@budibase/types": "^1.0.219-alpha.0",
80
+ "@budibase/backend-core": "^1.0.219-alpha.3",
81
+ "@budibase/client": "^1.0.219-alpha.3",
82
+ "@budibase/pro": "1.0.219-alpha.3",
83
+ "@budibase/string-templates": "^1.0.219-alpha.3",
84
+ "@budibase/types": "^1.0.219-alpha.3",
85
85
  "@bull-board/api": "3.7.0",
86
86
  "@bull-board/koa": "3.9.4",
87
87
  "@elastic/elasticsearch": "7.10.0",
@@ -15,6 +15,7 @@ const { integrations } = require("../integrations");
15
15
  const { processStringSync } = require("@budibase/string-templates");
16
16
  const { doInAppContext, getAppDB } = require("@budibase/backend-core/context");
17
17
  const { refreshOAuthToken, updateUserOAuth, } = require("@budibase/backend-core/auth");
18
+ const { user: userCache } = require("@budibase/backend-core/cache");
18
19
  const { getGlobalIDFromUserMetadataID } = require("../db/utils");
19
20
  const { isSQL } = require("../integrations/utils");
20
21
  const { enrichQueryFields, interpolateSQL, } = require("../integrations/queries/sql");
@@ -95,14 +96,9 @@ class QueryRunner {
95
96
  if (((_a = this.ctx.user) === null || _a === void 0 ? void 0 : _a.provider) &&
96
97
  info.code === 401 &&
97
98
  !this.hasRefreshedOAuth) {
99
+ yield this.refreshOAuth2(this.ctx);
98
100
  // Attempt to refresh the access token from the provider
99
101
  this.hasRefreshedOAuth = true;
100
- const authResponse = yield this.refreshOAuth2(this.ctx);
101
- if (!authResponse || authResponse.err) {
102
- // In this event the user may have oAuth issues that
103
- // could require re-authenticating with their provider.
104
- throw new Error("OAuth2 access token could not be refreshed");
105
- }
106
102
  }
107
103
  this.hasRerun = true;
108
104
  yield threadUtils.invalidateDynamicVariables(this.cachedVariables);
@@ -147,15 +143,20 @@ class QueryRunner {
147
143
  const { oauth2, providerType, _id } = ctx.user;
148
144
  const { configId } = ctx.auth;
149
145
  if (!providerType || !(oauth2 === null || oauth2 === void 0 ? void 0 : oauth2.refreshToken)) {
150
- console.error("No refresh token found for authenticated user");
151
- return;
146
+ throw new Error("No refresh token found for authenticated user");
152
147
  }
153
148
  const resp = yield refreshOAuthToken(oauth2.refreshToken, providerType, configId);
154
149
  // Refresh session flow. Should be in same location as refreshOAuthToken
155
150
  // There are several other properties available in 'resp'
156
- if (!resp.error) {
151
+ if (!resp.err) {
157
152
  const globalUserId = getGlobalIDFromUserMetadataID(_id);
158
153
  yield updateUserOAuth(globalUserId, resp);
154
+ this.ctx.user = yield userCache.getUser(globalUserId);
155
+ }
156
+ else {
157
+ // In this event the user may have oAuth issues that
158
+ // could require re-authenticating with their provider.
159
+ throw new Error("OAuth2 access token could not be refreshed: " + resp.err.toString());
159
160
  }
160
161
  return resp;
161
162
  });