@budibase/server 1.0.123-alpha.0 → 1.0.123
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.68a7f4e3.css +6 -0
- package/builder/assets/index.8d4a5b33.js +1291 -0
- package/builder/assets/{vendor.5240f480.js → vendor.8e34a169.js} +1 -1
- package/builder/index.html +3 -3
- package/coverage/clover.xml +1763 -758
- package/coverage/coverage-final.json +43 -28
- package/coverage/lcov-report/api/controllers/analytics.js.html +3 -8
- package/coverage/lcov-report/api/controllers/apikeys.js.html +4 -9
- package/coverage/lcov-report/api/controllers/application.js.html +1436 -0
- package/coverage/lcov-report/api/controllers/auth.js.html +3 -8
- package/coverage/lcov-report/api/controllers/automation.js.html +3 -8
- package/coverage/lcov-report/api/controllers/backup.js.html +3 -8
- package/coverage/lcov-report/api/controllers/cloud.js.html +3 -8
- package/coverage/lcov-report/api/controllers/component.js.html +3 -8
- package/coverage/lcov-report/api/controllers/datasource.js.html +6 -11
- package/coverage/lcov-report/api/controllers/dev.js.html +3 -8
- package/coverage/lcov-report/api/controllers/index.html +26 -16
- package/coverage/lcov-report/api/controllers/integration.js.html +3 -8
- package/coverage/lcov-report/api/controllers/layout.js.html +3 -8
- package/coverage/lcov-report/api/controllers/metadata.js.html +3 -8
- package/coverage/lcov-report/api/controllers/migrations.js.html +3 -8
- package/coverage/lcov-report/api/controllers/permission.js.html +3 -8
- package/coverage/lcov-report/api/controllers/query/index.html +26 -16
- package/coverage/lcov-report/api/controllers/query/index.js.html +713 -0
- package/coverage/lcov-report/api/controllers/query/validation.js.html +3 -8
- package/coverage/lcov-report/api/controllers/role.js.html +5 -10
- package/coverage/lcov-report/api/controllers/routing.js.html +4 -9
- package/coverage/lcov-report/api/controllers/row/external.js.html +3 -8
- package/coverage/lcov-report/api/controllers/row/index.html +35 -25
- package/coverage/lcov-report/api/controllers/row/index.js.html +524 -0
- package/coverage/lcov-report/api/controllers/row/internal.js.html +24 -32
- package/coverage/lcov-report/api/controllers/row/internalSearch.js.html +16 -21
- package/coverage/lcov-report/api/controllers/row/staticFormula.js.html +19 -24
- package/coverage/lcov-report/api/controllers/row/utils.js.html +19 -33
- package/coverage/lcov-report/api/controllers/screen.js.html +4 -9
- package/coverage/lcov-report/api/controllers/script.js.html +3 -8
- package/coverage/lcov-report/api/controllers/table/bulkFormula.js.html +50 -55
- package/coverage/lcov-report/api/controllers/table/external.js.html +3 -8
- package/coverage/lcov-report/api/controllers/table/index.html +44 -19
- package/coverage/lcov-report/api/controllers/table/index.js.html +15 -20
- package/coverage/lcov-report/api/controllers/table/internal.js.html +620 -0
- package/coverage/lcov-report/api/controllers/table/utils.js.html +1331 -0
- package/coverage/lcov-report/api/controllers/templates.js.html +3 -8
- package/coverage/lcov-report/api/controllers/user.js.html +3 -8
- package/coverage/lcov-report/api/controllers/view/exporters.js.html +3 -8
- package/coverage/lcov-report/api/controllers/view/index.html +3 -8
- package/coverage/lcov-report/api/controllers/view/index.js.html +5 -10
- package/coverage/lcov-report/api/controllers/view/utils.js.html +3 -8
- package/coverage/lcov-report/api/controllers/view/viewBuilder.js.html +3 -8
- package/coverage/lcov-report/api/controllers/webhook.js.html +5 -10
- package/coverage/lcov-report/api/index.html +13 -18
- package/coverage/lcov-report/api/index.js.html +8 -28
- package/coverage/lcov-report/api/routes/analytics.js.html +3 -8
- package/coverage/lcov-report/api/routes/apikeys.js.html +3 -8
- package/coverage/lcov-report/api/routes/application.js.html +179 -0
- package/coverage/lcov-report/api/routes/auth.js.html +3 -8
- package/coverage/lcov-report/api/routes/automation.js.html +3 -8
- package/coverage/lcov-report/api/routes/backup.js.html +3 -8
- package/coverage/lcov-report/api/routes/cloud.js.html +3 -8
- package/coverage/lcov-report/api/routes/component.js.html +3 -8
- package/coverage/lcov-report/api/routes/datasource.js.html +3 -8
- package/coverage/lcov-report/api/routes/deploy.js.html +3 -8
- package/coverage/lcov-report/api/routes/dev.js.html +4 -9
- package/coverage/lcov-report/api/routes/index.html +68 -13
- package/coverage/lcov-report/api/routes/index.js.html +266 -0
- package/coverage/lcov-report/api/routes/integration.js.html +3 -8
- package/coverage/lcov-report/api/routes/layout.js.html +3 -8
- package/coverage/lcov-report/api/routes/metadata.js.html +3 -8
- package/coverage/lcov-report/api/routes/migrations.js.html +3 -8
- package/coverage/lcov-report/api/routes/permission.js.html +3 -8
- package/coverage/lcov-report/api/routes/query.js.html +3 -8
- package/coverage/lcov-report/api/routes/role.js.html +3 -8
- package/coverage/lcov-report/api/routes/routing.js.html +3 -8
- package/coverage/lcov-report/api/routes/row.js.html +908 -0
- package/coverage/lcov-report/api/routes/screen.js.html +3 -8
- package/coverage/lcov-report/api/routes/script.js.html +3 -8
- package/coverage/lcov-report/{automations/steps/loop.js.html → api/routes/static.js.html} +80 -70
- package/coverage/lcov-report/api/routes/table.js.html +3 -8
- package/coverage/lcov-report/api/routes/templates.js.html +3 -8
- package/coverage/lcov-report/api/routes/user.js.html +3 -8
- package/coverage/lcov-report/api/routes/utils/index.html +3 -8
- package/coverage/lcov-report/api/routes/utils/validators.js.html +3 -8
- package/coverage/lcov-report/api/routes/view.js.html +3 -8
- package/coverage/lcov-report/api/routes/webhook.js.html +3 -8
- package/coverage/lcov-report/automations/actions.js.html +7 -21
- package/coverage/lcov-report/automations/automationUtils.js.html +23 -64
- package/coverage/lcov-report/automations/bullboard.js.html +3 -8
- package/coverage/lcov-report/automations/index.html +37 -27
- package/coverage/lcov-report/automations/index.js.html +3 -8
- package/coverage/lcov-report/automations/steps/bash.js.html +3 -8
- package/coverage/lcov-report/automations/steps/createRow.js.html +380 -0
- package/coverage/lcov-report/automations/steps/delay.js.html +3 -8
- package/coverage/lcov-report/automations/steps/deleteRow.js.html +347 -0
- package/coverage/lcov-report/automations/steps/discord.js.html +3 -8
- package/coverage/lcov-report/automations/steps/executeQuery.js.html +3 -8
- package/coverage/lcov-report/automations/steps/executeScript.js.html +3 -8
- package/coverage/lcov-report/automations/steps/filter.js.html +3 -8
- package/coverage/lcov-report/automations/steps/index.html +41 -31
- package/coverage/lcov-report/automations/steps/integromat.js.html +3 -8
- package/coverage/lcov-report/automations/steps/outgoingWebhook.js.html +4 -9
- package/coverage/lcov-report/automations/steps/queryRows.js.html +4 -9
- package/coverage/lcov-report/automations/steps/sendSmtpEmail.js.html +3 -8
- package/coverage/lcov-report/automations/steps/serverLog.js.html +3 -8
- package/coverage/lcov-report/automations/steps/slack.js.html +3 -8
- package/coverage/lcov-report/automations/steps/updateRow.js.html +3 -8
- package/coverage/lcov-report/automations/steps/utils.js.html +9 -14
- package/coverage/lcov-report/automations/steps/zapier.js.html +3 -8
- package/coverage/lcov-report/automations/triggerInfo/app.js.html +3 -8
- package/coverage/lcov-report/automations/triggerInfo/cron.js.html +3 -8
- package/coverage/lcov-report/automations/triggerInfo/index.html +3 -8
- package/coverage/lcov-report/automations/triggerInfo/index.js.html +3 -8
- package/coverage/lcov-report/automations/triggerInfo/rowDeleted.js.html +3 -8
- package/coverage/lcov-report/automations/triggerInfo/rowSaved.js.html +3 -8
- package/coverage/lcov-report/automations/triggerInfo/rowUpdated.js.html +3 -8
- package/coverage/lcov-report/automations/triggerInfo/webhook.js.html +3 -8
- package/coverage/lcov-report/automations/triggers.js.html +11 -16
- package/coverage/lcov-report/automations/utils.js.html +665 -0
- package/coverage/lcov-report/block-navigation.js +0 -8
- package/coverage/lcov-report/constants/index.html +3 -8
- package/coverage/lcov-report/constants/index.js.html +42 -41
- package/coverage/lcov-report/constants/layouts.js.html +3 -8
- package/coverage/lcov-report/constants/screens.js.html +3 -8
- package/coverage/lcov-report/db/inMemoryView.js.html +3 -8
- package/coverage/lcov-report/db/index.html +3 -8
- package/coverage/lcov-report/db/index.js.html +4 -9
- package/coverage/lcov-report/db/linkedRows/LinkController.js.html +23 -25
- package/coverage/lcov-report/db/linkedRows/index.html +12 -17
- package/coverage/lcov-report/db/linkedRows/index.js.html +17 -22
- package/coverage/lcov-report/db/linkedRows/linkUtils.js.html +7 -12
- package/coverage/lcov-report/db/newid.js.html +6 -11
- package/coverage/lcov-report/db/utils.js.html +79 -84
- package/coverage/lcov-report/events/AutomationEmitter.js.html +9 -14
- package/coverage/lcov-report/events/index.html +3 -8
- package/coverage/lcov-report/events/index.js.html +4 -9
- package/coverage/lcov-report/events/utils.js.html +13 -18
- package/coverage/lcov-report/index.html +132 -137
- package/coverage/lcov-report/integrations/tests/TestConfiguration.js.html +3 -8
- package/coverage/lcov-report/integrations/tests/index.html +3 -8
- package/coverage/lcov-report/middleware/appInfo.js.html +3 -8
- package/coverage/lcov-report/middleware/authorized.js.html +458 -0
- package/coverage/lcov-report/middleware/builder.js.html +3 -8
- package/coverage/lcov-report/middleware/currentapp.js.html +15 -65
- package/coverage/lcov-report/middleware/index.html +50 -25
- package/coverage/lcov-report/middleware/joi-validator.js.html +4 -9
- package/coverage/lcov-report/middleware/publicApi.js.html +3 -8
- package/coverage/lcov-report/middleware/resourceId.js.html +3 -8
- package/coverage/lcov-report/middleware/selfhost.js.html +4 -9
- package/coverage/lcov-report/middleware/usageQuota.js.html +572 -0
- package/coverage/lcov-report/middleware/utils.js.html +3 -8
- package/coverage/lcov-report/sorter.js +0 -26
- package/coverage/lcov-report/threads/automation.js.html +90 -581
- package/coverage/lcov-report/threads/index.html +40 -30
- package/coverage/lcov-report/threads/index.js.html +296 -0
- package/coverage/lcov-report/threads/query.js.html +4 -9
- package/coverage/lcov-report/threads/utils.js.html +9 -17
- package/coverage/lcov-report/utilities/bcrypt.js.html +3 -8
- package/coverage/lcov-report/utilities/budibaseDir.js.html +3 -8
- package/coverage/lcov-report/utilities/centralPath.js.html +3 -8
- package/coverage/lcov-report/utilities/csvParser.js.html +5 -10
- package/coverage/lcov-report/utilities/global.js.html +4 -9
- package/coverage/lcov-report/utilities/index.html +3 -8
- package/coverage/lcov-report/utilities/index.js.html +6 -11
- package/coverage/lcov-report/utilities/queue/inMemoryQueue.js.html +9 -32
- package/coverage/lcov-report/utilities/queue/index.html +7 -12
- package/coverage/lcov-report/utilities/routing/index.html +3 -8
- package/coverage/lcov-report/utilities/routing/index.js.html +3 -8
- package/coverage/lcov-report/utilities/rowProcessor/index.html +27 -32
- package/coverage/lcov-report/utilities/rowProcessor/index.js.html +71 -67
- package/coverage/lcov-report/utilities/rowProcessor/utils.js.html +106 -27
- package/coverage/lcov-report/utilities/scriptRunner.js.html +3 -8
- package/coverage/lcov-report/utilities/security.js.html +4 -9
- package/coverage/lcov-report/utilities/statusCodes.js.html +3 -8
- package/coverage/lcov-report/utilities/usageQuota/index.html +34 -24
- package/coverage/lcov-report/utilities/usageQuota/index.js.html +359 -0
- package/coverage/lcov-report/utilities/usageQuota/rows.js.html +39 -44
- package/coverage/lcov-report/utilities/usageQuota/usageQuoteReset.js.html +3 -8
- package/coverage/lcov-report/utilities/users.js.html +3 -8
- package/coverage/lcov-report/utilities/workerRequests.js.html +4 -9
- package/coverage/lcov.info +3061 -1290
- package/dist/api/controllers/application.js +73 -145
- package/dist/api/controllers/deploy/index.js +36 -68
- package/dist/api/controllers/public/applications.js +9 -29
- package/dist/api/controllers/public/queries.js +7 -27
- package/dist/api/controllers/public/rows.js +12 -32
- package/dist/api/controllers/public/tables.js +2 -2
- package/dist/api/controllers/public/users.js +8 -8
- package/dist/api/controllers/public/utils.js +1 -1
- package/dist/api/controllers/query/import/index.js +3 -3
- package/dist/api/controllers/query/index.js +44 -57
- package/dist/api/controllers/row/ExternalRequest.js +27 -27
- package/dist/api/controllers/row/index.js +60 -83
- package/dist/api/controllers/row/internal.js +1 -2
- package/dist/api/controllers/row/utils.js +1 -2
- package/dist/api/controllers/static/templates/BudibaseApp.svelte +0 -3
- package/dist/api/controllers/table/bulkFormula.js +1 -2
- package/dist/api/controllers/table/internal.js +55 -40
- package/dist/api/controllers/table/utils.js +229 -271
- package/dist/api/index.js +0 -5
- package/dist/api/routes/application.js +13 -39
- package/dist/api/routes/index.js +56 -61
- package/dist/api/routes/public/index.js +9 -6
- package/dist/api/routes/public/queries.js +1 -1
- package/dist/api/routes/public/rows.js +1 -1
- package/dist/api/routes/public/tables.js +3 -3
- package/dist/api/routes/public/users.js +1 -1
- package/dist/api/routes/row.js +17 -43
- package/dist/api/routes/static.js +13 -40
- package/dist/api/routes/tests/utilities/TestFunctions.js +33 -75
- package/dist/app.js +4 -8
- package/dist/automations/actions.js +0 -3
- package/dist/automations/automationUtils.js +0 -10
- package/dist/automations/steps/createRow.js +12 -12
- package/dist/automations/steps/deleteRow.js +16 -13
- package/dist/automations/tests/utilities/index.js +11 -13
- package/dist/automations/utils.js +133 -187
- package/dist/constants/index.js +7 -5
- package/dist/db/linkedRows/LinkController.js +1 -0
- package/dist/definitions/datasource.js +0 -1
- package/dist/environment.js +3 -2
- package/dist/index.js +0 -4
- package/dist/integrations/base/sql.js +2 -2
- package/dist/integrations/base/sqlTable.js +2 -2
- package/dist/integrations/googlesheets.js +1 -1
- package/dist/integrations/index.js +0 -4
- package/dist/integrations/microsoftSqlServer.js +8 -8
- package/dist/integrations/mysql.js +9 -9
- package/dist/integrations/oracle.js +7 -7
- package/dist/integrations/postgres.js +7 -7
- package/dist/integrations/queries/sql.js +2 -2
- package/dist/integrations/rest.js +1 -1
- package/dist/middleware/authorized.js +51 -51
- package/dist/middleware/currentapp.js +1 -15
- package/dist/middleware/usageQuota.js +154 -0
- package/dist/migrations/functions/appUrls.js +1 -1
- package/dist/migrations/functions/quotas1.js +2 -6
- package/dist/migrations/functions/usageQuotas/index.js +4 -0
- package/dist/migrations/functions/usageQuotas/syncApps.js +7 -4
- package/dist/migrations/functions/usageQuotas/syncRows.js +8 -5
- package/dist/migrations/index.js +1 -17
- package/dist/package.json +4 -10
- package/dist/threads/automation.js +27 -149
- package/dist/threads/index.js +10 -36
- package/dist/threads/utils.js +0 -1
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/utilities/queue/inMemoryQueue.js +1 -6
- package/dist/utilities/rowProcessor/index.js +11 -6
- package/dist/utilities/rowProcessor/utils.js +27 -1
- package/dist/utilities/usageQuota/index.js +86 -0
- package/nodemon.json +1 -1
- package/package.json +9 -15
- package/scripts/dev/manage.js +0 -2
- package/src/api/controllers/{application.ts → application.js} +51 -118
- package/src/api/controllers/deploy/{index.ts → index.js} +29 -53
- package/src/api/controllers/public/applications.ts +2 -2
- package/src/api/controllers/public/queries.ts +1 -1
- package/src/api/controllers/public/rows.ts +1 -1
- package/src/api/controllers/query/{index.ts → index.js} +48 -51
- package/src/api/controllers/row/ExternalRequest.ts +1 -1
- package/src/api/controllers/row/{index.ts → index.js} +17 -24
- package/src/api/controllers/row/internal.js +1 -2
- package/src/api/controllers/row/utils.js +1 -4
- package/src/api/controllers/static/templates/BudibaseApp.svelte +0 -3
- package/src/api/controllers/table/bulkFormula.js +1 -1
- package/src/api/controllers/table/{internal.ts → internal.js} +48 -27
- package/src/api/controllers/table/{utils.ts → utils.js} +69 -86
- package/src/api/index.js +0 -5
- package/src/api/routes/{application.ts → application.js} +14 -8
- package/src/api/routes/index.js +62 -0
- package/src/api/routes/public/index.ts +4 -1
- package/src/api/routes/{row.ts → row.js} +15 -7
- package/src/api/routes/{static.ts → static.js} +11 -11
- package/src/api/routes/tests/misc.spec.js +37 -39
- package/src/api/routes/tests/routing.spec.js +0 -1
- package/src/api/routes/tests/utilities/{TestFunctions.ts → TestFunctions.js} +33 -57
- package/src/app.ts +2 -1
- package/src/automations/actions.js +0 -3
- package/src/automations/automationUtils.js +0 -12
- package/src/automations/steps/{createRow.ts → createRow.js} +15 -9
- package/src/automations/steps/{deleteRow.ts → deleteRow.js} +16 -10
- package/src/automations/tests/automation.spec.js +1 -0
- package/src/automations/tests/{createRow.spec.ts → createRow.spec.js} +15 -4
- package/src/automations/tests/{deleteRow.spec.ts → deleteRow.spec.js} +5 -3
- package/src/automations/tests/utilities/index.js +10 -12
- package/src/automations/{utils.ts → utils.js} +28 -39
- package/src/constants/index.js +8 -6
- package/src/db/linkedRows/LinkController.js +1 -0
- package/src/definitions/datasource.ts +0 -1
- package/src/environment.js +3 -2
- package/src/index.ts +0 -3
- package/src/integrations/index.ts +0 -4
- package/src/middleware/{authorized.ts → authorized.js} +14 -20
- package/src/middleware/currentapp.js +1 -16
- package/src/middleware/tests/usageQuota.spec.js +120 -0
- package/src/middleware/usageQuota.js +164 -0
- package/src/migrations/functions/tests/quotas1.spec.js +2 -0
- package/src/migrations/functions/usageQuotas/index.ts +5 -0
- package/src/migrations/functions/usageQuotas/syncApps.ts +6 -3
- package/src/migrations/functions/usageQuotas/syncRows.ts +6 -3
- package/src/migrations/functions/usageQuotas/tests/syncApps.spec.js +41 -0
- package/src/migrations/functions/usageQuotas/tests/syncRows.spec.js +45 -0
- package/src/migrations/index.ts +1 -13
- package/src/threads/automation.js +34 -196
- package/src/threads/{index.ts → index.js} +14 -18
- package/src/threads/utils.js +0 -1
- package/src/utilities/queue/inMemoryQueue.js +1 -7
- package/src/utilities/rowProcessor/index.js +12 -9
- package/src/utilities/rowProcessor/utils.js +29 -1
- package/src/utilities/tests/usageQuota/usageQuota.spec.js +72 -0
- package/src/utilities/usageQuota/index.js +93 -0
- package/tsconfig.json +2 -2
- package/builder/assets/index.89795487.css +0 -6
- package/builder/assets/index.be9a1b80.js +0 -1299
- package/dist/automations/steps/loop.js +0 -51
- package/dist/integrations/redis.js +0 -158
- package/dist/migrations/functions/developerQuota.js +0 -49
- package/dist/migrations/functions/publishedAppsQuota.js +0 -47
- package/dist/migrations/functions/usageQuotas/syncDevelopers.js +0 -24
- package/dist/migrations/functions/usageQuotas/syncPublishedApps.js +0 -26
- package/dist/tsconfig.build.tsbuildinfo +0 -1
- package/src/api/routes/index.ts +0 -60
- package/src/automations/steps/loop.js +0 -50
- package/src/integrations/redis.ts +0 -152
- package/src/integrations/tests/redis.spec.js +0 -60
- package/src/migrations/functions/developerQuota.ts +0 -15
- package/src/migrations/functions/publishedAppsQuota.ts +0 -13
- package/src/migrations/functions/usageQuotas/syncDevelopers.ts +0 -19
- package/src/migrations/functions/usageQuotas/syncPublishedApps.ts +0 -21
- package/src/migrations/functions/usageQuotas/tests/syncApps.spec.ts +0 -34
- package/src/migrations/functions/usageQuotas/tests/syncRows.spec.ts +0 -40
- package/tsconfig.build.json +0 -10
|
@@ -23,16 +23,16 @@
|
|
|
23
23
|
<div class='clearfix'>
|
|
24
24
|
|
|
25
25
|
<div class='fl pad1y space-right2'>
|
|
26
|
-
<span class="strong">80.
|
|
26
|
+
<span class="strong">80.73% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>
|
|
28
|
+
<span class='fraction'>176/218</span>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
<div class='fl pad1y space-right2'>
|
|
33
|
-
<span class="strong">62.
|
|
33
|
+
<span class="strong">62.9% </span>
|
|
34
34
|
<span class="quiet">Branches</span>
|
|
35
|
-
<span class='fraction'>
|
|
35
|
+
<span class='fraction'>39/62</span>
|
|
36
36
|
</div>
|
|
37
37
|
|
|
38
38
|
|
|
@@ -44,9 +44,9 @@
|
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
<div class='fl pad1y space-right2'>
|
|
47
|
-
<span class="strong">80.
|
|
47
|
+
<span class="strong">80.66% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>
|
|
49
|
+
<span class='fraction'>171/212</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
|
|
@@ -54,12 +54,6 @@
|
|
|
54
54
|
<p class="quiet">
|
|
55
55
|
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
|
56
56
|
</p>
|
|
57
|
-
<template id="filterTemplate">
|
|
58
|
-
<div class="quiet">
|
|
59
|
-
Filter:
|
|
60
|
-
<input oninput="onInput()" type="search" id="fileSearch">
|
|
61
|
-
</div>
|
|
62
|
-
</template>
|
|
63
57
|
</div>
|
|
64
58
|
<div class='status-line high'></div>
|
|
65
59
|
<pre><table class="coverage">
|
|
@@ -517,8 +511,7 @@
|
|
|
517
511
|
<a name='L452'></a><a href='#L452'>452</a>
|
|
518
512
|
<a name='L453'></a><a href='#L453'>453</a>
|
|
519
513
|
<a name='L454'></a><a href='#L454'>454</a>
|
|
520
|
-
<a name='L455'></a><a href='#L455'>455</a>
|
|
521
|
-
<a name='L456'></a><a href='#L456'>456</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">41x</span>
|
|
514
|
+
<a name='L455'></a><a href='#L455'>455</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">41x</span>
|
|
522
515
|
<span class="cline-any cline-neutral"> </span>
|
|
523
516
|
<span class="cline-any cline-neutral"> </span>
|
|
524
517
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -665,35 +658,35 @@
|
|
|
665
658
|
<span class="cline-any cline-neutral"> </span>
|
|
666
659
|
<span class="cline-any cline-neutral"> </span>
|
|
667
660
|
<span class="cline-any cline-yes">41x</span>
|
|
668
|
-
<span class="cline-any cline-yes">
|
|
669
|
-
<span class="cline-any cline-yes">
|
|
670
|
-
<span class="cline-any cline-yes">
|
|
661
|
+
<span class="cline-any cline-yes">71x</span>
|
|
662
|
+
<span class="cline-any cline-yes">71x</span>
|
|
663
|
+
<span class="cline-any cline-yes">71x</span>
|
|
671
664
|
<span class="cline-any cline-neutral"> </span>
|
|
672
|
-
<span class="cline-any cline-yes">
|
|
673
|
-
<span class="cline-any cline-yes">
|
|
665
|
+
<span class="cline-any cline-yes">71x</span>
|
|
666
|
+
<span class="cline-any cline-yes">71x</span>
|
|
674
667
|
<span class="cline-any cline-neutral"> </span>
|
|
675
668
|
<span class="cline-any cline-neutral"> </span>
|
|
676
669
|
<span class="cline-any cline-neutral"> </span>
|
|
677
|
-
<span class="cline-any cline-yes">
|
|
678
|
-
<span class="cline-any cline-yes">
|
|
679
|
-
<span class="cline-any cline-yes">
|
|
670
|
+
<span class="cline-any cline-yes">71x</span>
|
|
671
|
+
<span class="cline-any cline-yes">71x</span>
|
|
672
|
+
<span class="cline-any cline-yes">71x</span>
|
|
680
673
|
<span class="cline-any cline-neutral"> </span>
|
|
681
674
|
<span class="cline-any cline-neutral"> </span>
|
|
682
675
|
<span class="cline-any cline-neutral"> </span>
|
|
683
676
|
<span class="cline-any cline-neutral"> </span>
|
|
684
|
-
<span class="cline-any cline-yes">
|
|
677
|
+
<span class="cline-any cline-yes">71x</span>
|
|
685
678
|
<span class="cline-any cline-no"> </span>
|
|
686
679
|
<span class="cline-any cline-neutral"> </span>
|
|
687
680
|
<span class="cline-any cline-neutral"> </span>
|
|
688
681
|
<span class="cline-any cline-neutral"> </span>
|
|
689
|
-
<span class="cline-any cline-yes">
|
|
682
|
+
<span class="cline-any cline-yes">71x</span>
|
|
690
683
|
<span class="cline-any cline-neutral"> </span>
|
|
691
684
|
<span class="cline-any cline-neutral"> </span>
|
|
692
685
|
<span class="cline-any cline-neutral"> </span>
|
|
693
686
|
<span class="cline-any cline-neutral"> </span>
|
|
694
687
|
<span class="cline-any cline-neutral"> </span>
|
|
695
688
|
<span class="cline-any cline-neutral"> </span>
|
|
696
|
-
<span class="cline-any cline-yes">
|
|
689
|
+
<span class="cline-any cline-yes">70x</span>
|
|
697
690
|
<span class="cline-any cline-neutral"> </span>
|
|
698
691
|
<span class="cline-any cline-neutral"> </span>
|
|
699
692
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -782,7 +775,6 @@
|
|
|
782
775
|
<span class="cline-any cline-yes">4x</span>
|
|
783
776
|
<span class="cline-any cline-yes">4x</span>
|
|
784
777
|
<span class="cline-any cline-yes">4x</span>
|
|
785
|
-
<span class="cline-any cline-yes">3x</span>
|
|
786
778
|
<span class="cline-any cline-neutral"> </span>
|
|
787
779
|
<span class="cline-any cline-yes">3x</span>
|
|
788
780
|
<span class="cline-any cline-no"> </span>
|
|
@@ -1124,7 +1116,7 @@ exports.save = async function (ctx) {
|
|
|
1124
1116
|
let inputs = ctx.request.body
|
|
1125
1117
|
inputs.tableId = ctx.params.tableId
|
|
1126
1118
|
|
|
1127
|
-
|
|
1119
|
+
if (!inputs._rev && !inputs._id) {
|
|
1128
1120
|
inputs._id = generateRowID(inputs.tableId)
|
|
1129
1121
|
}
|
|
1130
1122
|
|
|
@@ -1235,9 +1227,8 @@ exports.find = async ctx => {
|
|
|
1235
1227
|
|
|
1236
1228
|
exports.destroy = async function (ctx) {
|
|
1237
1229
|
const db = getAppDB()
|
|
1238
|
-
const { _id } = ctx.request.body
|
|
1230
|
+
const { _id, _rev } = ctx.request.body
|
|
1239
1231
|
let row = await db.get(_id)
|
|
1240
|
-
let _rev = ctx.request.body._rev || <span class="branch-1 cbranch-no" title="branch not covered" >row._rev</span>
|
|
1241
1232
|
|
|
1242
1233
|
<span class="missing-if-branch" title="if path not taken" >I</span>if (row.tableId !== ctx.params.tableId) {
|
|
1243
1234
|
<span class="cstat-no" title="statement not covered" > throw "Supplied tableId doesn't match the row's tableId"</span>
|
|
@@ -1326,7 +1317,7 @@ exports.search = async ctx => {
|
|
|
1326
1317
|
}
|
|
1327
1318
|
|
|
1328
1319
|
// Enrich search results with relationships
|
|
1329
|
-
|
|
1320
|
+
if (response.rows && response.rows.length) {
|
|
1330
1321
|
// enrich with global users if from users table
|
|
1331
1322
|
<span class="missing-if-branch" title="if path not taken" >I</span>if (tableId === InternalTables.USER_METADATA) {
|
|
1332
1323
|
<span class="cstat-no" title="statement not covered" > response.rows = await getGlobalUsersFromMetadata(response.rows)</span>
|
|
@@ -1434,9 +1425,10 @@ exports.fetchEnrichedRow = async ctx => {
|
|
|
1434
1425
|
</div><!-- /wrapper -->
|
|
1435
1426
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
1436
1427
|
Code coverage generated by
|
|
1437
|
-
<a href="https://istanbul.js.org/" target="_blank"
|
|
1438
|
-
at Tue Apr 26 2022
|
|
1428
|
+
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
|
1429
|
+
at Tue Apr 26 2022 17:11:02 GMT+0000 (Coordinated Universal Time)
|
|
1439
1430
|
</div>
|
|
1431
|
+
</div>
|
|
1440
1432
|
<script src="../../../prettify.js"></script>
|
|
1441
1433
|
<script>
|
|
1442
1434
|
window.onload = function () {
|
|
@@ -54,12 +54,6 @@
|
|
|
54
54
|
<p class="quiet">
|
|
55
55
|
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
|
56
56
|
</p>
|
|
57
|
-
<template id="filterTemplate">
|
|
58
|
-
<div class="quiet">
|
|
59
|
-
Filter:
|
|
60
|
-
<input oninput="onInput()" type="search" id="fileSearch">
|
|
61
|
-
</div>
|
|
62
|
-
</template>
|
|
63
57
|
</div>
|
|
64
58
|
<div class='status-line medium'></div>
|
|
65
59
|
<pre><table class="coverage">
|
|
@@ -892,7 +886,7 @@ class QueryBuilder {
|
|
|
892
886
|
}
|
|
893
887
|
|
|
894
888
|
setLimit(limit) {
|
|
895
|
-
|
|
889
|
+
if (limit != null) {
|
|
896
890
|
this.limit = limit
|
|
897
891
|
}
|
|
898
892
|
return this
|
|
@@ -983,7 +977,7 @@ class QueryBuilder {
|
|
|
983
977
|
value = value.toLowerCase ? value.toLowerCase() : <span class="branch-1 cbranch-no" title="branch not covered" >value</span>
|
|
984
978
|
}
|
|
985
979
|
// Escape characters
|
|
986
|
-
|
|
980
|
+
if (escape && originalType === "string") {
|
|
987
981
|
value = `${value}`.replace(/[ #+\-&|!(){}\]^"~*?:\\]/g, "\\$&")
|
|
988
982
|
}
|
|
989
983
|
// Wrap in quotes
|
|
@@ -1012,7 +1006,7 @@ class QueryBuilder {
|
|
|
1012
1006
|
}
|
|
1013
1007
|
|
|
1014
1008
|
// Construct the actual lucene search query string from JSON structure
|
|
1015
|
-
|
|
1009
|
+
if (this.query.string) {
|
|
1016
1010
|
build(this.query.string, <span class="fstat-no" title="function not covered" >(k</span>ey, value) => {
|
|
1017
1011
|
<span class="cstat-no" title="statement not covered" > if (!value) {</span>
|
|
1018
1012
|
<span class="cstat-no" title="statement not covered" > return null</span>
|
|
@@ -1024,7 +1018,7 @@ class QueryBuilder {
|
|
|
1024
1018
|
<span class="cstat-no" title="statement not covered" > return `${key}:${value}*`</span>
|
|
1025
1019
|
})
|
|
1026
1020
|
}
|
|
1027
|
-
|
|
1021
|
+
if (this.query.range) {
|
|
1028
1022
|
build(this.query.range, <span class="fstat-no" title="function not covered" >(k</span>ey, value) => {
|
|
1029
1023
|
<span class="cstat-no" title="statement not covered" > if (!value) {</span>
|
|
1030
1024
|
<span class="cstat-no" title="statement not covered" > return null</span>
|
|
@@ -1040,7 +1034,7 @@ class QueryBuilder {
|
|
|
1040
1034
|
<span class="cstat-no" title="statement not covered" > return `${key}:[${low} TO ${high}]`</span>
|
|
1041
1035
|
})
|
|
1042
1036
|
}
|
|
1043
|
-
|
|
1037
|
+
if (this.query.fuzzy) {
|
|
1044
1038
|
build(this.query.fuzzy, <span class="fstat-no" title="function not covered" >(k</span>ey, value) => {
|
|
1045
1039
|
<span class="cstat-no" title="statement not covered" > if (!value) {</span>
|
|
1046
1040
|
<span class="cstat-no" title="statement not covered" > return null</span>
|
|
@@ -1052,7 +1046,7 @@ class QueryBuilder {
|
|
|
1052
1046
|
<span class="cstat-no" title="statement not covered" > return `${key}:${value}~`</span>
|
|
1053
1047
|
})
|
|
1054
1048
|
}
|
|
1055
|
-
|
|
1049
|
+
if (this.query.equal) {
|
|
1056
1050
|
build(this.query.equal, (key, value) => {
|
|
1057
1051
|
// 0 evaluates to false, which means we would return all rows if we don't check it
|
|
1058
1052
|
<span class="missing-if-branch" title="if path not taken" >I</span>if (!value && <span class="branch-1 cbranch-no" title="branch not covered" >value !== 0)</span> {
|
|
@@ -1061,7 +1055,7 @@ class QueryBuilder {
|
|
|
1061
1055
|
return `${key}:${builder.preprocess(value, allPreProcessingOpts)}`
|
|
1062
1056
|
})
|
|
1063
1057
|
}
|
|
1064
|
-
|
|
1058
|
+
if (this.query.notEqual) {
|
|
1065
1059
|
build(this.query.notEqual, <span class="fstat-no" title="function not covered" >(k</span>ey, value) => {
|
|
1066
1060
|
<span class="cstat-no" title="statement not covered" > if (!value) {</span>
|
|
1067
1061
|
<span class="cstat-no" title="statement not covered" > return null</span>
|
|
@@ -1069,10 +1063,10 @@ class QueryBuilder {
|
|
|
1069
1063
|
<span class="cstat-no" title="statement not covered" > return `!${key}:${builder.preprocess(value, allPreProcessingOpts)}`</span>
|
|
1070
1064
|
})
|
|
1071
1065
|
}
|
|
1072
|
-
|
|
1066
|
+
if (this.query.empty) {
|
|
1073
1067
|
build(this.query.empty, <span class="fstat-no" title="function not covered" >ke</span>y => <span class="cstat-no" title="statement not covered" >`!${key}:["" TO *]`)</span>
|
|
1074
1068
|
}
|
|
1075
|
-
|
|
1069
|
+
if (this.query.notEmpty) {
|
|
1076
1070
|
build(this.query.notEmpty, <span class="fstat-no" title="function not covered" >ke</span>y => <span class="cstat-no" title="statement not covered" >`${key}:["" TO *]`)</span>
|
|
1077
1071
|
}
|
|
1078
1072
|
return query
|
|
@@ -1121,10 +1115,10 @@ const runQuery = async (url, body) => {
|
|
|
1121
1115
|
let output = {
|
|
1122
1116
|
rows: [],
|
|
1123
1117
|
}
|
|
1124
|
-
|
|
1118
|
+
if (json.rows != null && json.rows.length > 0) {
|
|
1125
1119
|
output.rows = json.rows.map(row => row.doc)
|
|
1126
1120
|
}
|
|
1127
|
-
|
|
1121
|
+
if (json.bookmark) {
|
|
1128
1122
|
output.bookmark = json.bookmark
|
|
1129
1123
|
}
|
|
1130
1124
|
return output
|
|
@@ -1168,7 +1162,7 @@ const recursiveSearch = async (query, params) => {
|
|
|
1168
1162
|
<span class="missing-if-branch" title="if path not taken" >I</span>if (!page.rows.length) {
|
|
1169
1163
|
<span class="cstat-no" title="statement not covered" > return rows</span>
|
|
1170
1164
|
}
|
|
1171
|
-
|
|
1165
|
+
if (page.rows.length < 200) {
|
|
1172
1166
|
return [...rows, ...page.rows]
|
|
1173
1167
|
}
|
|
1174
1168
|
const newParams = <span class="cstat-no" title="statement not covered" >{</span>
|
|
@@ -1241,7 +1235,7 @@ exports.paginatedSearch = <span class="fstat-no" title="function not covered" >a
|
|
|
1241
1235
|
*/
|
|
1242
1236
|
exports.fullSearch = async (query, params) => {
|
|
1243
1237
|
let limit = params.limit
|
|
1244
|
-
|
|
1238
|
+
if (limit == null || <span class="branch-1 cbranch-no" title="branch not covered" >isNaN(limit) </span>|| <span class="branch-2 cbranch-no" title="branch not covered" >limit < 0)</span> {
|
|
1245
1239
|
limit = 1000
|
|
1246
1240
|
}
|
|
1247
1241
|
params.limit = Math.min(limit, 1000)
|
|
@@ -1254,9 +1248,10 @@ exports.fullSearch = async (query, params) => {
|
|
|
1254
1248
|
</div><!-- /wrapper -->
|
|
1255
1249
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
1256
1250
|
Code coverage generated by
|
|
1257
|
-
<a href="https://istanbul.js.org/" target="_blank"
|
|
1258
|
-
at Tue Apr 26 2022
|
|
1251
|
+
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
|
1252
|
+
at Tue Apr 26 2022 17:11:02 GMT+0000 (Coordinated Universal Time)
|
|
1259
1253
|
</div>
|
|
1254
|
+
</div>
|
|
1260
1255
|
<script src="../../../prettify.js"></script>
|
|
1261
1256
|
<script>
|
|
1262
1257
|
window.onload = function () {
|
|
@@ -54,12 +54,6 @@
|
|
|
54
54
|
<p class="quiet">
|
|
55
55
|
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
|
56
56
|
</p>
|
|
57
|
-
<template id="filterTemplate">
|
|
58
|
-
<div class="quiet">
|
|
59
|
-
Filter:
|
|
60
|
-
<input oninput="onInput()" type="search" id="fileSearch">
|
|
61
|
-
</div>
|
|
62
|
-
</template>
|
|
63
57
|
</div>
|
|
64
58
|
<div class='status-line low'></div>
|
|
65
59
|
<pre><table class="coverage">
|
|
@@ -237,10 +231,10 @@
|
|
|
237
231
|
<span class="cline-any cline-neutral"> </span>
|
|
238
232
|
<span class="cline-any cline-neutral"> </span>
|
|
239
233
|
<span class="cline-any cline-yes">41x</span>
|
|
240
|
-
<span class="cline-any cline-yes">
|
|
234
|
+
<span class="cline-any cline-yes">80x</span>
|
|
241
235
|
<span class="cline-any cline-neutral"> </span>
|
|
242
|
-
<span class="cline-any cline-yes">
|
|
243
|
-
<span class="cline-any cline-yes">
|
|
236
|
+
<span class="cline-any cline-yes">80x</span>
|
|
237
|
+
<span class="cline-any cline-yes">80x</span>
|
|
244
238
|
<span class="cline-any cline-neutral"> </span>
|
|
245
239
|
<span class="cline-any cline-no"> </span>
|
|
246
240
|
<span class="cline-any cline-no"> </span>
|
|
@@ -334,14 +328,14 @@
|
|
|
334
328
|
<span class="cline-any cline-neutral"> </span>
|
|
335
329
|
<span class="cline-any cline-neutral"> </span>
|
|
336
330
|
<span class="cline-any cline-neutral"> </span>
|
|
337
|
-
<span class="cline-any cline-yes">
|
|
338
|
-
<span class="cline-any cline-yes">
|
|
331
|
+
<span class="cline-any cline-yes">75x</span>
|
|
332
|
+
<span class="cline-any cline-yes">75x</span>
|
|
339
333
|
<span class="cline-any cline-neutral"> </span>
|
|
340
|
-
<span class="cline-any cline-yes">
|
|
334
|
+
<span class="cline-any cline-yes">75x</span>
|
|
341
335
|
<span class="cline-any cline-neutral"> </span>
|
|
342
336
|
<span class="cline-any cline-neutral"> </span>
|
|
343
337
|
<span class="cline-any cline-neutral"> </span>
|
|
344
|
-
<span class="cline-any cline-yes">
|
|
338
|
+
<span class="cline-any cline-yes">75x</span>
|
|
345
339
|
<span class="cline-any cline-neutral"> </span>
|
|
346
340
|
<span class="cline-any cline-neutral"> </span>
|
|
347
341
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -349,7 +343,7 @@
|
|
|
349
343
|
<span class="cline-any cline-neutral"> </span>
|
|
350
344
|
<span class="cline-any cline-neutral"> </span>
|
|
351
345
|
<span class="cline-any cline-neutral"> </span>
|
|
352
|
-
<span class="cline-any cline-yes">
|
|
346
|
+
<span class="cline-any cline-yes">75x</span>
|
|
353
347
|
<span class="cline-any cline-no"> </span>
|
|
354
348
|
<span class="cline-any cline-no"> </span>
|
|
355
349
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -365,15 +359,15 @@
|
|
|
365
359
|
<span class="cline-any cline-neutral"> </span>
|
|
366
360
|
<span class="cline-any cline-neutral"> </span>
|
|
367
361
|
<span class="cline-any cline-neutral"> </span>
|
|
368
|
-
<span class="cline-any cline-yes">
|
|
362
|
+
<span class="cline-any cline-yes">75x</span>
|
|
369
363
|
<span class="cline-any cline-neutral"> </span>
|
|
370
|
-
<span class="cline-any cline-yes">
|
|
371
|
-
<span class="cline-any cline-yes">
|
|
364
|
+
<span class="cline-any cline-yes">75x</span>
|
|
365
|
+
<span class="cline-any cline-yes">75x</span>
|
|
372
366
|
<span class="cline-any cline-neutral"> </span>
|
|
373
|
-
<span class="cline-any cline-yes">
|
|
374
|
-
<span class="cline-any cline-yes">
|
|
367
|
+
<span class="cline-any cline-yes">75x</span>
|
|
368
|
+
<span class="cline-any cline-yes">75x</span>
|
|
375
369
|
<span class="cline-any cline-neutral"> </span>
|
|
376
|
-
<span class="cline-any cline-yes">
|
|
370
|
+
<span class="cline-any cline-yes">75x</span>
|
|
377
371
|
<span class="cline-any cline-neutral"> </span>
|
|
378
372
|
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">const { getRowParams } = require("../../../db/utils")
|
|
379
373
|
const {
|
|
@@ -395,7 +389,7 @@ const { getAppDB } = require("@budibase/backend-core/context")
|
|
|
395
389
|
exports.updateRelatedFormula = async (table, enrichedRows) => {
|
|
396
390
|
const db = getAppDB()
|
|
397
391
|
// no formula to update, we're done
|
|
398
|
-
|
|
392
|
+
if (!table.relatedFormula) {
|
|
399
393
|
return
|
|
400
394
|
}
|
|
401
395
|
let promises = <span class="cstat-no" title="statement not covered" >[]</span>
|
|
@@ -526,7 +520,7 @@ exports.finaliseRow = async (
|
|
|
526
520
|
enrichedRow._rev = response.rev
|
|
527
521
|
enrichedRow = await processFormulas(table, enrichedRow, { dynamic: false })
|
|
528
522
|
// this updates the related formulas in other rows based on the relations to this row
|
|
529
|
-
|
|
523
|
+
if (updateFormula) {
|
|
530
524
|
await exports.updateRelatedFormula(table, enrichedRow)
|
|
531
525
|
}
|
|
532
526
|
return { row: enrichedRow, table }
|
|
@@ -537,9 +531,10 @@ exports.finaliseRow = async (
|
|
|
537
531
|
</div><!-- /wrapper -->
|
|
538
532
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
539
533
|
Code coverage generated by
|
|
540
|
-
<a href="https://istanbul.js.org/" target="_blank"
|
|
541
|
-
at Tue Apr 26 2022
|
|
534
|
+
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
|
535
|
+
at Tue Apr 26 2022 17:11:02 GMT+0000 (Coordinated Universal Time)
|
|
542
536
|
</div>
|
|
537
|
+
</div>
|
|
543
538
|
<script src="../../../prettify.js"></script>
|
|
544
539
|
<script>
|
|
545
540
|
window.onload = function () {
|
|
@@ -30,9 +30,9 @@
|
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
<div class='fl pad1y space-right2'>
|
|
33
|
-
<span class="strong">
|
|
33
|
+
<span class="strong">43.33% </span>
|
|
34
34
|
<span class="quiet">Branches</span>
|
|
35
|
-
<span class='fraction'>13/
|
|
35
|
+
<span class='fraction'>13/30</span>
|
|
36
36
|
</div>
|
|
37
37
|
|
|
38
38
|
|
|
@@ -54,12 +54,6 @@
|
|
|
54
54
|
<p class="quiet">
|
|
55
55
|
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
|
56
56
|
</p>
|
|
57
|
-
<template id="filterTemplate">
|
|
58
|
-
<div class="quiet">
|
|
59
|
-
Filter:
|
|
60
|
-
<input oninput="onInput()" type="search" id="fileSearch">
|
|
61
|
-
</div>
|
|
62
|
-
</template>
|
|
63
57
|
</div>
|
|
64
58
|
<div class='status-line medium'></div>
|
|
65
59
|
<pre><table class="coverage">
|
|
@@ -152,10 +146,7 @@
|
|
|
152
146
|
<a name='L87'></a><a href='#L87'>87</a>
|
|
153
147
|
<a name='L88'></a><a href='#L88'>88</a>
|
|
154
148
|
<a name='L89'></a><a href='#L89'>89</a>
|
|
155
|
-
<a name='L90'></a><a href='#L90'>90</a>
|
|
156
|
-
<a name='L91'></a><a href='#L91'>91</a>
|
|
157
|
-
<a name='L92'></a><a href='#L92'>92</a>
|
|
158
|
-
<a name='L93'></a><a href='#L93'>93</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">41x</span>
|
|
149
|
+
<a name='L90'></a><a href='#L90'>90</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">41x</span>
|
|
159
150
|
<span class="cline-any cline-yes">41x</span>
|
|
160
151
|
<span class="cline-any cline-yes">41x</span>
|
|
161
152
|
<span class="cline-any cline-yes">41x</span>
|
|
@@ -200,32 +191,29 @@
|
|
|
200
191
|
<span class="cline-any cline-neutral"> </span>
|
|
201
192
|
<span class="cline-any cline-neutral"> </span>
|
|
202
193
|
<span class="cline-any cline-yes">41x</span>
|
|
203
|
-
<span class="cline-any cline-yes">
|
|
194
|
+
<span class="cline-any cline-yes">79x</span>
|
|
204
195
|
<span class="cline-any cline-yes">2x</span>
|
|
205
196
|
<span class="cline-any cline-yes">2x</span>
|
|
206
197
|
<span class="cline-any cline-neutral"> </span>
|
|
207
|
-
<span class="cline-any cline-yes">
|
|
208
|
-
<span class="cline-any cline-yes">
|
|
209
|
-
<span class="cline-any cline-yes">
|
|
210
|
-
<span class="cline-any cline-yes">
|
|
198
|
+
<span class="cline-any cline-yes">79x</span>
|
|
199
|
+
<span class="cline-any cline-yes">79x</span>
|
|
200
|
+
<span class="cline-any cline-yes">216x</span>
|
|
201
|
+
<span class="cline-any cline-yes">216x</span>
|
|
211
202
|
<span class="cline-any cline-neutral"> </span>
|
|
212
|
-
<span class="cline-any cline-yes">
|
|
203
|
+
<span class="cline-any cline-yes">216x</span>
|
|
213
204
|
<span class="cline-any cline-no"> </span>
|
|
214
205
|
<span class="cline-any cline-neutral"> </span>
|
|
215
206
|
<span class="cline-any cline-neutral"> </span>
|
|
216
|
-
<span class="cline-any cline-yes">
|
|
207
|
+
<span class="cline-any cline-yes">216x</span>
|
|
217
208
|
<span class="cline-any cline-no"> </span>
|
|
218
209
|
<span class="cline-any cline-neutral"> </span>
|
|
219
210
|
<span class="cline-any cline-neutral"> </span>
|
|
220
211
|
<span class="cline-any cline-neutral"> </span>
|
|
221
212
|
<span class="cline-any cline-neutral"> </span>
|
|
222
|
-
<span class="cline-any cline-yes">
|
|
213
|
+
<span class="cline-any cline-yes">216x</span>
|
|
223
214
|
<span class="cline-any cline-no"> </span>
|
|
224
215
|
<span class="cline-any cline-no"> </span>
|
|
225
216
|
<span class="cline-any cline-no"> </span>
|
|
226
|
-
<span class="cline-any cline-neutral"> </span>
|
|
227
|
-
<span class="cline-any cline-neutral"> </span>
|
|
228
|
-
<span class="cline-any cline-neutral"> </span>
|
|
229
217
|
<span class="cline-any cline-no"> </span>
|
|
230
218
|
<span class="cline-any cline-neutral"> </span>
|
|
231
219
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -233,7 +221,7 @@
|
|
|
233
221
|
<span class="cline-any cline-neutral"> </span>
|
|
234
222
|
<span class="cline-any cline-no"> </span>
|
|
235
223
|
<span class="cline-any cline-neutral"> </span>
|
|
236
|
-
<span class="cline-any cline-yes">
|
|
224
|
+
<span class="cline-any cline-yes">216x</span>
|
|
237
225
|
<span class="cline-any cline-neutral"> </span>
|
|
238
226
|
<span class="cline-any cline-no"> </span>
|
|
239
227
|
<span class="cline-any cline-no"> </span>
|
|
@@ -241,11 +229,11 @@
|
|
|
241
229
|
<span class="cline-any cline-no"> </span>
|
|
242
230
|
<span class="cline-any cline-neutral"> </span>
|
|
243
231
|
<span class="cline-any cline-neutral"> </span>
|
|
244
|
-
<span class="cline-any cline-yes">
|
|
232
|
+
<span class="cline-any cline-yes">216x</span>
|
|
245
233
|
<span class="cline-any cline-neutral"> </span>
|
|
246
|
-
<span class="cline-any cline-yes">
|
|
234
|
+
<span class="cline-any cline-yes">216x</span>
|
|
247
235
|
<span class="cline-any cline-neutral"> </span>
|
|
248
|
-
<span class="cline-any cline-yes">
|
|
236
|
+
<span class="cline-any cline-yes">79x</span>
|
|
249
237
|
<span class="cline-any cline-neutral"> </span>
|
|
250
238
|
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">const validateJs = require("validate.js")
|
|
251
239
|
const { cloneDeep } = require("lodash/fp")
|
|
@@ -314,10 +302,7 @@ exports.validate = async ({ tableId, row, table }) => {
|
|
|
314
302
|
<span class="missing-if-branch" title="if path not taken" >I</span>if (type === FieldTypes.ARRAY && <span class="branch-1 cbranch-no" title="branch not covered" >row[fieldName])</span> {
|
|
315
303
|
<span class="cstat-no" title="statement not covered" > if (row[fieldName].length) {</span>
|
|
316
304
|
<span class="cstat-no" title="statement not covered" > row[fieldName].map(<span class="fstat-no" title="function not covered" >va</span>l => {</span>
|
|
317
|
-
<span class="cstat-no" title="statement not covered" > if (</span>
|
|
318
|
-
!constraints.inclusion.includes(val) &&
|
|
319
|
-
constraints.inclusion.length !== 0
|
|
320
|
-
) {
|
|
305
|
+
<span class="cstat-no" title="statement not covered" > if (!constraints.inclusion.includes(val)) {</span>
|
|
321
306
|
<span class="cstat-no" title="statement not covered" > errors[fieldName] = "Field not in list"</span>
|
|
322
307
|
}
|
|
323
308
|
})
|
|
@@ -345,9 +330,10 @@ exports.validate = async ({ tableId, row, table }) => {
|
|
|
345
330
|
</div><!-- /wrapper -->
|
|
346
331
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
347
332
|
Code coverage generated by
|
|
348
|
-
<a href="https://istanbul.js.org/" target="_blank"
|
|
349
|
-
at Tue Apr 26 2022
|
|
333
|
+
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
|
334
|
+
at Tue Apr 26 2022 17:11:02 GMT+0000 (Coordinated Universal Time)
|
|
350
335
|
</div>
|
|
336
|
+
</div>
|
|
351
337
|
<script src="../../../prettify.js"></script>
|
|
352
338
|
<script>
|
|
353
339
|
window.onload = function () {
|
|
@@ -54,12 +54,6 @@
|
|
|
54
54
|
<p class="quiet">
|
|
55
55
|
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
|
56
56
|
</p>
|
|
57
|
-
<template id="filterTemplate">
|
|
58
|
-
<div class="quiet">
|
|
59
|
-
Filter:
|
|
60
|
-
<input oninput="onInput()" type="search" id="fileSearch">
|
|
61
|
-
</div>
|
|
62
|
-
</template>
|
|
63
57
|
</div>
|
|
64
58
|
<div class='status-line high'></div>
|
|
65
59
|
<pre><table class="coverage">
|
|
@@ -180,7 +174,7 @@ exports.save = async ctx => {
|
|
|
180
174
|
const db = getAppDB()
|
|
181
175
|
let screen = ctx.request.body
|
|
182
176
|
|
|
183
|
-
|
|
177
|
+
if (!screen._id) {
|
|
184
178
|
screen._id = generateScreenID()
|
|
185
179
|
}
|
|
186
180
|
const response = await db.put(screen)
|
|
@@ -207,9 +201,10 @@ exports.destroy = async ctx => {
|
|
|
207
201
|
</div><!-- /wrapper -->
|
|
208
202
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
209
203
|
Code coverage generated by
|
|
210
|
-
<a href="https://istanbul.js.org/" target="_blank"
|
|
211
|
-
at Tue Apr 26 2022
|
|
204
|
+
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
|
205
|
+
at Tue Apr 26 2022 17:11:02 GMT+0000 (Coordinated Universal Time)
|
|
212
206
|
</div>
|
|
207
|
+
</div>
|
|
213
208
|
<script src="../../prettify.js"></script>
|
|
214
209
|
<script>
|
|
215
210
|
window.onload = function () {
|
|
@@ -54,12 +54,6 @@
|
|
|
54
54
|
<p class="quiet">
|
|
55
55
|
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
|
56
56
|
</p>
|
|
57
|
-
<template id="filterTemplate">
|
|
58
|
-
<div class="quiet">
|
|
59
|
-
Filter:
|
|
60
|
-
<input oninput="onInput()" type="search" id="fileSearch">
|
|
61
|
-
</div>
|
|
62
|
-
</template>
|
|
63
57
|
</div>
|
|
64
58
|
<div class='status-line low'></div>
|
|
65
59
|
<pre><table class="coverage">
|
|
@@ -102,9 +96,10 @@ exports.save = <span class="fstat-no" title="function not covered" >as</span>ync
|
|
|
102
96
|
</div><!-- /wrapper -->
|
|
103
97
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
104
98
|
Code coverage generated by
|
|
105
|
-
<a href="https://istanbul.js.org/" target="_blank"
|
|
106
|
-
at Tue Apr 26 2022
|
|
99
|
+
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
|
100
|
+
at Tue Apr 26 2022 17:11:02 GMT+0000 (Coordinated Universal Time)
|
|
107
101
|
</div>
|
|
102
|
+
</div>
|
|
108
103
|
<script src="../../prettify.js"></script>
|
|
109
104
|
<script>
|
|
110
105
|
window.onload = function () {
|