@budibase/server 1.0.19-alpha.2 → 1.0.19-alpha.3
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.2fc6da87.css → index.540a5506.css} +1 -1
- package/builder/assets/{index.86b28e1c.js → index.6de3403f.js} +206 -205
- package/builder/index.html +2 -2
- package/coverage/clover.xml +8 -8
- package/coverage/coverage-final.json +1 -1
- package/coverage/lcov-report/api/controllers/analytics.js.html +1 -1
- package/coverage/lcov-report/api/controllers/apikeys.js.html +1 -1
- package/coverage/lcov-report/api/controllers/application.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/hosting.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/permission.js.html +1 -1
- package/coverage/lcov-report/api/controllers/query/index.html +1 -1
- package/coverage/lcov-report/api/controllers/query/index.js.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/index.js.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/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/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/table/internal.js.html +1 -1
- package/coverage/lcov-report/api/controllers/table/utils.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/application.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/hosting.js.html +1 -1
- package/coverage/lcov-report/api/routes/index.html +1 -1
- package/coverage/lcov-report/api/routes/index.js.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/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/row.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/static.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/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/createRow.js.html +1 -1
- package/coverage/lcov-report/automations/steps/delay.js.html +1 -1
- package/coverage/lcov-report/automations/steps/deleteRow.js.html +1 -1
- package/coverage/lcov-report/automations/steps/discord.js.html +1 -1
- package/coverage/lcov-report/automations/steps/executeQuery.js.html +1 -1
- 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/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/automations/utils.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/client.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 +1 -1
- 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/authorized.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/resourceId.js.html +1 -1
- package/coverage/lcov-report/middleware/selfhost.js.html +1 -1
- package/coverage/lcov-report/middleware/usageQuota.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 +1 -1
- package/coverage/lcov-report/threads/index.js.html +1 -1
- package/coverage/lcov-report/threads/query.js.html +1 -1
- package/coverage/lcov-report/utilities/bcrypt.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 +7 -7
- 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/users.js.html +1 -1
- package/coverage/lcov-report/utilities/workerRequests.js.html +1 -1
- package/coverage/lcov.info +13 -13
- package/dist/definitions/datasource.js +6 -1
- package/dist/integrations/rest.js +28 -3
- package/dist/package.json +4 -4
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +5 -5
- package/src/api/controllers/query/import/index.ts +1 -1
- package/src/api/controllers/query/import/sources/curl.ts +1 -1
- package/src/definitions/datasource.ts +23 -0
- package/src/integrations/base/IntegrationBase.ts +4 -4
- package/src/integrations/rest.ts +39 -2
- package/src/integrations/tests/rest.spec.js +55 -0
|
@@ -313,7 +313,7 @@ module.exports = (input, callback) => {
|
|
|
313
313
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
314
314
|
Code coverage generated by
|
|
315
315
|
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
|
316
|
-
at Tue Dec 14 2021
|
|
316
|
+
at Tue Dec 14 2021 12:31:13 GMT+0000 (Coordinated Universal Time)
|
|
317
317
|
</div>
|
|
318
318
|
</div>
|
|
319
319
|
<script src="../prettify.js"></script>
|
|
@@ -109,7 +109,7 @@ const SALT_ROUNDS = <span class="cstat-no" title="statement not covered" >env.SA
|
|
|
109
109
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
110
110
|
Code coverage generated by
|
|
111
111
|
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
|
112
|
-
at Tue Dec 14 2021
|
|
112
|
+
at Tue Dec 14 2021 12:31:13 GMT+0000 (Coordinated Universal Time)
|
|
113
113
|
</div>
|
|
114
114
|
</div>
|
|
115
115
|
<script src="../prettify.js"></script>
|
|
@@ -94,7 +94,7 @@ module.exports.budibaseTempDir = budibaseTempDir
|
|
|
94
94
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
95
95
|
Code coverage generated by
|
|
96
96
|
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
|
97
|
-
at Tue Dec 14 2021
|
|
97
|
+
at Tue Dec 14 2021 12:31:13 GMT+0000 (Coordinated Universal Time)
|
|
98
98
|
</div>
|
|
99
99
|
</div>
|
|
100
100
|
<script src="../prettify.js"></script>
|
|
@@ -130,7 +130,7 @@ exports.resolve = <span class="fstat-no" title="function not covered" >fu</span>
|
|
|
130
130
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
131
131
|
Code coverage generated by
|
|
132
132
|
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
|
133
|
-
at Tue Dec 14 2021
|
|
133
|
+
at Tue Dec 14 2021 12:31:13 GMT+0000 (Coordinated Universal Time)
|
|
134
134
|
</div>
|
|
135
135
|
</div>
|
|
136
136
|
<script src="../prettify.js"></script>
|
|
@@ -496,7 +496,7 @@ module.exports = {
|
|
|
496
496
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
497
497
|
Code coverage generated by
|
|
498
498
|
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
|
499
|
-
at Tue Dec 14 2021
|
|
499
|
+
at Tue Dec 14 2021 12:31:13 GMT+0000 (Coordinated Universal Time)
|
|
500
500
|
</div>
|
|
501
501
|
</div>
|
|
502
502
|
<script src="../prettify.js"></script>
|
|
@@ -367,7 +367,7 @@ exports.getGlobalUsersFromMetadata = async (appId, users) => {
|
|
|
367
367
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
368
368
|
Code coverage generated by
|
|
369
369
|
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
|
370
|
-
at Tue Dec 14 2021
|
|
370
|
+
at Tue Dec 14 2021 12:31:13 GMT+0000 (Coordinated Universal Time)
|
|
371
371
|
</div>
|
|
372
372
|
</div>
|
|
373
373
|
<script src="../prettify.js"></script>
|
|
@@ -245,7 +245,7 @@
|
|
|
245
245
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
246
246
|
Code coverage generated by
|
|
247
247
|
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
|
248
|
-
at Tue Dec 14 2021
|
|
248
|
+
at Tue Dec 14 2021 12:31:13 GMT+0000 (Coordinated Universal Time)
|
|
249
249
|
</div>
|
|
250
250
|
</div>
|
|
251
251
|
<script src="../prettify.js"></script>
|
|
@@ -374,14 +374,14 @@
|
|
|
374
374
|
<span class="cline-any cline-neutral"> </span>
|
|
375
375
|
<span class="cline-any cline-neutral"> </span>
|
|
376
376
|
<span class="cline-any cline-yes">37x</span>
|
|
377
|
-
<span class="cline-any cline-yes">
|
|
378
|
-
<span class="cline-any cline-yes">
|
|
379
|
-
<span class="cline-any cline-yes">
|
|
380
|
-
<span class="cline-any cline-yes">
|
|
381
|
-
<span class="cline-any cline-yes">
|
|
377
|
+
<span class="cline-any cline-yes">6x</span>
|
|
378
|
+
<span class="cline-any cline-yes">6x</span>
|
|
379
|
+
<span class="cline-any cline-yes">6x</span>
|
|
380
|
+
<span class="cline-any cline-yes">6x</span>
|
|
381
|
+
<span class="cline-any cline-yes">6x</span>
|
|
382
382
|
<span class="cline-any cline-no"> </span>
|
|
383
383
|
<span class="cline-any cline-neutral"> </span>
|
|
384
|
-
<span class="cline-any cline-yes">
|
|
384
|
+
<span class="cline-any cline-yes">6x</span>
|
|
385
385
|
<span class="cline-any cline-neutral"> </span>
|
|
386
386
|
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">const env = require("../environment")
|
|
387
387
|
const { OBJ_STORE_DIRECTORY } = require("../constants")
|
|
@@ -553,7 +553,7 @@ exports.formatBytes = bytes => {
|
|
|
553
553
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
554
554
|
Code coverage generated by
|
|
555
555
|
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
|
556
|
-
at Tue Dec 14 2021
|
|
556
|
+
at Tue Dec 14 2021 12:31:13 GMT+0000 (Coordinated Universal Time)
|
|
557
557
|
</div>
|
|
558
558
|
</div>
|
|
559
559
|
<script src="../prettify.js"></script>
|
|
@@ -367,7 +367,7 @@ module.exports = InMemoryQueue
|
|
|
367
367
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
368
368
|
Code coverage generated by
|
|
369
369
|
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
|
370
|
-
at Tue Dec 14 2021
|
|
370
|
+
at Tue Dec 14 2021 12:31:13 GMT+0000 (Coordinated Universal Time)
|
|
371
371
|
</div>
|
|
372
372
|
</div>
|
|
373
373
|
<script src="../../prettify.js"></script>
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
96
96
|
Code coverage generated by
|
|
97
97
|
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
|
98
|
-
at Tue Dec 14 2021
|
|
98
|
+
at Tue Dec 14 2021 12:31:13 GMT+0000 (Coordinated Universal Time)
|
|
99
99
|
</div>
|
|
100
100
|
</div>
|
|
101
101
|
<script src="../../prettify.js"></script>
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
96
96
|
Code coverage generated by
|
|
97
97
|
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
|
98
|
-
at Tue Dec 14 2021
|
|
98
|
+
at Tue Dec 14 2021 12:31:13 GMT+0000 (Coordinated Universal Time)
|
|
99
99
|
</div>
|
|
100
100
|
</div>
|
|
101
101
|
<script src="../../prettify.js"></script>
|
|
@@ -139,7 +139,7 @@ exports.createRoutingView = createRoutingView
|
|
|
139
139
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
140
140
|
Code coverage generated by
|
|
141
141
|
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
|
142
|
-
at Tue Dec 14 2021
|
|
142
|
+
at Tue Dec 14 2021 12:31:13 GMT+0000 (Coordinated Universal Time)
|
|
143
143
|
</div>
|
|
144
144
|
</div>
|
|
145
145
|
<script src="../../prettify.js"></script>
|
|
@@ -110,7 +110,7 @@
|
|
|
110
110
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
111
111
|
Code coverage generated by
|
|
112
112
|
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
|
113
|
-
at Tue Dec 14 2021
|
|
113
|
+
at Tue Dec 14 2021 12:31:13 GMT+0000 (Coordinated Universal Time)
|
|
114
114
|
</div>
|
|
115
115
|
</div>
|
|
116
116
|
<script src="../../prettify.js"></script>
|
|
@@ -850,7 +850,7 @@ exports.outputProcessing = async (
|
|
|
850
850
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
851
851
|
Code coverage generated by
|
|
852
852
|
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
|
853
|
-
at Tue Dec 14 2021
|
|
853
|
+
at Tue Dec 14 2021 12:31:13 GMT+0000 (Coordinated Universal Time)
|
|
854
854
|
</div>
|
|
855
855
|
</div>
|
|
856
856
|
<script src="../../prettify.js"></script>
|
|
@@ -133,7 +133,7 @@ exports.processFormulas = (table, rows) => {
|
|
|
133
133
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
134
134
|
Code coverage generated by
|
|
135
135
|
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
|
136
|
-
at Tue Dec 14 2021
|
|
136
|
+
at Tue Dec 14 2021 12:31:13 GMT+0000 (Coordinated Universal Time)
|
|
137
137
|
</div>
|
|
138
138
|
</div>
|
|
139
139
|
<script src="../../prettify.js"></script>
|
|
@@ -136,7 +136,7 @@ module.exports = ScriptRunner
|
|
|
136
136
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
137
137
|
Code coverage generated by
|
|
138
138
|
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
|
139
|
-
at Tue Dec 14 2021
|
|
139
|
+
at Tue Dec 14 2021 12:31:13 GMT+0000 (Coordinated Universal Time)
|
|
140
140
|
</div>
|
|
141
141
|
</div>
|
|
142
142
|
<script src="../prettify.js"></script>
|
|
@@ -265,7 +265,7 @@ exports.CURRENTLY_SUPPORTED_LEVELS = CURRENTLY_SUPPORTED_LEVELS
|
|
|
265
265
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
266
266
|
Code coverage generated by
|
|
267
267
|
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
|
268
|
-
at Tue Dec 14 2021
|
|
268
|
+
at Tue Dec 14 2021 12:31:13 GMT+0000 (Coordinated Universal Time)
|
|
269
269
|
</div>
|
|
270
270
|
</div>
|
|
271
271
|
<script src="../prettify.js"></script>
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
86
86
|
Code coverage generated by
|
|
87
87
|
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
|
88
|
-
at Tue Dec 14 2021
|
|
88
|
+
at Tue Dec 14 2021 12:31:13 GMT+0000 (Coordinated Universal Time)
|
|
89
89
|
</div>
|
|
90
90
|
</div>
|
|
91
91
|
<script src="../prettify.js"></script>
|
|
@@ -136,7 +136,7 @@ exports.getFullUser = async (ctx, userId) => {
|
|
|
136
136
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
137
137
|
Code coverage generated by
|
|
138
138
|
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
|
139
|
-
at Tue Dec 14 2021
|
|
139
|
+
at Tue Dec 14 2021 12:31:13 GMT+0000 (Coordinated Universal Time)
|
|
140
140
|
</div>
|
|
141
141
|
</div>
|
|
142
142
|
<script src="../prettify.js"></script>
|
|
@@ -403,7 +403,7 @@ exports.removeAppFromUserRoles = async (ctx, appId) => {
|
|
|
403
403
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
404
404
|
Code coverage generated by
|
|
405
405
|
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
|
406
|
-
at Tue Dec 14 2021
|
|
406
|
+
at Tue Dec 14 2021 12:31:13 GMT+0000 (Coordinated Universal Time)
|
|
407
407
|
</div>
|
|
408
408
|
</div>
|
|
409
409
|
<script src="../prettify.js"></script>
|
package/coverage/lcov.info
CHANGED
|
@@ -8112,7 +8112,7 @@ FNDA:0,(anonymous_11)
|
|
|
8112
8112
|
FNDA:0,(anonymous_12)
|
|
8113
8113
|
FNDA:0,(anonymous_13)
|
|
8114
8114
|
FNDA:0,(anonymous_14)
|
|
8115
|
-
FNDA:
|
|
8115
|
+
FNDA:6,(anonymous_15)
|
|
8116
8116
|
DA:1,37
|
|
8117
8117
|
DA:2,37
|
|
8118
8118
|
DA:3,37
|
|
@@ -8182,13 +8182,13 @@ DA:147,0
|
|
|
8182
8182
|
DA:148,0
|
|
8183
8183
|
DA:150,0
|
|
8184
8184
|
DA:154,37
|
|
8185
|
-
DA:155,
|
|
8186
|
-
DA:156,
|
|
8187
|
-
DA:157,
|
|
8188
|
-
DA:158,
|
|
8189
|
-
DA:159,
|
|
8185
|
+
DA:155,6
|
|
8186
|
+
DA:156,6
|
|
8187
|
+
DA:157,6
|
|
8188
|
+
DA:158,6
|
|
8189
|
+
DA:159,6
|
|
8190
8190
|
DA:160,0
|
|
8191
|
-
DA:162,
|
|
8191
|
+
DA:162,6
|
|
8192
8192
|
LF:76
|
|
8193
8193
|
LH:55
|
|
8194
8194
|
BRDA:16,0,0,1
|
|
@@ -8209,14 +8209,14 @@ BRDA:120,7,0,4
|
|
|
8209
8209
|
BRDA:120,7,1,4
|
|
8210
8210
|
BRDA:148,8,0,0
|
|
8211
8211
|
BRDA:148,8,1,0
|
|
8212
|
-
BRDA:158,9,0,
|
|
8213
|
-
BRDA:158,9,1,
|
|
8214
|
-
BRDA:159,10,0,
|
|
8212
|
+
BRDA:158,9,0,6
|
|
8213
|
+
BRDA:158,9,1,6
|
|
8214
|
+
BRDA:159,10,0,6
|
|
8215
8215
|
BRDA:159,10,1,0
|
|
8216
8216
|
BRDA:162,11,0,0
|
|
8217
|
-
BRDA:162,11,1,
|
|
8218
|
-
BRDA:162,12,0,
|
|
8219
|
-
BRDA:162,12,1,
|
|
8217
|
+
BRDA:162,11,1,6
|
|
8218
|
+
BRDA:162,12,0,6
|
|
8219
|
+
BRDA:162,12,1,6
|
|
8220
8220
|
BRF:26
|
|
8221
8221
|
BRH:13
|
|
8222
8222
|
end_of_record
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FilterTypes = exports.IncludeRelationships = exports.SourceNames = exports.DatasourceFieldTypes = exports.QueryTypes = exports.SortDirection = exports.Operation = void 0;
|
|
3
|
+
exports.AuthType = exports.FilterTypes = exports.IncludeRelationships = exports.SourceNames = exports.DatasourceFieldTypes = exports.QueryTypes = exports.SortDirection = exports.Operation = void 0;
|
|
4
4
|
var Operation;
|
|
5
5
|
(function (Operation) {
|
|
6
6
|
Operation["CREATE"] = "CREATE";
|
|
@@ -66,3 +66,8 @@ var FilterTypes;
|
|
|
66
66
|
FilterTypes["NOT_EMPTY"] = "notEmpty";
|
|
67
67
|
FilterTypes["ONE_OF"] = "oneOf";
|
|
68
68
|
})(FilterTypes = exports.FilterTypes || (exports.FilterTypes = {}));
|
|
69
|
+
var AuthType;
|
|
70
|
+
(function (AuthType) {
|
|
71
|
+
AuthType["BASIC"] = "basic";
|
|
72
|
+
AuthType["BEARER"] = "bearer";
|
|
73
|
+
})(AuthType = exports.AuthType || (exports.AuthType = {}));
|
|
@@ -142,10 +142,33 @@ var RestModule;
|
|
|
142
142
|
}
|
|
143
143
|
return complete;
|
|
144
144
|
}
|
|
145
|
+
getAuthHeaders(authConfigId) {
|
|
146
|
+
let headers = {};
|
|
147
|
+
if (this.config.authConfigs && authConfigId) {
|
|
148
|
+
const authConfig = this.config.authConfigs.filter(c => c._id === authConfigId)[0];
|
|
149
|
+
// check the config still exists before proceeding
|
|
150
|
+
// if not - do nothing
|
|
151
|
+
if (authConfig) {
|
|
152
|
+
let config;
|
|
153
|
+
switch (authConfig.type) {
|
|
154
|
+
case datasource_1.AuthType.BASIC:
|
|
155
|
+
config = authConfig.config;
|
|
156
|
+
headers.Authorization = `Basic ${Buffer.from(`${config.username}:${config.password}`).toString("base64")}`;
|
|
157
|
+
break;
|
|
158
|
+
case datasource_1.AuthType.BEARER:
|
|
159
|
+
config = authConfig.config;
|
|
160
|
+
headers.Authorization = `Bearer ${config.token}`;
|
|
161
|
+
break;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
return headers;
|
|
166
|
+
}
|
|
145
167
|
_req(query) {
|
|
146
168
|
return __awaiter(this, void 0, void 0, function* () {
|
|
147
|
-
const { path = "", queryString = "", headers = {}, method = "GET", disabledHeaders, bodyType, requestBody } = query;
|
|
148
|
-
|
|
169
|
+
const { path = "", queryString = "", headers = {}, method = "GET", disabledHeaders, bodyType, requestBody, authConfigId } = query;
|
|
170
|
+
const authHeaders = this.getAuthHeaders(authConfigId);
|
|
171
|
+
this.headers = Object.assign(Object.assign(Object.assign({}, this.config.defaultHeaders), headers), authHeaders);
|
|
149
172
|
if (disabledHeaders) {
|
|
150
173
|
for (let headerKey of Object.keys(this.headers)) {
|
|
151
174
|
if (disabledHeaders[headerKey]) {
|
|
@@ -167,7 +190,8 @@ var RestModule;
|
|
|
167
190
|
input.body = JSON.stringify(json);
|
|
168
191
|
}
|
|
169
192
|
this.startTimeMs = performance.now();
|
|
170
|
-
const
|
|
193
|
+
const url = this.getUrl(path, queryString);
|
|
194
|
+
const response = yield fetch(url, input);
|
|
171
195
|
return yield this.parseResponse(response);
|
|
172
196
|
});
|
|
173
197
|
}
|
|
@@ -200,5 +224,6 @@ var RestModule;
|
|
|
200
224
|
module.exports = {
|
|
201
225
|
schema: SCHEMA,
|
|
202
226
|
integration: RestIntegration,
|
|
227
|
+
AuthType: datasource_1.AuthType,
|
|
203
228
|
};
|
|
204
229
|
})(RestModule || (RestModule = {}));
|
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.19-alpha.
|
|
4
|
+
"version": "1.0.19-alpha.2",
|
|
5
5
|
"description": "Budibase Web Server",
|
|
6
6
|
"main": "src/index.ts",
|
|
7
7
|
"repository": {
|
|
@@ -70,9 +70,9 @@
|
|
|
70
70
|
"license": "GPL-3.0",
|
|
71
71
|
"dependencies": {
|
|
72
72
|
"@apidevtools/swagger-parser": "^10.0.3",
|
|
73
|
-
"@budibase/auth": "^1.0.19-alpha.
|
|
74
|
-
"@budibase/client": "^1.0.19-alpha.
|
|
75
|
-
"@budibase/string-templates": "^1.0.19-alpha.
|
|
73
|
+
"@budibase/auth": "^1.0.19-alpha.2",
|
|
74
|
+
"@budibase/client": "^1.0.19-alpha.2",
|
|
75
|
+
"@budibase/string-templates": "^1.0.19-alpha.2",
|
|
76
76
|
"@bull-board/api": "^3.7.0",
|
|
77
77
|
"@bull-board/koa": "^3.7.0",
|
|
78
78
|
"@elastic/elasticsearch": "7.10.0",
|