@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.
- package/builder/assets/{index.3f761849.js → index.455dc625.js} +1 -1
- package/builder/index.html +1 -1
- package/coverage/clover.xml +107 -103
- package/coverage/coverage-final.json +2 -2
- package/coverage/lcov-report/api/controllers/apikeys.js.html +1 -1
- package/coverage/lcov-report/api/controllers/auth.js.html +1 -1
- package/coverage/lcov-report/api/controllers/automation.js.html +1 -1
- package/coverage/lcov-report/api/controllers/backup.js.html +1 -1
- package/coverage/lcov-report/api/controllers/cloud.js.html +1 -1
- package/coverage/lcov-report/api/controllers/component.js.html +1 -1
- package/coverage/lcov-report/api/controllers/datasource.js.html +1 -1
- package/coverage/lcov-report/api/controllers/dev.js.html +1 -1
- package/coverage/lcov-report/api/controllers/index.html +1 -1
- package/coverage/lcov-report/api/controllers/integration.js.html +1 -1
- package/coverage/lcov-report/api/controllers/layout.js.html +1 -1
- package/coverage/lcov-report/api/controllers/metadata.js.html +1 -1
- package/coverage/lcov-report/api/controllers/migrations.js.html +1 -1
- package/coverage/lcov-report/api/controllers/permission.js.html +1 -1
- package/coverage/lcov-report/api/controllers/query/index.html +1 -1
- package/coverage/lcov-report/api/controllers/query/validation.js.html +1 -1
- package/coverage/lcov-report/api/controllers/role.js.html +1 -1
- package/coverage/lcov-report/api/controllers/routing.js.html +1 -1
- package/coverage/lcov-report/api/controllers/row/external.js.html +1 -1
- package/coverage/lcov-report/api/controllers/row/index.html +1 -1
- package/coverage/lcov-report/api/controllers/row/internal.js.html +1 -1
- package/coverage/lcov-report/api/controllers/row/internalSearch.js.html +1 -1
- package/coverage/lcov-report/api/controllers/row/staticFormula.js.html +1 -1
- package/coverage/lcov-report/api/controllers/row/utils.js.html +1 -1
- package/coverage/lcov-report/api/controllers/screen.js.html +1 -1
- package/coverage/lcov-report/api/controllers/script.js.html +1 -1
- package/coverage/lcov-report/api/controllers/table/bulkFormula.js.html +1 -1
- package/coverage/lcov-report/api/controllers/table/external.js.html +1 -1
- package/coverage/lcov-report/api/controllers/table/index.html +1 -1
- package/coverage/lcov-report/api/controllers/table/index.js.html +1 -1
- package/coverage/lcov-report/api/controllers/templates.js.html +1 -1
- package/coverage/lcov-report/api/controllers/user.js.html +1 -1
- package/coverage/lcov-report/api/controllers/view/exporters.js.html +1 -1
- package/coverage/lcov-report/api/controllers/view/index.html +1 -1
- package/coverage/lcov-report/api/controllers/view/index.js.html +1 -1
- package/coverage/lcov-report/api/controllers/view/utils.js.html +1 -1
- package/coverage/lcov-report/api/controllers/view/viewBuilder.js.html +1 -1
- package/coverage/lcov-report/api/controllers/webhook.js.html +1 -1
- package/coverage/lcov-report/api/index.html +1 -1
- package/coverage/lcov-report/api/index.js.html +1 -1
- package/coverage/lcov-report/api/routes/analytics.js.html +1 -1
- package/coverage/lcov-report/api/routes/apikeys.js.html +1 -1
- package/coverage/lcov-report/api/routes/auth.js.html +1 -1
- package/coverage/lcov-report/api/routes/automation.js.html +1 -1
- package/coverage/lcov-report/api/routes/backup.js.html +1 -1
- package/coverage/lcov-report/api/routes/cloud.js.html +1 -1
- package/coverage/lcov-report/api/routes/component.js.html +1 -1
- package/coverage/lcov-report/api/routes/datasource.js.html +1 -1
- package/coverage/lcov-report/api/routes/deploy.js.html +1 -1
- package/coverage/lcov-report/api/routes/dev.js.html +1 -1
- package/coverage/lcov-report/api/routes/index.html +1 -1
- package/coverage/lcov-report/api/routes/integration.js.html +1 -1
- package/coverage/lcov-report/api/routes/layout.js.html +1 -1
- package/coverage/lcov-report/api/routes/metadata.js.html +1 -1
- package/coverage/lcov-report/api/routes/migrations.js.html +1 -1
- package/coverage/lcov-report/api/routes/permission.js.html +1 -1
- package/coverage/lcov-report/api/routes/query.js.html +1 -1
- package/coverage/lcov-report/api/routes/role.js.html +1 -1
- package/coverage/lcov-report/api/routes/routing.js.html +1 -1
- package/coverage/lcov-report/api/routes/screen.js.html +1 -1
- package/coverage/lcov-report/api/routes/script.js.html +1 -1
- package/coverage/lcov-report/api/routes/table.js.html +1 -1
- package/coverage/lcov-report/api/routes/templates.js.html +1 -1
- package/coverage/lcov-report/api/routes/user.js.html +1 -1
- package/coverage/lcov-report/api/routes/utils/index.html +1 -1
- package/coverage/lcov-report/api/routes/utils/validators.js.html +1 -1
- package/coverage/lcov-report/api/routes/view.js.html +1 -1
- package/coverage/lcov-report/api/routes/webhook.js.html +1 -1
- package/coverage/lcov-report/automations/actions.js.html +1 -1
- package/coverage/lcov-report/automations/automationUtils.js.html +1 -1
- package/coverage/lcov-report/automations/bullboard.js.html +1 -1
- package/coverage/lcov-report/automations/index.html +1 -1
- package/coverage/lcov-report/automations/index.js.html +1 -1
- package/coverage/lcov-report/automations/steps/bash.js.html +1 -1
- package/coverage/lcov-report/automations/steps/delay.js.html +1 -1
- package/coverage/lcov-report/automations/steps/discord.js.html +1 -1
- package/coverage/lcov-report/automations/steps/executeQuery.js.html +2 -2
- package/coverage/lcov-report/automations/steps/executeScript.js.html +1 -1
- package/coverage/lcov-report/automations/steps/filter.js.html +1 -1
- package/coverage/lcov-report/automations/steps/index.html +1 -1
- package/coverage/lcov-report/automations/steps/integromat.js.html +1 -1
- package/coverage/lcov-report/automations/steps/loop.js.html +1 -1
- package/coverage/lcov-report/automations/steps/outgoingWebhook.js.html +1 -1
- package/coverage/lcov-report/automations/steps/queryRows.js.html +1 -1
- package/coverage/lcov-report/automations/steps/sendSmtpEmail.js.html +1 -1
- package/coverage/lcov-report/automations/steps/serverLog.js.html +1 -1
- package/coverage/lcov-report/automations/steps/slack.js.html +1 -1
- package/coverage/lcov-report/automations/steps/updateRow.js.html +1 -1
- package/coverage/lcov-report/automations/steps/utils.js.html +1 -1
- package/coverage/lcov-report/automations/steps/zapier.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/app.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/cron.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/index.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/index.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/rowDeleted.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/rowSaved.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/rowUpdated.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/webhook.js.html +1 -1
- package/coverage/lcov-report/automations/triggers.js.html +1 -1
- package/coverage/lcov-report/constants/index.html +1 -1
- package/coverage/lcov-report/constants/index.js.html +1 -1
- package/coverage/lcov-report/constants/layouts.js.html +1 -1
- package/coverage/lcov-report/constants/screens.js.html +1 -1
- package/coverage/lcov-report/db/inMemoryView.js.html +1 -1
- package/coverage/lcov-report/db/index.html +1 -1
- package/coverage/lcov-report/db/index.js.html +1 -1
- package/coverage/lcov-report/db/linkedRows/LinkController.js.html +1 -1
- package/coverage/lcov-report/db/linkedRows/index.html +1 -1
- package/coverage/lcov-report/db/linkedRows/index.js.html +1 -1
- package/coverage/lcov-report/db/linkedRows/linkUtils.js.html +1 -1
- package/coverage/lcov-report/db/newid.js.html +1 -1
- package/coverage/lcov-report/db/utils.js.html +1 -1
- package/coverage/lcov-report/events/AutomationEmitter.js.html +1 -1
- package/coverage/lcov-report/events/index.html +1 -1
- package/coverage/lcov-report/events/index.js.html +1 -1
- package/coverage/lcov-report/events/utils.js.html +1 -1
- package/coverage/lcov-report/index.html +13 -13
- package/coverage/lcov-report/integrations/tests/TestConfiguration.js.html +1 -1
- package/coverage/lcov-report/integrations/tests/index.html +1 -1
- package/coverage/lcov-report/middleware/appInfo.js.html +1 -1
- package/coverage/lcov-report/middleware/builder.js.html +1 -1
- package/coverage/lcov-report/middleware/currentapp.js.html +1 -1
- package/coverage/lcov-report/middleware/index.html +1 -1
- package/coverage/lcov-report/middleware/joi-validator.js.html +1 -1
- package/coverage/lcov-report/middleware/publicApi.js.html +1 -1
- package/coverage/lcov-report/middleware/resourceId.js.html +1 -1
- package/coverage/lcov-report/middleware/selfhost.js.html +1 -1
- package/coverage/lcov-report/middleware/utils.js.html +1 -1
- package/coverage/lcov-report/threads/automation.js.html +1 -1
- package/coverage/lcov-report/threads/index.html +14 -14
- package/coverage/lcov-report/threads/query.js.html +40 -25
- package/coverage/lcov-report/threads/utils.js.html +1 -1
- package/coverage/lcov-report/utilities/budibaseDir.js.html +1 -1
- package/coverage/lcov-report/utilities/centralPath.js.html +1 -1
- package/coverage/lcov-report/utilities/csvParser.js.html +1 -1
- package/coverage/lcov-report/utilities/global.js.html +1 -1
- package/coverage/lcov-report/utilities/index.html +1 -1
- package/coverage/lcov-report/utilities/index.js.html +1 -1
- package/coverage/lcov-report/utilities/queue/inMemoryQueue.js.html +1 -1
- package/coverage/lcov-report/utilities/queue/index.html +1 -1
- package/coverage/lcov-report/utilities/routing/index.html +1 -1
- package/coverage/lcov-report/utilities/routing/index.js.html +1 -1
- package/coverage/lcov-report/utilities/rowProcessor/index.html +1 -1
- package/coverage/lcov-report/utilities/rowProcessor/index.js.html +1 -1
- package/coverage/lcov-report/utilities/rowProcessor/utils.js.html +1 -1
- package/coverage/lcov-report/utilities/scriptRunner.js.html +1 -1
- package/coverage/lcov-report/utilities/security.js.html +1 -1
- package/coverage/lcov-report/utilities/statusCodes.js.html +1 -1
- package/coverage/lcov-report/utilities/usageQuota/index.html +1 -1
- package/coverage/lcov-report/utilities/usageQuota/rows.js.html +1 -1
- package/coverage/lcov-report/utilities/usageQuota/usageQuoteReset.js.html +1 -1
- package/coverage/lcov-report/utilities/users.js.html +1 -1
- package/coverage/lcov-report/utilities/workerRequests.js.html +1 -1
- package/coverage/lcov.info +167 -161
- package/dist/api/controllers/query/index.js +7 -4
- package/dist/automations/steps/executeQuery.js +1 -1
- package/dist/package.json +6 -6
- package/dist/threads/query.js +20 -13
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +7 -7
- package/src/api/controllers/query/index.ts +13 -5
- package/src/api/routes/tests/query.spec.js +0 -1
- package/src/automations/steps/executeQuery.js +1 -1
- package/src/threads/query.js +20 -15
package/coverage/lcov.info
CHANGED
|
@@ -7091,19 +7091,19 @@ BRH:20
|
|
|
7091
7091
|
end_of_record
|
|
7092
7092
|
TN:
|
|
7093
7093
|
SF:src/threads/query.js
|
|
7094
|
-
FN:
|
|
7095
|
-
FN:
|
|
7096
|
-
FN:
|
|
7097
|
-
FN:
|
|
7098
|
-
FN:
|
|
7099
|
-
FN:
|
|
7100
|
-
FN:
|
|
7101
|
-
FN:
|
|
7102
|
-
FN:
|
|
7103
|
-
FN:
|
|
7104
|
-
FN:
|
|
7105
|
-
FN:
|
|
7106
|
-
FN:
|
|
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:
|
|
7132
|
-
DA:
|
|
7133
|
-
DA:
|
|
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:
|
|
7143
|
-
DA:
|
|
7142
|
+
DA:31,22
|
|
7143
|
+
DA:33,22
|
|
7144
7144
|
DA:37,22
|
|
7145
7145
|
DA:38,22
|
|
7146
|
-
DA:
|
|
7147
|
-
DA:
|
|
7146
|
+
DA:39,22
|
|
7147
|
+
DA:43,23
|
|
7148
7148
|
DA:45,23
|
|
7149
|
-
DA:46,
|
|
7150
|
-
DA:
|
|
7151
|
-
DA:
|
|
7152
|
-
DA:
|
|
7153
|
-
DA:
|
|
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:
|
|
7156
|
-
DA:
|
|
7157
|
+
DA:63,21
|
|
7158
|
+
DA:67,21
|
|
7157
7159
|
DA:68,21
|
|
7158
|
-
DA:
|
|
7159
|
-
DA:
|
|
7160
|
-
DA:
|
|
7161
|
-
DA:
|
|
7162
|
-
DA:
|
|
7163
|
-
DA:
|
|
7164
|
-
DA:88,
|
|
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,
|
|
7171
|
-
DA:95,
|
|
7172
|
-
DA:96,
|
|
7170
|
+
DA:94,21
|
|
7171
|
+
DA:95,21
|
|
7172
|
+
DA:96,21
|
|
7173
7173
|
DA:97,19
|
|
7174
|
-
DA:
|
|
7175
|
-
DA:
|
|
7176
|
-
DA:
|
|
7177
|
-
DA:
|
|
7178
|
-
DA:
|
|
7179
|
-
DA:
|
|
7180
|
-
DA:
|
|
7181
|
-
DA:
|
|
7182
|
-
DA:
|
|
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:
|
|
7185
|
-
DA:
|
|
7186
|
-
DA:
|
|
7187
|
-
DA:
|
|
7188
|
-
DA:
|
|
7189
|
-
DA:
|
|
7190
|
-
DA:
|
|
7191
|
-
DA:
|
|
7192
|
-
DA:
|
|
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:
|
|
7195
|
-
DA:
|
|
7196
|
-
DA:
|
|
7197
|
-
DA:
|
|
7198
|
-
DA:
|
|
7199
|
-
DA:
|
|
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:
|
|
7204
|
-
DA:
|
|
7205
|
-
DA:
|
|
7206
|
-
DA:
|
|
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:
|
|
7210
|
-
DA:
|
|
7211
|
-
DA:
|
|
7212
|
-
DA:
|
|
7213
|
-
DA:
|
|
7214
|
-
DA:
|
|
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:
|
|
7218
|
-
DA:
|
|
7219
|
-
DA:
|
|
7220
|
-
DA:218,
|
|
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,
|
|
7226
|
-
DA:
|
|
7225
|
+
DA:224,0
|
|
7226
|
+
DA:226,21
|
|
7227
|
+
DA:227,21
|
|
7227
7228
|
DA:228,21
|
|
7228
|
-
DA:
|
|
7229
|
-
DA:
|
|
7230
|
-
DA:233,
|
|
7231
|
-
DA:
|
|
7232
|
-
DA:
|
|
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:
|
|
7235
|
-
DA:
|
|
7236
|
-
DA:242,16
|
|
7235
|
+
DA:239,0
|
|
7236
|
+
DA:242,6
|
|
7237
7237
|
DA:243,6
|
|
7238
|
-
DA:
|
|
7239
|
-
DA:
|
|
7240
|
-
DA:
|
|
7241
|
-
DA:
|
|
7242
|
-
DA:
|
|
7243
|
-
DA:
|
|
7244
|
-
DA:
|
|
7245
|
-
DA:
|
|
7246
|
-
DA:
|
|
7247
|
-
DA:269,
|
|
7248
|
-
|
|
7249
|
-
|
|
7250
|
-
|
|
7251
|
-
|
|
7252
|
-
|
|
7253
|
-
|
|
7254
|
-
BRDA:
|
|
7255
|
-
BRDA:
|
|
7256
|
-
BRDA:
|
|
7257
|
-
BRDA:
|
|
7258
|
-
BRDA:
|
|
7259
|
-
BRDA:
|
|
7260
|
-
BRDA:
|
|
7261
|
-
BRDA:
|
|
7262
|
-
BRDA:
|
|
7263
|
-
BRDA:
|
|
7264
|
-
BRDA:
|
|
7265
|
-
BRDA:
|
|
7266
|
-
BRDA:
|
|
7267
|
-
BRDA:
|
|
7268
|
-
BRDA:
|
|
7269
|
-
BRDA:
|
|
7270
|
-
BRDA:
|
|
7271
|
-
BRDA:
|
|
7272
|
-
BRDA:
|
|
7273
|
-
BRDA:
|
|
7274
|
-
BRDA:
|
|
7275
|
-
BRDA:
|
|
7276
|
-
BRDA:
|
|
7277
|
-
BRDA:
|
|
7278
|
-
BRDA:
|
|
7279
|
-
BRDA:
|
|
7280
|
-
BRDA:
|
|
7281
|
-
BRDA:
|
|
7282
|
-
BRDA:
|
|
7283
|
-
BRDA:
|
|
7284
|
-
BRDA:
|
|
7285
|
-
BRDA:
|
|
7286
|
-
BRDA:
|
|
7287
|
-
BRDA:
|
|
7288
|
-
BRDA:
|
|
7289
|
-
BRDA:
|
|
7290
|
-
BRDA:
|
|
7291
|
-
BRDA:
|
|
7292
|
-
BRDA:
|
|
7293
|
-
BRDA:
|
|
7294
|
-
BRDA:
|
|
7295
|
-
BRDA:
|
|
7296
|
-
BRDA:
|
|
7297
|
-
BRDA:
|
|
7298
|
-
BRDA:
|
|
7299
|
-
BRDA:
|
|
7300
|
-
BRDA:
|
|
7301
|
-
BRDA:
|
|
7302
|
-
BRDA:
|
|
7303
|
-
BRDA:
|
|
7304
|
-
BRDA:
|
|
7305
|
-
BRDA:
|
|
7306
|
-
BRDA:
|
|
7307
|
-
|
|
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
|
-
|
|
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.
|
|
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.
|
|
81
|
-
"@budibase/client": "^1.0.219-alpha.
|
|
82
|
-
"@budibase/pro": "1.0.219-alpha.
|
|
83
|
-
"@budibase/string-templates": "^1.0.219-alpha.
|
|
84
|
-
"@budibase/types": "^1.0.219-alpha.
|
|
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",
|
package/dist/threads/query.js
CHANGED
|
@@ -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
|
-
|
|
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 (
|
|
51
|
-
|
|
52
|
-
|
|
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(
|
|
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 (
|
|
64
|
-
|
|
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(
|
|
69
|
-
query = interpolateSQL(
|
|
72
|
+
if (isSQL(datasourceClone)) {
|
|
73
|
+
query = interpolateSQL(fieldsClone, enrichedParameters, integration);
|
|
70
74
|
}
|
|
71
75
|
else {
|
|
72
|
-
query = enrichQueryFields(
|
|
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
|
-
|
|
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
|
-
|
|
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
|
});
|