@budibase/server 1.0.81 → 1.0.82
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.f89561ac.js → index.5d245850.js} +140 -139
- package/builder/assets/{index.dd19c61c.css → index.7c8961b4.css} +2 -2
- package/builder/index.html +2 -2
- package/coverage/clover.xml +10 -5
- package/coverage/coverage-final.json +2 -2
- 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/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/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 +5 -5
- 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/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/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/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/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/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/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/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 +18 -18
- 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/threads/utils.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 +18 -18
- package/coverage/lcov-report/utilities/index.js.html +34 -10
- 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/index.js.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 +17 -6
- package/dist/api/controllers/public/rows.js +2 -1
- package/dist/api/controllers/row/external.js +4 -4
- package/dist/api/routes/public/applications.js +1 -8
- package/dist/api/routes/public/queries.js +1 -8
- package/dist/api/routes/public/tables.js +1 -8
- package/dist/api/routes/public/users.js +1 -8
- package/dist/package.json +4 -4
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/utilities/index.js +7 -0
- package/package.json +5 -5
- package/scripts/docs/toSwagger.js +1 -1
- package/specs/openapi.json +429 -48
- package/specs/openapi.yaml +337 -32
- package/specs/resources/application.js +6 -0
- package/specs/resources/query.js +6 -0
- package/specs/resources/table.js +6 -0
- package/specs/resources/user.js +6 -0
- package/src/api/controllers/public/rows.ts +2 -1
- package/src/api/controllers/row/external.js +4 -4
- package/src/api/routes/public/applications.ts +1 -8
- package/src/api/routes/public/queries.ts +1 -8
- package/src/api/routes/public/tables.ts +1 -8
- package/src/api/routes/public/users.ts +1 -8
- package/src/definitions/openapi.ts +194 -12
- package/src/utilities/index.js +8 -0
|
@@ -23,30 +23,30 @@
|
|
|
23
23
|
<div class='clearfix'>
|
|
24
24
|
|
|
25
25
|
<div class='fl pad1y space-right2'>
|
|
26
|
-
<span class="strong">77.
|
|
26
|
+
<span class="strong">77.92% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>
|
|
28
|
+
<span class='fraction'>60/77</span>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
<div class='fl pad1y space-right2'>
|
|
33
|
-
<span class="strong">53.
|
|
33
|
+
<span class="strong">53.33% </span>
|
|
34
34
|
<span class="quiet">Branches</span>
|
|
35
|
-
<span class='fraction'>
|
|
35
|
+
<span class='fraction'>16/30</span>
|
|
36
36
|
</div>
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
<div class='fl pad1y space-right2'>
|
|
40
|
-
<span class="strong">
|
|
40
|
+
<span class="strong">81.25% </span>
|
|
41
41
|
<span class="quiet">Functions</span>
|
|
42
|
-
<span class='fraction'>
|
|
42
|
+
<span class='fraction'>13/16</span>
|
|
43
43
|
</div>
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
<div class='fl pad1y space-right2'>
|
|
47
|
-
<span class="strong">77.
|
|
47
|
+
<span class="strong">77.33% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>
|
|
49
|
+
<span class='fraction'>58/75</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
|
|
@@ -210,7 +210,15 @@
|
|
|
210
210
|
<a name='L151'></a><a href='#L151'>151</a>
|
|
211
211
|
<a name='L152'></a><a href='#L152'>152</a>
|
|
212
212
|
<a name='L153'></a><a href='#L153'>153</a>
|
|
213
|
-
<a name='L154'></a><a href='#L154'>154</a
|
|
213
|
+
<a name='L154'></a><a href='#L154'>154</a>
|
|
214
|
+
<a name='L155'></a><a href='#L155'>155</a>
|
|
215
|
+
<a name='L156'></a><a href='#L156'>156</a>
|
|
216
|
+
<a name='L157'></a><a href='#L157'>157</a>
|
|
217
|
+
<a name='L158'></a><a href='#L158'>158</a>
|
|
218
|
+
<a name='L159'></a><a href='#L159'>159</a>
|
|
219
|
+
<a name='L160'></a><a href='#L160'>160</a>
|
|
220
|
+
<a name='L161'></a><a href='#L161'>161</a>
|
|
221
|
+
<a name='L162'></a><a href='#L162'>162</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">42x</span>
|
|
214
222
|
<span class="cline-any cline-yes">42x</span>
|
|
215
223
|
<span class="cline-any cline-yes">42x</span>
|
|
216
224
|
<span class="cline-any cline-yes">42x</span>
|
|
@@ -363,6 +371,14 @@
|
|
|
363
371
|
<span class="cline-any cline-neutral"> </span>
|
|
364
372
|
<span class="cline-any cline-yes">29x</span>
|
|
365
373
|
<span class="cline-any cline-neutral"> </span>
|
|
374
|
+
<span class="cline-any cline-neutral"> </span>
|
|
375
|
+
<span class="cline-any cline-yes">42x</span>
|
|
376
|
+
<span class="cline-any cline-yes">1x</span>
|
|
377
|
+
<span class="cline-any cline-yes">1x</span>
|
|
378
|
+
<span class="cline-any cline-no"> </span>
|
|
379
|
+
<span class="cline-any cline-neutral"> </span>
|
|
380
|
+
<span class="cline-any cline-yes">1x</span>
|
|
381
|
+
<span class="cline-any cline-neutral"> </span>
|
|
366
382
|
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">const env = require("../environment")
|
|
367
383
|
const { OBJ_STORE_DIRECTORY } = require("../constants")
|
|
368
384
|
const { sanitizeKey } = require("@budibase/backend-core/objectStore")
|
|
@@ -516,6 +532,14 @@ exports.formatBytes = bytes => {
|
|
|
516
532
|
}
|
|
517
533
|
return `${size.toFixed(size < 10 && unit > 0 ? <span class="branch-0 cbranch-no" title="branch not covered" >1 </span>: 0)}${units[unit]}`
|
|
518
534
|
}
|
|
535
|
+
|
|
536
|
+
exports.convertBookmark = bookmark => {
|
|
537
|
+
const IS_NUMBER = /^\d+\.?\d*$/
|
|
538
|
+
<span class="missing-if-branch" title="if path not taken" >I</span>if (typeof bookmark === "string" && <span class="branch-1 cbranch-no" title="branch not covered" >bookmark.match(IS_NUMBER))</span> {
|
|
539
|
+
<span class="cstat-no" title="statement not covered" > return parseFloat(bookmark)</span>
|
|
540
|
+
}
|
|
541
|
+
return bookmark
|
|
542
|
+
}
|
|
519
543
|
</pre></td></tr></table></pre>
|
|
520
544
|
|
|
521
545
|
<div class='push'></div><!-- for sticky footer -->
|
|
@@ -523,7 +547,7 @@ exports.formatBytes = bytes => {
|
|
|
523
547
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
524
548
|
Code coverage generated by
|
|
525
549
|
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
|
526
|
-
at
|
|
550
|
+
at Thu Mar 10 2022 01:05:57 GMT+0000 (Coordinated Universal Time)
|
|
527
551
|
</div>
|
|
528
552
|
</div>
|
|
529
553
|
<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
|
|
370
|
+
at Thu Mar 10 2022 01:05:57 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
|
|
98
|
+
at Thu Mar 10 2022 01:05:57 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
|
|
98
|
+
at Thu Mar 10 2022 01:05:57 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
|
|
142
|
+
at Thu Mar 10 2022 01:05:57 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
|
|
113
|
+
at Thu Mar 10 2022 01:05:57 GMT+0000 (Coordinated Universal Time)
|
|
114
114
|
</div>
|
|
115
115
|
</div>
|
|
116
116
|
<script src="../../prettify.js"></script>
|
|
@@ -1081,7 +1081,7 @@ exports.cleanupAttachments = async (table, { row, rows, oldRow, oldTable }) =>
|
|
|
1081
1081
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
1082
1082
|
Code coverage generated by
|
|
1083
1083
|
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
|
1084
|
-
at
|
|
1084
|
+
at Thu Mar 10 2022 01:05:57 GMT+0000 (Coordinated Universal Time)
|
|
1085
1085
|
</div>
|
|
1086
1086
|
</div>
|
|
1087
1087
|
<script src="../../prettify.js"></script>
|
|
@@ -181,7 +181,7 @@ exports.processFormulas = (
|
|
|
181
181
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
182
182
|
Code coverage generated by
|
|
183
183
|
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
|
184
|
-
at
|
|
184
|
+
at Thu Mar 10 2022 01:05:57 GMT+0000 (Coordinated Universal Time)
|
|
185
185
|
</div>
|
|
186
186
|
</div>
|
|
187
187
|
<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
|
|
139
|
+
at Thu Mar 10 2022 01:05:57 GMT+0000 (Coordinated Universal Time)
|
|
140
140
|
</div>
|
|
141
141
|
</div>
|
|
142
142
|
<script src="../prettify.js"></script>
|
|
@@ -274,7 +274,7 @@ exports.CURRENTLY_SUPPORTED_LEVELS = CURRENTLY_SUPPORTED_LEVELS
|
|
|
274
274
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
275
275
|
Code coverage generated by
|
|
276
276
|
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
|
277
|
-
at
|
|
277
|
+
at Thu Mar 10 2022 01:05:57 GMT+0000 (Coordinated Universal Time)
|
|
278
278
|
</div>
|
|
279
279
|
</div>
|
|
280
280
|
<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
|
|
88
|
+
at Thu Mar 10 2022 01:05:57 GMT+0000 (Coordinated Universal Time)
|
|
89
89
|
</div>
|
|
90
90
|
</div>
|
|
91
91
|
<script src="../prettify.js"></script>
|
|
@@ -125,7 +125,7 @@
|
|
|
125
125
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
126
126
|
Code coverage generated by
|
|
127
127
|
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
|
128
|
-
at
|
|
128
|
+
at Thu Mar 10 2022 01:05:57 GMT+0000 (Coordinated Universal Time)
|
|
129
129
|
</div>
|
|
130
130
|
</div>
|
|
131
131
|
<script src="../../prettify.js"></script>
|
|
@@ -343,7 +343,7 @@ exports.update = async (property, usage, opts = { dryRun: false }) => {
|
|
|
343
343
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
344
344
|
Code coverage generated by
|
|
345
345
|
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
|
346
|
-
at
|
|
346
|
+
at Thu Mar 10 2022 01:05:57 GMT+0000 (Coordinated Universal Time)
|
|
347
347
|
</div>
|
|
348
348
|
</div>
|
|
349
349
|
<script src="../../prettify.js"></script>
|
|
@@ -289,7 +289,7 @@ exports.getUniqueRows = async appIds => {
|
|
|
289
289
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
290
290
|
Code coverage generated by
|
|
291
291
|
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
|
292
|
-
at
|
|
292
|
+
at Thu Mar 10 2022 01:05:57 GMT+0000 (Coordinated Universal Time)
|
|
293
293
|
</div>
|
|
294
294
|
</div>
|
|
295
295
|
<script src="../../prettify.js"></script>
|
|
@@ -118,7 +118,7 @@ function <span class="fstat-no" title="function not covered" >resetQuotasIfRequi
|
|
|
118
118
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
119
119
|
Code coverage generated by
|
|
120
120
|
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
|
121
|
-
at
|
|
121
|
+
at Thu Mar 10 2022 01:05:57 GMT+0000 (Coordinated Universal Time)
|
|
122
122
|
</div>
|
|
123
123
|
</div>
|
|
124
124
|
<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
|
|
139
|
+
at Thu Mar 10 2022 01:05:57 GMT+0000 (Coordinated Universal Time)
|
|
140
140
|
</div>
|
|
141
141
|
</div>
|
|
142
142
|
<script src="../prettify.js"></script>
|
|
@@ -481,7 +481,7 @@ exports.readGlobalUser = <span class="fstat-no" title="function not covered" >as
|
|
|
481
481
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
482
482
|
Code coverage generated by
|
|
483
483
|
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
|
484
|
-
at
|
|
484
|
+
at Thu Mar 10 2022 01:05:57 GMT+0000 (Coordinated Universal Time)
|
|
485
485
|
</div>
|
|
486
486
|
</div>
|
|
487
487
|
<script src="../prettify.js"></script>
|
package/coverage/lcov.info
CHANGED
|
@@ -8950,8 +8950,9 @@ FN:125,(anonymous_11)
|
|
|
8950
8950
|
FN:135,(anonymous_12)
|
|
8951
8951
|
FN:137,(anonymous_13)
|
|
8952
8952
|
FN:144,(anonymous_14)
|
|
8953
|
-
|
|
8954
|
-
|
|
8953
|
+
FN:155,(anonymous_15)
|
|
8954
|
+
FNF:16
|
|
8955
|
+
FNH:13
|
|
8955
8956
|
FNDA:4,(anonymous_0)
|
|
8956
8957
|
FNDA:4,(anonymous_1)
|
|
8957
8958
|
FNDA:1,(anonymous_2)
|
|
@@ -8967,6 +8968,7 @@ FNDA:0,(anonymous_11)
|
|
|
8967
8968
|
FNDA:0,(anonymous_12)
|
|
8968
8969
|
FNDA:0,(anonymous_13)
|
|
8969
8970
|
FNDA:29,(anonymous_14)
|
|
8971
|
+
FNDA:1,(anonymous_15)
|
|
8970
8972
|
DA:1,42
|
|
8971
8973
|
DA:2,42
|
|
8972
8974
|
DA:3,42
|
|
@@ -9037,8 +9039,13 @@ DA:148,29
|
|
|
9037
9039
|
DA:149,29
|
|
9038
9040
|
DA:150,0
|
|
9039
9041
|
DA:152,29
|
|
9040
|
-
|
|
9041
|
-
|
|
9042
|
+
DA:155,42
|
|
9043
|
+
DA:156,1
|
|
9044
|
+
DA:157,1
|
|
9045
|
+
DA:158,0
|
|
9046
|
+
DA:160,1
|
|
9047
|
+
LF:75
|
|
9048
|
+
LH:58
|
|
9042
9049
|
BRDA:16,0,0,1
|
|
9043
9050
|
BRDA:16,0,1,0
|
|
9044
9051
|
BRDA:37,1,0,2
|
|
@@ -9065,8 +9072,12 @@ BRDA:152,11,0,0
|
|
|
9065
9072
|
BRDA:152,11,1,29
|
|
9066
9073
|
BRDA:152,12,0,29
|
|
9067
9074
|
BRDA:152,12,1,26
|
|
9068
|
-
|
|
9069
|
-
|
|
9075
|
+
BRDA:157,13,0,0
|
|
9076
|
+
BRDA:157,13,1,1
|
|
9077
|
+
BRDA:157,14,0,1
|
|
9078
|
+
BRDA:157,14,1,0
|
|
9079
|
+
BRF:30
|
|
9080
|
+
BRH:16
|
|
9070
9081
|
end_of_record
|
|
9071
9082
|
TN:
|
|
9072
9083
|
SF:src/utilities/scriptRunner.js
|
|
@@ -15,6 +15,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
15
15
|
exports.destroy = exports.update = exports.read = exports.create = exports.search = void 0;
|
|
16
16
|
const row_1 = __importDefault(require("../row"));
|
|
17
17
|
const utils_1 = require("./utils");
|
|
18
|
+
const utilities_1 = require("../../../utilities");
|
|
18
19
|
// makes sure that the user doesn't need to pass in the type, tableId or _id params for
|
|
19
20
|
// the call to be correct
|
|
20
21
|
function fixRow(row, params) {
|
|
@@ -43,7 +44,7 @@ function search(ctx, next) {
|
|
|
43
44
|
sort: sort.column,
|
|
44
45
|
sortType: sort.type,
|
|
45
46
|
sortOrder: sort.order,
|
|
46
|
-
bookmark,
|
|
47
|
+
bookmark: utilities_1.convertBookmark(bookmark),
|
|
47
48
|
paginate,
|
|
48
49
|
limit,
|
|
49
50
|
query,
|
|
@@ -45,11 +45,11 @@ exports.handleRequest = handleRequest;
|
|
|
45
45
|
exports.patch = (ctx) => __awaiter(void 0, void 0, void 0, function* () {
|
|
46
46
|
const inputs = ctx.request.body;
|
|
47
47
|
const tableId = ctx.params.tableId;
|
|
48
|
-
const id =
|
|
48
|
+
const id = inputs._id;
|
|
49
49
|
// don't save the ID to db
|
|
50
50
|
delete inputs._id;
|
|
51
51
|
return handleRequest(DataSourceOperation.UPDATE, tableId, {
|
|
52
|
-
id,
|
|
52
|
+
id: breakRowIdField(id),
|
|
53
53
|
row: inputs,
|
|
54
54
|
});
|
|
55
55
|
});
|
|
@@ -75,7 +75,7 @@ exports.find = (ctx) => __awaiter(void 0, void 0, void 0, function* () {
|
|
|
75
75
|
const id = ctx.params.rowId;
|
|
76
76
|
const tableId = ctx.params.tableId;
|
|
77
77
|
const response = yield handleRequest(DataSourceOperation.READ, tableId, {
|
|
78
|
-
id,
|
|
78
|
+
id: breakRowIdField(id),
|
|
79
79
|
});
|
|
80
80
|
return response ? response[0] : response;
|
|
81
81
|
});
|
|
@@ -83,7 +83,7 @@ exports.destroy = (ctx) => __awaiter(void 0, void 0, void 0, function* () {
|
|
|
83
83
|
const tableId = ctx.params.tableId;
|
|
84
84
|
const id = ctx.request.body._id;
|
|
85
85
|
const { row } = yield handleRequest(DataSourceOperation.DELETE, tableId, {
|
|
86
|
-
id,
|
|
86
|
+
id: breakRowIdField(id),
|
|
87
87
|
});
|
|
88
88
|
return { response: { ok: true }, row };
|
|
89
89
|
});
|
|
@@ -125,14 +125,7 @@ read.push(new Endpoint_1.default("get", "/applications/:appId", applications_1.d
|
|
|
125
125
|
* content:
|
|
126
126
|
* application/json:
|
|
127
127
|
* schema:
|
|
128
|
-
*
|
|
129
|
-
* required:
|
|
130
|
-
* - data
|
|
131
|
-
* properties:
|
|
132
|
-
* data:
|
|
133
|
-
* type: array
|
|
134
|
-
* items:
|
|
135
|
-
* $ref: '#/components/schemas/application'
|
|
128
|
+
* $ref: '#/components/schemas/applicationSearch'
|
|
136
129
|
* examples:
|
|
137
130
|
* applications:
|
|
138
131
|
* $ref: '#/components/examples/applications'
|
|
@@ -61,14 +61,7 @@ write.push(new Endpoint_1.default("post", "/queries/:queryId", queries_1.default
|
|
|
61
61
|
* content:
|
|
62
62
|
* application/json:
|
|
63
63
|
* schema:
|
|
64
|
-
*
|
|
65
|
-
* required:
|
|
66
|
-
* - data
|
|
67
|
-
* properties:
|
|
68
|
-
* data:
|
|
69
|
-
* type: array
|
|
70
|
-
* items:
|
|
71
|
-
* $ref: '#/components/schemas/query'
|
|
64
|
+
* $ref: '#/components/schemas/querySearch'
|
|
72
65
|
* examples:
|
|
73
66
|
* queries:
|
|
74
67
|
* $ref: '#/components/examples/queries'
|
|
@@ -138,14 +138,7 @@ read.push(new Endpoint_1.default("get", "/tables/:tableId", tables_1.default.rea
|
|
|
138
138
|
* content:
|
|
139
139
|
* application/json:
|
|
140
140
|
* schema:
|
|
141
|
-
*
|
|
142
|
-
* required:
|
|
143
|
-
* - data
|
|
144
|
-
* properties:
|
|
145
|
-
* data:
|
|
146
|
-
* type: array
|
|
147
|
-
* items:
|
|
148
|
-
* $ref: '#/components/schemas/table'
|
|
141
|
+
* $ref: '#/components/schemas/tableSearch'
|
|
149
142
|
* examples:
|
|
150
143
|
* tables:
|
|
151
144
|
* $ref: '#/components/examples/tables'
|
|
@@ -121,14 +121,7 @@ read.push(new Endpoint_1.default("get", "/users/:userId", users_1.default.read))
|
|
|
121
121
|
* content:
|
|
122
122
|
* application/json:
|
|
123
123
|
* schema:
|
|
124
|
-
*
|
|
125
|
-
* required:
|
|
126
|
-
* - data
|
|
127
|
-
* properties:
|
|
128
|
-
* data:
|
|
129
|
-
* type: array
|
|
130
|
-
* items:
|
|
131
|
-
* $ref: '#/components/schemas/user'
|
|
124
|
+
* $ref: '#/components/schemas/userSearch'
|
|
132
125
|
* examples:
|
|
133
126
|
* users:
|
|
134
127
|
* $ref: '#/components/examples/users'
|
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.81
|
|
4
|
+
"version": "1.0.81",
|
|
5
5
|
"description": "Budibase Web Server",
|
|
6
6
|
"main": "src/index.ts",
|
|
7
7
|
"repository": {
|
|
@@ -71,9 +71,9 @@
|
|
|
71
71
|
"license": "GPL-3.0",
|
|
72
72
|
"dependencies": {
|
|
73
73
|
"@apidevtools/swagger-parser": "^10.0.3",
|
|
74
|
-
"@budibase/backend-core": "^1.0.81
|
|
75
|
-
"@budibase/client": "^1.0.81
|
|
76
|
-
"@budibase/string-templates": "^1.0.81
|
|
74
|
+
"@budibase/backend-core": "^1.0.81",
|
|
75
|
+
"@budibase/client": "^1.0.81",
|
|
76
|
+
"@budibase/string-templates": "^1.0.81",
|
|
77
77
|
"@bull-board/api": "^3.7.0",
|
|
78
78
|
"@bull-board/koa": "^3.7.0",
|
|
79
79
|
"@elastic/elasticsearch": "7.10.0",
|