@budibase/server 1.0.49-alpha.9 → 1.0.49
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/__mocks__/arangojs.ts +1 -1
- package/__mocks__/aws-sdk.ts +4 -4
- package/__mocks__/mongodb.ts +5 -4
- package/__mocks__/mssql.ts +3 -3
- package/__mocks__/node-fetch.ts +1 -2
- package/__mocks__/pg.ts +5 -3
- package/builder/assets/{index.ad5370ae.js → index.2c37968e.js} +246 -249
- package/builder/assets/index.39e01193.css +1 -0
- package/builder/assets/{vendor.d526bfe8.js → vendor.f9faf6ab.js} +12 -12
- package/builder/index.html +3 -3
- package/coverage/clover.xml +2827 -3117
- package/coverage/coverage-final.json +101 -106
- 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 +152 -257
- package/coverage/lcov-report/api/controllers/auth.js.html +13 -22
- package/coverage/lcov-report/api/controllers/automation.js.html +69 -39
- package/coverage/lcov-report/api/controllers/backup.js.html +1 -1
- package/coverage/lcov-report/api/controllers/cloud.js.html +11 -8
- package/coverage/lcov-report/api/controllers/component.js.html +16 -13
- package/coverage/lcov-report/api/controllers/datasource.js.html +51 -81
- package/coverage/lcov-report/api/controllers/dev.js.html +6 -6
- package/coverage/lcov-report/{utilities/usageQuota/usageQuoteReset.js.html → api/controllers/hosting.js.html} +48 -36
- package/coverage/lcov-report/api/controllers/index.html +76 -76
- package/coverage/lcov-report/api/controllers/integration.js.html +1 -1
- package/coverage/lcov-report/api/controllers/layout.js.html +9 -9
- package/coverage/lcov-report/api/controllers/metadata.js.html +21 -6
- package/coverage/lcov-report/api/controllers/permission.js.html +19 -19
- package/coverage/lcov-report/api/controllers/query/index.html +10 -10
- package/coverage/lcov-report/api/controllers/query/index.js.html +35 -38
- package/coverage/lcov-report/api/controllers/query/validation.js.html +6 -6
- package/coverage/lcov-report/api/controllers/role.js.html +16 -16
- package/coverage/lcov-report/api/controllers/routing.js.html +10 -7
- package/coverage/lcov-report/api/controllers/row/external.js.html +141 -48
- package/coverage/lcov-report/api/controllers/row/index.html +40 -55
- package/coverage/lcov-report/api/controllers/row/index.js.html +26 -26
- package/coverage/lcov-report/api/controllers/row/internal.js.html +226 -118
- package/coverage/lcov-report/api/controllers/row/internalSearch.js.html +34 -52
- package/coverage/lcov-report/api/controllers/row/utils.js.html +62 -47
- package/coverage/lcov-report/api/controllers/screen.js.html +21 -15
- package/coverage/lcov-report/api/controllers/script.js.html +4 -4
- package/coverage/lcov-report/api/controllers/table/external.js.html +34 -25
- package/coverage/lcov-report/api/controllers/table/index.html +43 -58
- package/coverage/lcov-report/api/controllers/table/index.js.html +82 -58
- package/coverage/lcov-report/api/controllers/table/internal.js.html +66 -81
- package/coverage/lcov-report/api/controllers/table/utils.js.html +110 -218
- package/coverage/lcov-report/api/controllers/templates.js.html +1 -1
- package/coverage/lcov-report/api/controllers/user.js.html +50 -47
- package/coverage/lcov-report/api/controllers/view/exporters.js.html +4 -4
- package/coverage/lcov-report/api/controllers/view/index.html +16 -16
- package/coverage/lcov-report/api/controllers/view/index.js.html +33 -27
- package/coverage/lcov-report/api/controllers/view/utils.js.html +20 -35
- package/coverage/lcov-report/api/controllers/view/viewBuilder.js.html +7 -7
- package/coverage/lcov-report/api/controllers/webhook.js.html +28 -34
- package/coverage/lcov-report/api/index.html +1 -1
- package/coverage/lcov-report/api/index.js.html +8 -8
- 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/{migrations.js.html → hosting.js.html} +14 -17
- package/coverage/lcov-report/api/routes/index.html +18 -18
- package/coverage/lcov-report/api/routes/index.js.html +3 -3
- 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 +2 -17
- 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 +24 -24
- package/coverage/lcov-report/automations/automationUtils.js.html +10 -7
- package/coverage/lcov-report/automations/bullboard.js.html +16 -16
- package/coverage/lcov-report/automations/index.html +18 -18
- package/coverage/lcov-report/automations/index.js.html +1 -1
- package/coverage/lcov-report/automations/steps/bash.js.html +6 -6
- package/coverage/lcov-report/automations/steps/createRow.js.html +22 -13
- package/coverage/lcov-report/automations/steps/delay.js.html +4 -4
- package/coverage/lcov-report/automations/steps/deleteRow.js.html +20 -11
- package/coverage/lcov-report/automations/steps/discord.js.html +7 -7
- package/coverage/lcov-report/automations/steps/executeQuery.js.html +6 -6
- package/coverage/lcov-report/automations/steps/executeScript.js.html +6 -6
- package/coverage/lcov-report/automations/steps/filter.js.html +7 -7
- package/coverage/lcov-report/automations/steps/index.html +13 -13
- package/coverage/lcov-report/automations/steps/integromat.js.html +5 -5
- package/coverage/lcov-report/automations/steps/outgoingWebhook.js.html +8 -8
- package/coverage/lcov-report/automations/steps/queryRows.js.html +10 -10
- package/coverage/lcov-report/automations/steps/sendSmtpEmail.js.html +5 -5
- package/coverage/lcov-report/automations/steps/serverLog.js.html +3 -3
- package/coverage/lcov-report/automations/steps/slack.js.html +5 -5
- package/coverage/lcov-report/automations/steps/updateRow.js.html +7 -7
- package/coverage/lcov-report/automations/steps/utils.js.html +3 -3
- package/coverage/lcov-report/automations/steps/zapier.js.html +5 -5
- package/coverage/lcov-report/automations/triggerInfo/app.js.html +2 -2
- package/coverage/lcov-report/automations/triggerInfo/cron.js.html +2 -2
- package/coverage/lcov-report/automations/triggerInfo/index.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/index.js.html +8 -8
- package/coverage/lcov-report/automations/triggerInfo/rowDeleted.js.html +2 -2
- package/coverage/lcov-report/automations/triggerInfo/rowSaved.js.html +2 -2
- package/coverage/lcov-report/automations/triggerInfo/rowUpdated.js.html +2 -2
- package/coverage/lcov-report/automations/triggerInfo/webhook.js.html +2 -2
- package/coverage/lcov-report/automations/triggers.js.html +55 -61
- package/coverage/lcov-report/automations/utils.js.html +42 -54
- package/coverage/lcov-report/constants/index.html +5 -5
- package/coverage/lcov-report/constants/index.js.html +26 -53
- package/coverage/lcov-report/constants/layouts.js.html +5 -5
- package/coverage/lcov-report/constants/screens.js.html +4 -4
- package/coverage/lcov-report/db/client.js.html +18 -18
- package/coverage/lcov-report/db/inMemoryView.js.html +7 -7
- package/coverage/lcov-report/db/index.html +15 -15
- package/coverage/lcov-report/db/index.js.html +3 -3
- package/coverage/lcov-report/db/linkedRows/LinkController.js.html +37 -25
- package/coverage/lcov-report/db/linkedRows/index.html +27 -27
- package/coverage/lcov-report/db/linkedRows/index.js.html +96 -51
- package/coverage/lcov-report/db/linkedRows/linkUtils.js.html +42 -42
- package/coverage/lcov-report/db/newid.js.html +4 -4
- package/coverage/lcov-report/db/utils.js.html +87 -87
- 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 +5 -5
- package/coverage/lcov-report/events/utils.js.html +3 -3
- package/coverage/lcov-report/index.html +120 -135
- 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 +65 -173
- package/coverage/lcov-report/middleware/builder.js.html +10 -10
- package/coverage/lcov-report/middleware/currentapp.js.html +83 -95
- package/coverage/lcov-report/middleware/index.html +38 -38
- package/coverage/lcov-report/middleware/joi-validator.js.html +3 -3
- 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 +53 -281
- package/coverage/lcov-report/middleware/utils.js.html +2 -2
- package/coverage/lcov-report/threads/automation.js.html +24 -30
- package/coverage/lcov-report/threads/index.html +26 -26
- package/coverage/lcov-report/threads/index.js.html +10 -10
- package/coverage/lcov-report/threads/query.js.html +24 -39
- package/coverage/lcov-report/threads/utils.js.html +14 -14
- package/coverage/lcov-report/utilities/bcrypt.js.html +1 -1
- package/coverage/lcov-report/utilities/budibaseDir.js.html +7 -7
- package/coverage/lcov-report/utilities/centralPath.js.html +4 -4
- package/coverage/lcov-report/utilities/csvParser.js.html +6 -6
- package/coverage/lcov-report/utilities/global.js.html +49 -58
- package/coverage/lcov-report/utilities/index.html +37 -37
- package/coverage/lcov-report/utilities/index.js.html +73 -43
- package/coverage/lcov-report/utilities/queue/inMemoryQueue.js.html +8 -8
- 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 +7 -7
- package/coverage/lcov-report/utilities/rowProcessor/index.html +27 -27
- package/coverage/lcov-report/utilities/rowProcessor/index.js.html +103 -97
- package/coverage/lcov-report/utilities/rowProcessor/utils.js.html +27 -75
- package/coverage/lcov-report/utilities/scriptRunner.js.html +5 -5
- package/coverage/lcov-report/utilities/security.js.html +8 -8
- package/coverage/lcov-report/utilities/statusCodes.js.html +1 -1
- package/coverage/lcov-report/utilities/users.js.html +9 -9
- package/coverage/lcov-report/utilities/workerRequests.js.html +112 -43
- package/coverage/lcov.info +4431 -5013
- package/dist/api/controllers/application.js +60 -90
- package/dist/api/controllers/auth.js +5 -8
- package/dist/api/controllers/automation.js +19 -14
- package/dist/api/controllers/cloud.js +3 -2
- package/dist/api/controllers/component.js +4 -3
- package/dist/api/controllers/datasource.js +10 -20
- package/dist/api/controllers/deploy/Deployment.js +6 -3
- package/dist/api/controllers/deploy/index.js +13 -12
- package/dist/api/controllers/dev.js +5 -5
- package/dist/api/controllers/hosting.js +30 -0
- package/dist/api/controllers/layout.js +3 -3
- package/dist/api/controllers/metadata.js +4 -4
- package/dist/api/controllers/permission.js +4 -4
- package/dist/api/controllers/query/import/index.js +6 -4
- package/dist/api/controllers/query/index.js +10 -11
- package/dist/api/controllers/role.js +5 -5
- package/dist/api/controllers/routing.js +6 -5
- package/dist/api/controllers/row/ExternalRequest.js +67 -90
- package/dist/api/controllers/row/external.js +22 -14
- package/dist/api/controllers/row/internal.js +93 -55
- package/dist/api/controllers/row/internalSearch.js +17 -23
- package/dist/api/controllers/row/utils.js +14 -13
- package/dist/api/controllers/screen.js +7 -5
- package/dist/api/controllers/static/index.js +12 -61
- package/dist/api/controllers/table/external.js +10 -7
- package/dist/api/controllers/table/index.js +13 -16
- package/dist/api/controllers/table/internal.js +16 -22
- package/dist/api/controllers/table/utils.js +35 -62
- package/dist/api/controllers/user.js +20 -18
- package/dist/api/controllers/view/index.js +10 -8
- package/dist/api/controllers/view/utils.js +4 -9
- package/dist/api/controllers/webhook.js +8 -10
- package/dist/api/routes/hosting.js +11 -0
- package/dist/api/routes/index.js +2 -2
- package/dist/api/routes/static.js +1 -2
- package/dist/api/routes/tests/utilities/TestFunctions.js +17 -37
- package/dist/app.js +5 -35
- package/dist/automations/automationUtils.js +3 -2
- package/dist/automations/steps/createRow.js +5 -3
- package/dist/automations/steps/deleteRow.js +4 -1
- package/dist/automations/steps/updateRow.js +1 -1
- package/dist/automations/triggers.js +25 -27
- package/dist/automations/utils.js +5 -10
- package/dist/constants/index.js +0 -7
- package/dist/db/linkedRows/LinkController.js +7 -3
- package/dist/db/linkedRows/index.js +27 -16
- package/dist/db/linkedRows/linkUtils.js +6 -6
- package/dist/db/views/staticViews.js +10 -9
- package/dist/definitions/datasource.js +0 -1
- package/dist/environment.js +1 -4
- package/dist/integrations/base/sql.js +14 -56
- package/dist/integrations/index.js +0 -3
- package/dist/integrations/utils.js +9 -60
- package/dist/middleware/authorized.js +30 -57
- package/dist/middleware/builder.js +2 -2
- package/dist/middleware/currentapp.js +37 -41
- package/dist/middleware/usageQuota.js +15 -82
- package/dist/package.json +5 -8
- package/dist/tests/utilities/TestConfiguration.js +50 -80
- package/dist/threads/automation.js +11 -13
- package/dist/threads/query.js +11 -15
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/utilities/fileSystem/index.js +3 -4
- package/dist/utilities/global.js +12 -15
- package/dist/utilities/index.js +17 -7
- package/dist/utilities/routing/index.js +5 -5
- package/dist/utilities/rowProcessor/index.js +17 -23
- package/dist/utilities/rowProcessor/utils.js +4 -14
- package/dist/utilities/{usageQuota/index.js → usageQuota.js} +31 -45
- package/dist/utilities/users.js +3 -3
- package/dist/utilities/workerRequests.js +24 -4
- package/nodemon.json +1 -1
- package/package.json +6 -9
- package/scripts/integrations/postgres/init.sql +6 -11
- package/scripts/likeCypress.ts +1 -1
- package/src/api/controllers/application.js +50 -85
- package/src/api/controllers/auth.js +5 -8
- package/src/api/controllers/automation.js +23 -13
- package/src/api/controllers/cloud.js +3 -2
- package/src/api/controllers/component.js +4 -3
- package/src/api/controllers/datasource.js +11 -21
- package/src/api/controllers/deploy/Deployment.js +7 -3
- package/src/api/controllers/deploy/index.js +13 -20
- package/src/api/controllers/dev.js +5 -5
- package/src/api/controllers/hosting.js +22 -0
- package/src/api/controllers/layout.js +3 -3
- package/src/api/controllers/metadata.js +9 -4
- package/src/api/controllers/permission.js +4 -4
- package/src/api/controllers/query/import/index.ts +6 -4
- package/src/api/controllers/query/import/tests/index.spec.js +1 -2
- package/src/api/controllers/query/index.js +10 -11
- package/src/api/controllers/role.js +5 -5
- package/src/api/controllers/routing.js +6 -5
- package/src/api/controllers/row/ExternalRequest.ts +43 -67
- package/src/api/controllers/row/external.js +58 -27
- package/src/api/controllers/row/internal.js +90 -54
- package/src/api/controllers/row/internalSearch.js +17 -23
- package/src/api/controllers/row/utils.js +18 -13
- package/src/api/controllers/screen.js +7 -5
- package/src/api/controllers/static/index.js +12 -65
- package/src/api/controllers/table/external.js +10 -7
- package/src/api/controllers/table/index.js +28 -20
- package/src/api/controllers/table/internal.js +19 -24
- package/src/api/controllers/table/utils.js +42 -78
- package/src/api/controllers/user.js +20 -19
- package/src/api/controllers/view/index.js +10 -8
- package/src/api/controllers/view/utils.js +4 -9
- package/src/api/controllers/webhook.js +8 -10
- package/src/api/routes/hosting.js +13 -0
- package/src/api/routes/index.js +2 -2
- package/src/api/routes/static.js +0 -5
- package/src/api/routes/tests/application.spec.js +2 -2
- package/src/api/routes/tests/auth.spec.js +2 -1
- package/src/api/routes/tests/automation.spec.js +0 -1
- package/src/api/routes/tests/hosting.spec.js +36 -0
- package/src/api/routes/tests/misc.spec.js +1 -0
- package/src/api/routes/tests/routing.spec.js +12 -21
- package/src/api/routes/tests/row.spec.js +4 -7
- package/src/api/routes/tests/utilities/TestFunctions.js +17 -39
- package/src/app.ts +5 -18
- package/src/automations/automationUtils.js +3 -2
- package/src/automations/steps/createRow.js +5 -2
- package/src/automations/steps/deleteRow.js +4 -1
- package/src/automations/steps/updateRow.js +1 -1
- package/src/automations/triggers.js +31 -33
- package/src/automations/utils.js +5 -9
- package/src/constants/index.js +0 -9
- package/src/db/linkedRows/LinkController.js +7 -3
- package/src/db/linkedRows/index.js +31 -16
- package/src/db/linkedRows/linkUtils.js +6 -6
- package/src/db/tests/linkController.spec.js +1 -0
- package/src/db/tests/linkTests.spec.js +6 -5
- package/src/db/views/staticViews.js +10 -8
- package/src/definitions/common.ts +0 -3
- package/src/definitions/datasource.ts +0 -3
- package/src/environment.js +1 -4
- package/src/integrations/base/sql.ts +21 -69
- package/src/integrations/index.ts +0 -3
- package/src/integrations/tests/sql.spec.js +0 -16
- package/src/integrations/utils.ts +12 -75
- package/src/middleware/authorized.js +30 -66
- package/src/middleware/builder.js +2 -2
- package/src/middleware/currentapp.js +46 -50
- package/src/middleware/tests/authorized.spec.js +6 -13
- package/src/middleware/tests/currentapp.spec.js +0 -6
- package/src/middleware/tests/usageQuota.spec.js +24 -18
- package/src/middleware/usageQuota.js +17 -93
- package/src/tests/utilities/TestConfiguration.js +55 -82
- package/src/threads/automation.js +15 -17
- package/src/threads/query.js +12 -17
- package/src/utilities/fileSystem/index.js +3 -4
- package/src/utilities/global.js +12 -15
- package/src/utilities/index.js +17 -7
- package/src/utilities/routing/index.js +5 -5
- package/src/utilities/rowProcessor/index.js +27 -25
- package/src/utilities/rowProcessor/utils.js +7 -23
- package/src/utilities/usageQuota.js +73 -0
- package/src/utilities/users.js +3 -3
- package/src/utilities/workerRequests.js +27 -4
- package/tsconfig.json +1 -2
- package/builder/assets/index.83c0944f.css +0 -1
- package/coverage/lcov-report/api/controllers/migrations.js.html +0 -119
- package/coverage/lcov-report/api/controllers/row/staticFormula.js.html +0 -548
- package/coverage/lcov-report/api/controllers/table/bulkFormula.js.html +0 -599
- package/coverage/lcov-report/utilities/usageQuota/index.html +0 -141
- package/coverage/lcov-report/utilities/usageQuota/index.js.html +0 -359
- package/coverage/lcov-report/utilities/usageQuota/rows.js.html +0 -305
- package/dist/api/controllers/migrations.js +0 -21
- package/dist/api/controllers/row/staticFormula.js +0 -147
- package/dist/api/controllers/table/bulkFormula.js +0 -159
- package/dist/api/routes/migrations.js +0 -9
- package/dist/integrations/googlesheets.js +0 -340
- package/dist/migrations/functions/appUrls.js +0 -46
- package/dist/migrations/functions/quotas1.js +0 -50
- package/dist/migrations/functions/usageQuotas/index.js +0 -20
- package/dist/migrations/functions/usageQuotas/syncApps.js +0 -29
- package/dist/migrations/functions/usageQuotas/syncRows.js +0 -33
- package/dist/migrations/functions/userEmailViewCasing.js +0 -24
- package/dist/migrations/index.js +0 -62
- package/dist/utilities/usageQuota/rows.js +0 -78
- package/dist/utilities/usageQuota/usageQuoteReset.js +0 -16
- package/src/api/controllers/migrations.js +0 -13
- package/src/api/controllers/row/staticFormula.js +0 -156
- package/src/api/controllers/table/bulkFormula.js +0 -173
- package/src/api/routes/migrations.js +0 -14
- package/src/api/routes/tests/static.spec.js +0 -98
- package/src/integrations/googlesheets.ts +0 -353
- package/src/migrations/functions/appUrls.ts +0 -34
- package/src/migrations/functions/quotas1.ts +0 -20
- package/src/migrations/functions/tests/appUrls.spec.js +0 -29
- package/src/migrations/functions/tests/quotas1.spec.js +0 -27
- package/src/migrations/functions/tests/userEmailViewCasing.spec.js +0 -25
- package/src/migrations/functions/usageQuotas/index.ts +0 -8
- package/src/migrations/functions/usageQuotas/syncApps.ts +0 -18
- package/src/migrations/functions/usageQuotas/syncRows.ts +0 -22
- package/src/migrations/functions/usageQuotas/tests/syncApps.spec.js +0 -37
- package/src/migrations/functions/usageQuotas/tests/syncRows.spec.js +0 -43
- package/src/migrations/functions/userEmailViewCasing.ts +0 -13
- package/src/migrations/index.ts +0 -56
- package/src/module.d.ts +0 -3
- package/src/utilities/tests/usageQuota/usageQuota.spec.js +0 -72
- package/src/utilities/usageQuota/index.js +0 -93
- package/src/utilities/usageQuota/rows.js +0 -75
- package/src/utilities/usageQuota/usageQuoteReset.js +0 -18
|
@@ -23,30 +23,30 @@
|
|
|
23
23
|
<div class='clearfix'>
|
|
24
24
|
|
|
25
25
|
<div class='fl pad1y space-right2'>
|
|
26
|
-
<span class="strong">
|
|
26
|
+
<span class="strong">83.18% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>
|
|
28
|
+
<span class='fraction'>183/220</span>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
<div class='fl pad1y space-right2'>
|
|
33
|
-
<span class="strong">
|
|
33
|
+
<span class="strong">60.93% </span>
|
|
34
34
|
<span class="quiet">Branches</span>
|
|
35
|
-
<span class='fraction'>
|
|
35
|
+
<span class='fraction'>39/64</span>
|
|
36
36
|
</div>
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
<div class='fl pad1y space-right2'>
|
|
40
|
-
<span class="strong">
|
|
40
|
+
<span class="strong">92% </span>
|
|
41
41
|
<span class="quiet">Functions</span>
|
|
42
|
-
<span class='fraction'>
|
|
42
|
+
<span class='fraction'>23/25</span>
|
|
43
43
|
</div>
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
<div class='fl pad1y space-right2'>
|
|
47
|
-
<span class="strong">
|
|
47
|
+
<span class="strong">83.17% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>
|
|
49
|
+
<span class='fraction'>178/214</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
|
|
@@ -477,65 +477,105 @@
|
|
|
477
477
|
<a name='L418'></a><a href='#L418'>418</a>
|
|
478
478
|
<a name='L419'></a><a href='#L419'>419</a>
|
|
479
479
|
<a name='L420'></a><a href='#L420'>420</a>
|
|
480
|
-
<a name='L421'></a><a href='#L421'>421</a
|
|
480
|
+
<a name='L421'></a><a href='#L421'>421</a>
|
|
481
|
+
<a name='L422'></a><a href='#L422'>422</a>
|
|
482
|
+
<a name='L423'></a><a href='#L423'>423</a>
|
|
483
|
+
<a name='L424'></a><a href='#L424'>424</a>
|
|
484
|
+
<a name='L425'></a><a href='#L425'>425</a>
|
|
485
|
+
<a name='L426'></a><a href='#L426'>426</a>
|
|
486
|
+
<a name='L427'></a><a href='#L427'>427</a>
|
|
487
|
+
<a name='L428'></a><a href='#L428'>428</a>
|
|
488
|
+
<a name='L429'></a><a href='#L429'>429</a>
|
|
489
|
+
<a name='L430'></a><a href='#L430'>430</a>
|
|
490
|
+
<a name='L431'></a><a href='#L431'>431</a>
|
|
491
|
+
<a name='L432'></a><a href='#L432'>432</a>
|
|
492
|
+
<a name='L433'></a><a href='#L433'>433</a>
|
|
493
|
+
<a name='L434'></a><a href='#L434'>434</a>
|
|
494
|
+
<a name='L435'></a><a href='#L435'>435</a>
|
|
495
|
+
<a name='L436'></a><a href='#L436'>436</a>
|
|
496
|
+
<a name='L437'></a><a href='#L437'>437</a>
|
|
497
|
+
<a name='L438'></a><a href='#L438'>438</a>
|
|
498
|
+
<a name='L439'></a><a href='#L439'>439</a>
|
|
499
|
+
<a name='L440'></a><a href='#L440'>440</a>
|
|
500
|
+
<a name='L441'></a><a href='#L441'>441</a>
|
|
501
|
+
<a name='L442'></a><a href='#L442'>442</a>
|
|
502
|
+
<a name='L443'></a><a href='#L443'>443</a>
|
|
503
|
+
<a name='L444'></a><a href='#L444'>444</a>
|
|
504
|
+
<a name='L445'></a><a href='#L445'>445</a>
|
|
505
|
+
<a name='L446'></a><a href='#L446'>446</a>
|
|
506
|
+
<a name='L447'></a><a href='#L447'>447</a>
|
|
507
|
+
<a name='L448'></a><a href='#L448'>448</a>
|
|
508
|
+
<a name='L449'></a><a href='#L449'>449</a>
|
|
509
|
+
<a name='L450'></a><a href='#L450'>450</a>
|
|
510
|
+
<a name='L451'></a><a href='#L451'>451</a>
|
|
511
|
+
<a name='L452'></a><a href='#L452'>452</a>
|
|
512
|
+
<a name='L453'></a><a href='#L453'>453</a>
|
|
513
|
+
<a name='L454'></a><a href='#L454'>454</a>
|
|
514
|
+
<a name='L455'></a><a href='#L455'>455</a>
|
|
515
|
+
<a name='L456'></a><a href='#L456'>456</a>
|
|
516
|
+
<a name='L457'></a><a href='#L457'>457</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">34x</span>
|
|
517
|
+
<span class="cline-any cline-yes">34x</span>
|
|
481
518
|
<span class="cline-any cline-neutral"> </span>
|
|
482
519
|
<span class="cline-any cline-neutral"> </span>
|
|
483
520
|
<span class="cline-any cline-neutral"> </span>
|
|
484
521
|
<span class="cline-any cline-neutral"> </span>
|
|
485
522
|
<span class="cline-any cline-neutral"> </span>
|
|
486
|
-
<span class="cline-any cline-yes">
|
|
487
|
-
<span class="cline-any cline-yes">
|
|
523
|
+
<span class="cline-any cline-yes">34x</span>
|
|
524
|
+
<span class="cline-any cline-yes">34x</span>
|
|
488
525
|
<span class="cline-any cline-neutral"> </span>
|
|
489
526
|
<span class="cline-any cline-neutral"> </span>
|
|
490
527
|
<span class="cline-any cline-neutral"> </span>
|
|
491
528
|
<span class="cline-any cline-neutral"> </span>
|
|
492
|
-
<span class="cline-any cline-yes">39x</span>
|
|
493
|
-
<span class="cline-any cline-yes">39x</span>
|
|
494
|
-
<span class="cline-any cline-yes">39x</span>
|
|
495
|
-
<span class="cline-any cline-yes">39x</span>
|
|
496
|
-
<span class="cline-any cline-yes">39x</span>
|
|
497
|
-
<span class="cline-any cline-yes">39x</span>
|
|
498
|
-
<span class="cline-any cline-yes">39x</span>
|
|
499
529
|
<span class="cline-any cline-neutral"> </span>
|
|
530
|
+
<span class="cline-any cline-yes">34x</span>
|
|
531
|
+
<span class="cline-any cline-yes">34x</span>
|
|
532
|
+
<span class="cline-any cline-yes">34x</span>
|
|
533
|
+
<span class="cline-any cline-yes">34x</span>
|
|
534
|
+
<span class="cline-any cline-yes">34x</span>
|
|
535
|
+
<span class="cline-any cline-yes">34x</span>
|
|
536
|
+
<span class="cline-any cline-yes">34x</span>
|
|
537
|
+
<span class="cline-any cline-yes">34x</span>
|
|
500
538
|
<span class="cline-any cline-neutral"> </span>
|
|
501
539
|
<span class="cline-any cline-neutral"> </span>
|
|
502
540
|
<span class="cline-any cline-neutral"> </span>
|
|
503
541
|
<span class="cline-any cline-neutral"> </span>
|
|
504
|
-
<span class="cline-any cline-yes">39x</span>
|
|
505
|
-
<span class="cline-any cline-yes">39x</span>
|
|
506
|
-
<span class="cline-any cline-yes">39x</span>
|
|
507
|
-
<span class="cline-any cline-yes">39x</span>
|
|
508
542
|
<span class="cline-any cline-neutral"> </span>
|
|
509
|
-
<span class="cline-any cline-yes">
|
|
543
|
+
<span class="cline-any cline-yes">34x</span>
|
|
544
|
+
<span class="cline-any cline-yes">34x</span>
|
|
510
545
|
<span class="cline-any cline-neutral"> </span>
|
|
546
|
+
<span class="cline-any cline-yes">34x</span>
|
|
511
547
|
<span class="cline-any cline-neutral"> </span>
|
|
512
548
|
<span class="cline-any cline-neutral"> </span>
|
|
513
549
|
<span class="cline-any cline-neutral"> </span>
|
|
514
550
|
<span class="cline-any cline-neutral"> </span>
|
|
515
551
|
<span class="cline-any cline-neutral"> </span>
|
|
516
|
-
<span class="cline-any cline-yes">6x</span>
|
|
517
|
-
<span class="cline-any cline-yes">6x</span>
|
|
518
|
-
<span class="cline-any cline-yes">6x</span>
|
|
519
552
|
<span class="cline-any cline-neutral"> </span>
|
|
520
|
-
<span class="cline-any cline-yes">
|
|
521
|
-
<span class="cline-any cline-yes">6x</span>
|
|
522
|
-
<span class="cline-any cline-yes">6x</span>
|
|
553
|
+
<span class="cline-any cline-yes">70x</span>
|
|
523
554
|
<span class="cline-any cline-neutral"> </span>
|
|
524
555
|
<span class="cline-any cline-neutral"> </span>
|
|
525
|
-
<span class="cline-any cline-
|
|
556
|
+
<span class="cline-any cline-neutral"> </span>
|
|
557
|
+
<span class="cline-any cline-yes">70x</span>
|
|
558
|
+
<span class="cline-any cline-no"> </span>
|
|
526
559
|
<span class="cline-any cline-no"> </span>
|
|
527
560
|
<span class="cline-any cline-neutral"> </span>
|
|
528
|
-
<span class="cline-any cline-
|
|
561
|
+
<span class="cline-any cline-no"> </span>
|
|
562
|
+
<span class="cline-any cline-no"> </span>
|
|
529
563
|
<span class="cline-any cline-no"> </span>
|
|
530
564
|
<span class="cline-any cline-neutral"> </span>
|
|
531
565
|
<span class="cline-any cline-neutral"> </span>
|
|
532
|
-
<span class="cline-any cline-
|
|
566
|
+
<span class="cline-any cline-no"> </span>
|
|
533
567
|
<span class="cline-any cline-no"> </span>
|
|
534
568
|
<span class="cline-any cline-neutral"> </span>
|
|
535
|
-
<span class="cline-any cline-yes">5x</span>
|
|
536
569
|
<span class="cline-any cline-no"> </span>
|
|
537
570
|
<span class="cline-any cline-neutral"> </span>
|
|
538
|
-
<span class="cline-any cline-
|
|
571
|
+
<span class="cline-any cline-neutral"> </span>
|
|
572
|
+
<span class="cline-any cline-neutral"> </span>
|
|
573
|
+
<span class="cline-any cline-yes">70x</span>
|
|
574
|
+
<span class="cline-any cline-yes">70x</span>
|
|
575
|
+
<span class="cline-any cline-neutral"> </span>
|
|
576
|
+
<span class="cline-any cline-yes">70x</span>
|
|
577
|
+
<span class="cline-any cline-yes">70x</span>
|
|
578
|
+
<span class="cline-any cline-neutral"> </span>
|
|
539
579
|
<span class="cline-any cline-neutral"> </span>
|
|
540
580
|
<span class="cline-any cline-neutral"> </span>
|
|
541
581
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -554,7 +594,34 @@
|
|
|
554
594
|
<span class="cline-any cline-yes">5x</span>
|
|
555
595
|
<span class="cline-any cline-neutral"> </span>
|
|
556
596
|
<span class="cline-any cline-neutral"> </span>
|
|
557
|
-
<span class="cline-any cline-
|
|
597
|
+
<span class="cline-any cline-neutral"> </span>
|
|
598
|
+
<span class="cline-any cline-yes">6x</span>
|
|
599
|
+
<span class="cline-any cline-yes">6x</span>
|
|
600
|
+
<span class="cline-any cline-yes">6x</span>
|
|
601
|
+
<span class="cline-any cline-neutral"> </span>
|
|
602
|
+
<span class="cline-any cline-yes">6x</span>
|
|
603
|
+
<span class="cline-any cline-yes">6x</span>
|
|
604
|
+
<span class="cline-any cline-yes">6x</span>
|
|
605
|
+
<span class="cline-any cline-neutral"> </span>
|
|
606
|
+
<span class="cline-any cline-neutral"> </span>
|
|
607
|
+
<span class="cline-any cline-yes">1x</span>
|
|
608
|
+
<span class="cline-any cline-no"> </span>
|
|
609
|
+
<span class="cline-any cline-neutral"> </span>
|
|
610
|
+
<span class="cline-any cline-yes">1x</span>
|
|
611
|
+
<span class="cline-any cline-no"> </span>
|
|
612
|
+
<span class="cline-any cline-neutral"> </span>
|
|
613
|
+
<span class="cline-any cline-neutral"> </span>
|
|
614
|
+
<span class="cline-any cline-yes">5x</span>
|
|
615
|
+
<span class="cline-any cline-no"> </span>
|
|
616
|
+
<span class="cline-any cline-neutral"> </span>
|
|
617
|
+
<span class="cline-any cline-yes">5x</span>
|
|
618
|
+
<span class="cline-any cline-no"> </span>
|
|
619
|
+
<span class="cline-any cline-neutral"> </span>
|
|
620
|
+
<span class="cline-any cline-yes">5x</span>
|
|
621
|
+
<span class="cline-any cline-neutral"> </span>
|
|
622
|
+
<span class="cline-any cline-neutral"> </span>
|
|
623
|
+
<span class="cline-any cline-yes">34x</span>
|
|
624
|
+
<span class="cline-any cline-yes">5x</span>
|
|
558
625
|
<span class="cline-any cline-yes">5x</span>
|
|
559
626
|
<span class="cline-any cline-yes">5x</span>
|
|
560
627
|
<span class="cline-any cline-yes">5x</span>
|
|
@@ -600,6 +667,7 @@
|
|
|
600
667
|
<span class="cline-any cline-neutral"> </span>
|
|
601
668
|
<span class="cline-any cline-neutral"> </span>
|
|
602
669
|
<span class="cline-any cline-neutral"> </span>
|
|
670
|
+
<span class="cline-any cline-neutral"> </span>
|
|
603
671
|
<span class="cline-any cline-yes">4x</span>
|
|
604
672
|
<span class="cline-any cline-neutral"> </span>
|
|
605
673
|
<span class="cline-any cline-yes">4x</span>
|
|
@@ -612,45 +680,42 @@
|
|
|
612
680
|
<span class="cline-any cline-yes">4x</span>
|
|
613
681
|
<span class="cline-any cline-neutral"> </span>
|
|
614
682
|
<span class="cline-any cline-neutral"> </span>
|
|
683
|
+
<span class="cline-any cline-yes">34x</span>
|
|
684
|
+
<span class="cline-any cline-yes">67x</span>
|
|
685
|
+
<span class="cline-any cline-yes">67x</span>
|
|
686
|
+
<span class="cline-any cline-yes">67x</span>
|
|
687
|
+
<span class="cline-any cline-yes">67x</span>
|
|
615
688
|
<span class="cline-any cline-neutral"> </span>
|
|
689
|
+
<span class="cline-any cline-yes">67x</span>
|
|
690
|
+
<span class="cline-any cline-yes">67x</span>
|
|
616
691
|
<span class="cline-any cline-neutral"> </span>
|
|
617
692
|
<span class="cline-any cline-neutral"> </span>
|
|
618
|
-
<span class="cline-any cline-yes">39x</span>
|
|
619
|
-
<span class="cline-any cline-yes">70x</span>
|
|
620
|
-
<span class="cline-any cline-yes">70x</span>
|
|
621
|
-
<span class="cline-any cline-yes">70x</span>
|
|
622
693
|
<span class="cline-any cline-neutral"> </span>
|
|
623
|
-
<span class="cline-any cline-yes">
|
|
624
|
-
<span class="cline-any cline-yes">
|
|
694
|
+
<span class="cline-any cline-yes">67x</span>
|
|
695
|
+
<span class="cline-any cline-yes">67x</span>
|
|
696
|
+
<span class="cline-any cline-yes">67x</span>
|
|
625
697
|
<span class="cline-any cline-neutral"> </span>
|
|
626
698
|
<span class="cline-any cline-neutral"> </span>
|
|
627
699
|
<span class="cline-any cline-neutral"> </span>
|
|
628
|
-
<span class="cline-any cline-yes">70x</span>
|
|
629
|
-
<span class="cline-any cline-yes">70x</span>
|
|
630
|
-
<span class="cline-any cline-yes">70x</span>
|
|
631
700
|
<span class="cline-any cline-neutral"> </span>
|
|
632
|
-
<span class="cline-any cline-
|
|
633
|
-
<span class="cline-any cline-neutral"> </span>
|
|
634
|
-
<span class="cline-any cline-neutral"> </span>
|
|
635
|
-
<span class="cline-any cline-yes">70x</span>
|
|
701
|
+
<span class="cline-any cline-yes">67x</span>
|
|
636
702
|
<span class="cline-any cline-no"> </span>
|
|
637
703
|
<span class="cline-any cline-neutral"> </span>
|
|
638
704
|
<span class="cline-any cline-neutral"> </span>
|
|
639
705
|
<span class="cline-any cline-neutral"> </span>
|
|
640
|
-
<span class="cline-any cline-yes">
|
|
641
|
-
<span class="cline-any cline-neutral"> </span>
|
|
706
|
+
<span class="cline-any cline-yes">67x</span>
|
|
642
707
|
<span class="cline-any cline-neutral"> </span>
|
|
643
708
|
<span class="cline-any cline-neutral"> </span>
|
|
644
709
|
<span class="cline-any cline-neutral"> </span>
|
|
645
710
|
<span class="cline-any cline-neutral"> </span>
|
|
646
711
|
<span class="cline-any cline-neutral"> </span>
|
|
647
|
-
<span class="cline-any cline-yes">69x</span>
|
|
648
712
|
<span class="cline-any cline-neutral"> </span>
|
|
649
713
|
<span class="cline-any cline-neutral"> </span>
|
|
714
|
+
<span class="cline-any cline-yes">66x</span>
|
|
650
715
|
<span class="cline-any cline-neutral"> </span>
|
|
651
716
|
<span class="cline-any cline-neutral"> </span>
|
|
652
|
-
<span class="cline-any cline-
|
|
653
|
-
<span class="cline-any cline-yes">
|
|
717
|
+
<span class="cline-any cline-yes">34x</span>
|
|
718
|
+
<span class="cline-any cline-yes">7x</span>
|
|
654
719
|
<span class="cline-any cline-yes">7x</span>
|
|
655
720
|
<span class="cline-any cline-neutral"> </span>
|
|
656
721
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -712,7 +777,8 @@
|
|
|
712
777
|
<span class="cline-any cline-yes">5x</span>
|
|
713
778
|
<span class="cline-any cline-neutral"> </span>
|
|
714
779
|
<span class="cline-any cline-neutral"> </span>
|
|
715
|
-
<span class="cline-any cline-yes">
|
|
780
|
+
<span class="cline-any cline-yes">34x</span>
|
|
781
|
+
<span class="cline-any cline-yes">5x</span>
|
|
716
782
|
<span class="cline-any cline-yes">5x</span>
|
|
717
783
|
<span class="cline-any cline-neutral"> </span>
|
|
718
784
|
<span class="cline-any cline-yes">5x</span>
|
|
@@ -721,7 +787,8 @@
|
|
|
721
787
|
<span class="cline-any cline-yes">5x</span>
|
|
722
788
|
<span class="cline-any cline-neutral"> </span>
|
|
723
789
|
<span class="cline-any cline-neutral"> </span>
|
|
724
|
-
<span class="cline-any cline-yes">
|
|
790
|
+
<span class="cline-any cline-yes">34x</span>
|
|
791
|
+
<span class="cline-any cline-yes">18x</span>
|
|
725
792
|
<span class="cline-any cline-yes">18x</span>
|
|
726
793
|
<span class="cline-any cline-yes">18x</span>
|
|
727
794
|
<span class="cline-any cline-yes">18x</span>
|
|
@@ -729,7 +796,8 @@
|
|
|
729
796
|
<span class="cline-any cline-yes">15x</span>
|
|
730
797
|
<span class="cline-any cline-neutral"> </span>
|
|
731
798
|
<span class="cline-any cline-neutral"> </span>
|
|
732
|
-
<span class="cline-any cline-yes">
|
|
799
|
+
<span class="cline-any cline-yes">34x</span>
|
|
800
|
+
<span class="cline-any cline-yes">3x</span>
|
|
733
801
|
<span class="cline-any cline-yes">3x</span>
|
|
734
802
|
<span class="cline-any cline-yes">3x</span>
|
|
735
803
|
<span class="cline-any cline-yes">3x</span>
|
|
@@ -747,7 +815,6 @@
|
|
|
747
815
|
<span class="cline-any cline-neutral"> </span>
|
|
748
816
|
<span class="cline-any cline-neutral"> </span>
|
|
749
817
|
<span class="cline-any cline-neutral"> </span>
|
|
750
|
-
<span class="cline-any cline-yes">2x</span>
|
|
751
818
|
<span class="cline-any cline-neutral"> </span>
|
|
752
819
|
<span class="cline-any cline-yes">2x</span>
|
|
753
820
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -764,7 +831,8 @@
|
|
|
764
831
|
<span class="cline-any cline-yes">2x</span>
|
|
765
832
|
<span class="cline-any cline-neutral"> </span>
|
|
766
833
|
<span class="cline-any cline-neutral"> </span>
|
|
767
|
-
<span class="cline-any cline-yes">
|
|
834
|
+
<span class="cline-any cline-yes">34x</span>
|
|
835
|
+
<span class="cline-any cline-yes">2x</span>
|
|
768
836
|
<span class="cline-any cline-yes">2x</span>
|
|
769
837
|
<span class="cline-any cline-yes">2x</span>
|
|
770
838
|
<span class="cline-any cline-yes">2x</span>
|
|
@@ -782,6 +850,7 @@
|
|
|
782
850
|
<span class="cline-any cline-neutral"> </span>
|
|
783
851
|
<span class="cline-any cline-neutral"> </span>
|
|
784
852
|
<span class="cline-any cline-neutral"> </span>
|
|
853
|
+
<span class="cline-any cline-neutral"> </span>
|
|
785
854
|
<span class="cline-any cline-yes">2x</span>
|
|
786
855
|
<span class="cline-any cline-no"> </span>
|
|
787
856
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -798,10 +867,9 @@
|
|
|
798
867
|
<span class="cline-any cline-yes">2x</span>
|
|
799
868
|
<span class="cline-any cline-yes">2x</span>
|
|
800
869
|
<span class="cline-any cline-yes">2x</span>
|
|
801
|
-
<span class="cline-any cline-yes">2x</span>
|
|
802
870
|
<span class="cline-any cline-neutral"> </span>
|
|
803
871
|
<span class="cline-any cline-neutral"> </span>
|
|
804
|
-
<span class="cline-any cline-yes">
|
|
872
|
+
<span class="cline-any cline-yes">34x</span>
|
|
805
873
|
<span class="cline-any cline-neutral"> </span>
|
|
806
874
|
<span class="cline-any cline-yes">1x</span>
|
|
807
875
|
<span class="cline-any cline-no"> </span>
|
|
@@ -812,6 +880,7 @@
|
|
|
812
880
|
<span class="cline-any cline-yes">1x</span>
|
|
813
881
|
<span class="cline-any cline-yes">1x</span>
|
|
814
882
|
<span class="cline-any cline-yes">1x</span>
|
|
883
|
+
<span class="cline-any cline-yes">1x</span>
|
|
815
884
|
<span class="cline-any cline-neutral"> </span>
|
|
816
885
|
<span class="cline-any cline-neutral"> </span>
|
|
817
886
|
<span class="cline-any cline-yes">1x</span>
|
|
@@ -833,14 +902,16 @@
|
|
|
833
902
|
<span class="cline-any cline-yes">1x</span>
|
|
834
903
|
<span class="cline-any cline-neutral"> </span>
|
|
835
904
|
<span class="cline-any cline-neutral"> </span>
|
|
836
|
-
<span class="cline-any cline-yes">
|
|
905
|
+
<span class="cline-any cline-yes">34x</span>
|
|
837
906
|
<span class="cline-any cline-yes">2x</span>
|
|
838
907
|
<span class="cline-any cline-neutral"> </span>
|
|
839
908
|
<span class="cline-any cline-neutral"> </span>
|
|
840
909
|
<span class="cline-any cline-neutral"> </span>
|
|
841
910
|
<span class="cline-any cline-neutral"> </span>
|
|
842
911
|
<span class="cline-any cline-neutral"> </span>
|
|
843
|
-
<span class="cline-any cline-
|
|
912
|
+
<span class="cline-any cline-neutral"> </span>
|
|
913
|
+
<span class="cline-any cline-yes">34x</span>
|
|
914
|
+
<span class="cline-any cline-yes">1x</span>
|
|
844
915
|
<span class="cline-any cline-yes">1x</span>
|
|
845
916
|
<span class="cline-any cline-yes">1x</span>
|
|
846
917
|
<span class="cline-any cline-yes">1x</span>
|
|
@@ -855,6 +926,7 @@
|
|
|
855
926
|
<span class="cline-any cline-neutral"> </span>
|
|
856
927
|
<span class="cline-any cline-neutral"> </span>
|
|
857
928
|
<span class="cline-any cline-neutral"> </span>
|
|
929
|
+
<span class="cline-any cline-neutral"> </span>
|
|
858
930
|
<span class="cline-any cline-yes">1x</span>
|
|
859
931
|
<span class="cline-any cline-neutral"> </span>
|
|
860
932
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -897,10 +969,11 @@
|
|
|
897
969
|
<span class="cline-any cline-neutral"> </span>
|
|
898
970
|
<span class="cline-any cline-yes">1x</span>
|
|
899
971
|
<span class="cline-any cline-neutral"> </span>
|
|
900
|
-
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">const
|
|
972
|
+
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">const CouchDB = require("../../../db")
|
|
973
|
+
const linkRows = require("../../../db/linkedRows")
|
|
901
974
|
const {
|
|
902
|
-
generateRowID,
|
|
903
975
|
getRowParams,
|
|
976
|
+
generateRowID,
|
|
904
977
|
DocumentTypes,
|
|
905
978
|
InternalTables,
|
|
906
979
|
} = require("../../../db/utils")
|
|
@@ -908,9 +981,11 @@ const userController = require("../user")
|
|
|
908
981
|
const {
|
|
909
982
|
inputProcessing,
|
|
910
983
|
outputProcessing,
|
|
984
|
+
processAutoColumn,
|
|
911
985
|
cleanupAttachments,
|
|
912
986
|
} = require("../../../utilities/rowProcessor")
|
|
913
987
|
const { FieldTypes } = require("../../../constants")
|
|
988
|
+
const { isEqual } = require("lodash")
|
|
914
989
|
const { validate, findRow } = require("./utils")
|
|
915
990
|
const { fullSearch, paginatedSearch } = require("./internalSearch")
|
|
916
991
|
const { getGlobalUsersFromMetadata } = require("../../../utilities/global")
|
|
@@ -923,8 +998,6 @@ const {
|
|
|
923
998
|
getFromMemoryDoc,
|
|
924
999
|
} = require("../view/utils")
|
|
925
1000
|
const { cloneDeep } = require("lodash/fp")
|
|
926
|
-
const { getAppDB } = require("@budibase/backend-core/context")
|
|
927
|
-
const { finaliseRow, updateRelatedFormula } = require("./staticFormula")
|
|
928
1001
|
|
|
929
1002
|
const CALCULATION_TYPES = {
|
|
930
1003
|
SUM: "sum",
|
|
@@ -932,6 +1005,51 @@ const CALCULATION_TYPES = {
|
|
|
932
1005
|
STATS: "stats",
|
|
933
1006
|
}
|
|
934
1007
|
|
|
1008
|
+
async function storeResponse(ctx, db, row, oldTable, table) {
|
|
1009
|
+
row.type = "row"
|
|
1010
|
+
// don't worry about rev, tables handle rev/lastID updates
|
|
1011
|
+
// if another row has been written since processing this will
|
|
1012
|
+
// handle the auto ID clash
|
|
1013
|
+
<span class="missing-if-branch" title="if path not taken" >I</span>if (!isEqual(oldTable, table)) {
|
|
1014
|
+
<span class="cstat-no" title="statement not covered" > try {</span>
|
|
1015
|
+
<span class="cstat-no" title="statement not covered" > await db.put(table)</span>
|
|
1016
|
+
} catch (err) {
|
|
1017
|
+
<span class="cstat-no" title="statement not covered" > if (err.status === 409) {</span>
|
|
1018
|
+
const updatedTable = <span class="cstat-no" title="statement not covered" >await db.get(table._id)</span>
|
|
1019
|
+
let response = <span class="cstat-no" title="statement not covered" >processAutoColumn(null, updatedTable, row, {</span>
|
|
1020
|
+
reprocessing: true,
|
|
1021
|
+
})
|
|
1022
|
+
<span class="cstat-no" title="statement not covered" > await db.put(response.table)</span>
|
|
1023
|
+
<span class="cstat-no" title="statement not covered" > row = response.row</span>
|
|
1024
|
+
} else {
|
|
1025
|
+
<span class="cstat-no" title="statement not covered" > throw err</span>
|
|
1026
|
+
}
|
|
1027
|
+
}
|
|
1028
|
+
}
|
|
1029
|
+
const response = await db.put(row)
|
|
1030
|
+
row._rev = response.rev
|
|
1031
|
+
// process the row before return, to include relationships
|
|
1032
|
+
row = await outputProcessing(ctx, table, row, { squash: false })
|
|
1033
|
+
return { row, table }
|
|
1034
|
+
}
|
|
1035
|
+
|
|
1036
|
+
// doesn't do the outputProcessing
|
|
1037
|
+
async function getRawTableData(ctx, db, tableId) {
|
|
1038
|
+
let rows
|
|
1039
|
+
<span class="missing-if-branch" title="if path not taken" >I</span>if (tableId === InternalTables.USER_METADATA) {
|
|
1040
|
+
<span class="cstat-no" title="statement not covered" > await userController.fetchMetadata(ctx)</span>
|
|
1041
|
+
<span class="cstat-no" title="statement not covered" > rows = ctx.body</span>
|
|
1042
|
+
} else {
|
|
1043
|
+
const response = await db.allDocs(
|
|
1044
|
+
getRowParams(tableId, null, {
|
|
1045
|
+
include_docs: true,
|
|
1046
|
+
})
|
|
1047
|
+
)
|
|
1048
|
+
rows = response.rows.map(row => row.doc)
|
|
1049
|
+
}
|
|
1050
|
+
return rows
|
|
1051
|
+
}
|
|
1052
|
+
|
|
935
1053
|
async function getView(db, viewName) {
|
|
936
1054
|
let mainGetter = env.SELF_HOSTED ? getFromDesignDoc : <span class="branch-1 cbranch-no" title="branch not covered" >getFromMemoryDoc</span>
|
|
937
1055
|
let secondaryGetter = env.SELF_HOSTED ? getFromMemoryDoc : <span class="branch-1 cbranch-no" title="branch not covered" >getFromDesignDoc</span>
|
|
@@ -958,24 +1076,9 @@ async function getView(db, viewName) {
|
|
|
958
1076
|
return viewInfo
|
|
959
1077
|
}
|
|
960
1078
|
|
|
961
|
-
async function getRawTableData(ctx, db, tableId) {
|
|
962
|
-
let rows
|
|
963
|
-
<span class="missing-if-branch" title="if path not taken" >I</span>if (tableId === InternalTables.USER_METADATA) {
|
|
964
|
-
<span class="cstat-no" title="statement not covered" > await userController.fetchMetadata(ctx)</span>
|
|
965
|
-
<span class="cstat-no" title="statement not covered" > rows = ctx.body</span>
|
|
966
|
-
} else {
|
|
967
|
-
const response = await db.allDocs(
|
|
968
|
-
getRowParams(tableId, null, {
|
|
969
|
-
include_docs: true,
|
|
970
|
-
})
|
|
971
|
-
)
|
|
972
|
-
rows = response.rows.map(row => row.doc)
|
|
973
|
-
}
|
|
974
|
-
return rows
|
|
975
|
-
}
|
|
976
|
-
|
|
977
1079
|
exports.patch = async ctx => {
|
|
978
|
-
const
|
|
1080
|
+
const appId = ctx.appId
|
|
1081
|
+
const db = new CouchDB(appId)
|
|
979
1082
|
const inputs = ctx.request.body
|
|
980
1083
|
const tableId = inputs.tableId
|
|
981
1084
|
const isUserTable = tableId === InternalTables.USER_METADATA
|
|
@@ -1014,13 +1117,14 @@ exports.patch = async ctx => {
|
|
|
1014
1117
|
|
|
1015
1118
|
// returned row is cleaned and prepared for writing to DB
|
|
1016
1119
|
row = await linkRows.updateLinks({
|
|
1120
|
+
appId,
|
|
1017
1121
|
eventType: linkRows.EventType.ROW_UPDATE,
|
|
1018
1122
|
row,
|
|
1019
1123
|
tableId: row.tableId,
|
|
1020
1124
|
table,
|
|
1021
1125
|
})
|
|
1022
1126
|
// check if any attachments removed
|
|
1023
|
-
await cleanupAttachments(table, { oldRow, row })
|
|
1127
|
+
await cleanupAttachments(appId, table, { oldRow, row })
|
|
1024
1128
|
|
|
1025
1129
|
<span class="missing-if-branch" title="if path not taken" >I</span>if (isUserTable) {
|
|
1026
1130
|
// the row has been updated, need to put it into the ctx
|
|
@@ -1029,14 +1133,12 @@ exports.patch = async ctx => {
|
|
|
1029
1133
|
<span class="cstat-no" title="statement not covered" > return { row: ctx.body, table }</span>
|
|
1030
1134
|
}
|
|
1031
1135
|
|
|
1032
|
-
return
|
|
1033
|
-
oldTable: dbTable,
|
|
1034
|
-
updateFormula: true,
|
|
1035
|
-
})
|
|
1136
|
+
return storeResponse(ctx, db, row, dbTable, table)
|
|
1036
1137
|
}
|
|
1037
1138
|
|
|
1038
1139
|
exports.save = async function (ctx) {
|
|
1039
|
-
const
|
|
1140
|
+
const appId = ctx.appId
|
|
1141
|
+
const db = new CouchDB(appId)
|
|
1040
1142
|
let inputs = ctx.request.body
|
|
1041
1143
|
inputs.tableId = ctx.params.tableId
|
|
1042
1144
|
|
|
@@ -1058,19 +1160,18 @@ exports.save = async function (ctx) {
|
|
|
1058
1160
|
|
|
1059
1161
|
// make sure link rows are up to date
|
|
1060
1162
|
row = await linkRows.updateLinks({
|
|
1163
|
+
appId,
|
|
1061
1164
|
eventType: linkRows.EventType.ROW_SAVE,
|
|
1062
1165
|
row,
|
|
1063
1166
|
tableId: row.tableId,
|
|
1064
1167
|
table,
|
|
1065
1168
|
})
|
|
1066
1169
|
|
|
1067
|
-
return
|
|
1068
|
-
oldTable: dbTable,
|
|
1069
|
-
updateFormula: true,
|
|
1070
|
-
})
|
|
1170
|
+
return storeResponse(ctx, db, row, dbTable, table)
|
|
1071
1171
|
}
|
|
1072
1172
|
|
|
1073
1173
|
exports.fetchView = async ctx => {
|
|
1174
|
+
const appId = ctx.appId
|
|
1074
1175
|
const viewName = ctx.params.viewName
|
|
1075
1176
|
|
|
1076
1177
|
// if this is a table view being looked for just transfer to that
|
|
@@ -1079,7 +1180,7 @@ exports.fetchView = async ctx => {
|
|
|
1079
1180
|
return exports.fetch(ctx)
|
|
1080
1181
|
}
|
|
1081
1182
|
|
|
1082
|
-
const db =
|
|
1183
|
+
const db = new CouchDB(appId)
|
|
1083
1184
|
const { calculation, group, field } = ctx.query
|
|
1084
1185
|
const viewInfo = await getView(db, viewName)
|
|
1085
1186
|
let response
|
|
@@ -1106,7 +1207,7 @@ exports.fetchView = async ctx => {
|
|
|
1106
1207
|
schema: {},
|
|
1107
1208
|
}
|
|
1108
1209
|
}
|
|
1109
|
-
rows = await outputProcessing(table, response.rows)
|
|
1210
|
+
rows = await outputProcessing(ctx, table, response.rows)
|
|
1110
1211
|
}
|
|
1111
1212
|
|
|
1112
1213
|
if (calculation === CALCULATION_TYPES.STATS) {
|
|
@@ -1133,24 +1234,27 @@ exports.fetchView = async ctx => {
|
|
|
1133
1234
|
}
|
|
1134
1235
|
|
|
1135
1236
|
exports.fetch = async ctx => {
|
|
1136
|
-
const
|
|
1237
|
+
const appId = ctx.appId
|
|
1238
|
+
const db = new CouchDB(appId)
|
|
1137
1239
|
|
|
1138
1240
|
const tableId = ctx.params.tableId
|
|
1139
1241
|
let table = await db.get(tableId)
|
|
1140
1242
|
let rows = await getRawTableData(ctx, db, tableId)
|
|
1141
|
-
return outputProcessing(table, rows)
|
|
1243
|
+
return outputProcessing(ctx, table, rows)
|
|
1142
1244
|
}
|
|
1143
1245
|
|
|
1144
1246
|
exports.find = async ctx => {
|
|
1145
|
-
const
|
|
1247
|
+
const appId = ctx.appId
|
|
1248
|
+
const db = new CouchDB(appId)
|
|
1146
1249
|
const table = await db.get(ctx.params.tableId)
|
|
1147
|
-
let row = await findRow(ctx, ctx.params.tableId, ctx.params.rowId)
|
|
1148
|
-
row = await outputProcessing(table, row)
|
|
1250
|
+
let row = await findRow(ctx, db, ctx.params.tableId, ctx.params.rowId)
|
|
1251
|
+
row = await outputProcessing(ctx, table, row)
|
|
1149
1252
|
return row
|
|
1150
1253
|
}
|
|
1151
1254
|
|
|
1152
1255
|
exports.destroy = async function (ctx) {
|
|
1153
|
-
const
|
|
1256
|
+
const appId = ctx.appId
|
|
1257
|
+
const db = new CouchDB(appId)
|
|
1154
1258
|
const { _id, _rev } = ctx.request.body
|
|
1155
1259
|
let row = await db.get(_id)
|
|
1156
1260
|
|
|
@@ -1159,17 +1263,16 @@ exports.destroy = async function (ctx) {
|
|
|
1159
1263
|
}
|
|
1160
1264
|
const table = await db.get(row.tableId)
|
|
1161
1265
|
// update the row to include full relationships before deleting them
|
|
1162
|
-
row = await outputProcessing(table, row, { squash: false })
|
|
1266
|
+
row = await outputProcessing(ctx, table, row, { squash: false })
|
|
1163
1267
|
// now remove the relationships
|
|
1164
1268
|
await linkRows.updateLinks({
|
|
1269
|
+
appId,
|
|
1165
1270
|
eventType: linkRows.EventType.ROW_DELETE,
|
|
1166
1271
|
row,
|
|
1167
1272
|
tableId: row.tableId,
|
|
1168
1273
|
})
|
|
1169
1274
|
// remove any attachments that were on the row from object storage
|
|
1170
|
-
await cleanupAttachments(table, { row })
|
|
1171
|
-
// remove any static formula
|
|
1172
|
-
await updateRelatedFormula(table, row)
|
|
1275
|
+
await cleanupAttachments(appId, table, { row })
|
|
1173
1276
|
|
|
1174
1277
|
let response
|
|
1175
1278
|
<span class="missing-if-branch" title="if path not taken" >I</span>if (ctx.params.tableId === InternalTables.USER_METADATA) {
|
|
@@ -1185,18 +1288,20 @@ exports.destroy = async function (ctx) {
|
|
|
1185
1288
|
}
|
|
1186
1289
|
|
|
1187
1290
|
exports.bulkDestroy = async ctx => {
|
|
1188
|
-
const
|
|
1291
|
+
const appId = ctx.appId
|
|
1292
|
+
const db = new CouchDB(appId)
|
|
1189
1293
|
const tableId = ctx.params.tableId
|
|
1190
1294
|
const table = await db.get(tableId)
|
|
1191
1295
|
let { rows } = ctx.request.body
|
|
1192
1296
|
|
|
1193
1297
|
// before carrying out any updates, make sure the rows are ready to be returned
|
|
1194
1298
|
// they need to be the full rows (including previous relationships) for automations
|
|
1195
|
-
rows = await outputProcessing(table, rows, { squash: false })
|
|
1299
|
+
rows = await outputProcessing(ctx, table, rows, { squash: false })
|
|
1196
1300
|
|
|
1197
1301
|
// remove the relationships first
|
|
1198
1302
|
let updates = rows.map(row =>
|
|
1199
1303
|
linkRows.updateLinks({
|
|
1304
|
+
appId,
|
|
1200
1305
|
eventType: linkRows.EventType.ROW_DELETE,
|
|
1201
1306
|
row,
|
|
1202
1307
|
tableId: row.tableId,
|
|
@@ -1215,8 +1320,7 @@ exports.bulkDestroy = async ctx => {
|
|
|
1215
1320
|
await db.bulkDocs(rows.map(row => ({ ...row, _deleted: true })))
|
|
1216
1321
|
}
|
|
1217
1322
|
// remove any attachments that were on the rows from object storage
|
|
1218
|
-
await cleanupAttachments(table, { rows })
|
|
1219
|
-
await updateRelatedFormula(table, rows)
|
|
1323
|
+
await cleanupAttachments(appId, table, { rows })
|
|
1220
1324
|
await Promise.all(updates)
|
|
1221
1325
|
return { response: { ok: true }, rows }
|
|
1222
1326
|
}
|
|
@@ -1227,27 +1331,28 @@ exports.search = async ctx => {
|
|
|
1227
1331
|
<span class="cstat-no" title="statement not covered" > return { rows: await exports.fetch(ctx) }</span>
|
|
1228
1332
|
}
|
|
1229
1333
|
|
|
1334
|
+
const appId = ctx.appId
|
|
1230
1335
|
const { tableId } = ctx.params
|
|
1231
|
-
const db =
|
|
1336
|
+
const db = new CouchDB(appId)
|
|
1232
1337
|
const { paginate, query, ...params } = ctx.request.body
|
|
1233
1338
|
params.version = ctx.version
|
|
1234
1339
|
params.tableId = tableId
|
|
1235
1340
|
|
|
1236
1341
|
let response
|
|
1237
1342
|
<span class="missing-if-branch" title="if path not taken" >I</span>if (paginate) {
|
|
1238
|
-
<span class="cstat-no" title="statement not covered" > response = await paginatedSearch(query, params)</span>
|
|
1343
|
+
<span class="cstat-no" title="statement not covered" > response = await paginatedSearch(appId, query, params)</span>
|
|
1239
1344
|
} else {
|
|
1240
|
-
response = await fullSearch(query, params)
|
|
1345
|
+
response = await fullSearch(appId, query, params)
|
|
1241
1346
|
}
|
|
1242
1347
|
|
|
1243
1348
|
// Enrich search results with relationships
|
|
1244
1349
|
if (response.rows && response.rows.length) {
|
|
1245
1350
|
// enrich with global users if from users table
|
|
1246
1351
|
<span class="missing-if-branch" title="if path not taken" >I</span>if (tableId === InternalTables.USER_METADATA) {
|
|
1247
|
-
<span class="cstat-no" title="statement not covered" > response.rows = await getGlobalUsersFromMetadata(response.rows)</span>
|
|
1352
|
+
<span class="cstat-no" title="statement not covered" > response.rows = await getGlobalUsersFromMetadata(appId, response.rows)</span>
|
|
1248
1353
|
}
|
|
1249
1354
|
const table = await db.get(tableId)
|
|
1250
|
-
response.rows = await outputProcessing(table, response.rows)
|
|
1355
|
+
response.rows = await outputProcessing(ctx, table, response.rows)
|
|
1251
1356
|
}
|
|
1252
1357
|
|
|
1253
1358
|
return response
|
|
@@ -1255,22 +1360,25 @@ exports.search = async ctx => {
|
|
|
1255
1360
|
|
|
1256
1361
|
exports.validate = async ctx => {
|
|
1257
1362
|
return validate({
|
|
1363
|
+
appId: ctx.appId,
|
|
1258
1364
|
tableId: ctx.params.tableId,
|
|
1259
1365
|
row: ctx.request.body,
|
|
1260
1366
|
})
|
|
1261
1367
|
}
|
|
1262
1368
|
|
|
1263
1369
|
exports.fetchEnrichedRow = async ctx => {
|
|
1264
|
-
const
|
|
1370
|
+
const appId = ctx.appId
|
|
1371
|
+
const db = new CouchDB(appId)
|
|
1265
1372
|
const tableId = ctx.params.tableId
|
|
1266
1373
|
const rowId = ctx.params.rowId
|
|
1267
1374
|
// need table to work out where links go in row
|
|
1268
1375
|
let [table, row] = await Promise.all([
|
|
1269
1376
|
db.get(tableId),
|
|
1270
|
-
findRow(ctx, tableId, rowId),
|
|
1377
|
+
findRow(ctx, db, tableId, rowId),
|
|
1271
1378
|
])
|
|
1272
1379
|
// get the link docs
|
|
1273
1380
|
const linkVals = await linkRows.getLinkDocuments({
|
|
1381
|
+
appId,
|
|
1274
1382
|
tableId,
|
|
1275
1383
|
rowId,
|
|
1276
1384
|
})
|
|
@@ -1297,7 +1405,7 @@ exports.fetchEnrichedRow = async ctx => {
|
|
|
1297
1405
|
for (let [tableId, rows] of Object.entries(groups)) {
|
|
1298
1406
|
// need to include the IDs in these rows for any links they may have
|
|
1299
1407
|
linkedRows = linkedRows.concat(
|
|
1300
|
-
await outputProcessing(tables[tableId], rows)
|
|
1408
|
+
await outputProcessing(ctx, tables[tableId], rows)
|
|
1301
1409
|
)
|
|
1302
1410
|
}
|
|
1303
1411
|
|
|
@@ -1324,7 +1432,7 @@ exports.fetchEnrichedRow = async ctx => {
|
|
|
1324
1432
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
1325
1433
|
Code coverage generated by
|
|
1326
1434
|
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
|
1327
|
-
at
|
|
1435
|
+
at Fri Feb 04 2022 12:19:28 GMT+0000 (Coordinated Universal Time)
|
|
1328
1436
|
</div>
|
|
1329
1437
|
</div>
|
|
1330
1438
|
<script src="../../../prettify.js"></script>
|